Page 1 of 1

editorgadget and cut/copy/paste in linux

Posted: Mon Feb 06, 2012 9:48 am
by griz
Hello old friends.

How can I perform cut/copy/paste clipboard operations with the editorgadget in linux?

I would like to support these operations from my application's toolbar and menu.

Many thanks

Re: editorgadget and cut/copy/paste in linux

Posted: Mon Feb 06, 2012 10:51 am
by remi_meier
Looking for this?

Code: Select all

ImportC ""
  g_signal_emit_by_name(*inst, name.p-utf8)
EndImport

g_signal_emit_by_name(GadgetID(0), "paste-clipboard")
g_signal_emit_by_name(GadgetID(0), "cut-clipboard")
g_signal_emit_by_name(GadgetID(0), "copy-clipboard")
0 being your EditorGadget.

Re: editorgadget and cut/copy/paste in linux

Posted: Tue Feb 07, 2012 1:53 am
by griz
Exactly! Thank you Remi.

I also needed a couple of extra signals which I looked up :

Code: Select all

g_signal_emit_by_name(GadgetID(0), "backspace")
g_signal_emit_by_name(GadgetID(0), "select-all")