[Haskell-cafe] How to use clipboard in Gtk2Hs

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat Sep 16 07:46:17 EDT 2006


On Sat, 2006-09-16 at 18:32 +0900, Yu, Jae-Myoung wrote:
> I'm making a text editor with Gtk2Hs, and I want to implement copy &
> paste with TextView. I read the api document but I can't find how to
> use the Gtk.Clipboard object. Without context menu basically included
> in the TextView widget, How can I implement copy & paste? 

Btw, it's best to ask Gtk2Hs questions on the Gtk2Hs users list:
gtk2hs-users at lists.sourceforge.net

The copy & paste for TextView works with the normal keybindings, eg
ctl-c/ctl-v/ctl-x (or any other custom ones that have been setup).

To do manual or custom clipboard stuff needs the Clipboard object which
we have not bound yet. If that's a priority for you we can have a go at
binding that before the upcoming Gtk2Hs 0.9.11 release.

If you want it to help then we'll gladly accept patches via darcs send.

Duncan



More information about the Haskell-Cafe mailing list