Re: Clipboard IO under GTK/GDK?



learfox furry ao net writes:
Is there a way to copy data to and from the clipboard using GTK/GDK?

I have some text (not from a gtk editable or entry) that I need to copy
and paste.

What should I do?

You more or less have to do the same thing GtkEditable does; copy the
code in there for the selection_clear, selection_get,
selection_received handlers (though you can use callbacks connected to
those signals instead of writing a widget subclass). You must have
some widget that becomes the clipboard owner.

GTK+ 2.0 has a GtkClipboard object that's easier to use.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]