[PD-dev] cut/copy/paste from text in canvas (i.e. obj, msg, comment, etc)
Hans-Christoph Steiner
hans at at.or.at
Tue Sep 1 21:18:13 CEST 2009
In g_editor.c there are canvas_cut(), canvas_copy(), and
canvas_paste(). They do the obvious actions of cut/copy/paste on
whole Pd chunks on Pd patches, but also they handle cut/copy/paste of
the text that is inside of the msg, obj boxes and comments. That's a
different mechanism, that uses Tk's clipboard.
I was wondering if there was any reason why doing a copy when editing
text needs to be sent to 'pd' at all. Just a tk_textCopy should do
it, no need to send a message to 'pd' to have it reply to tell Tcl to
do something. There is also tk_textCut and tk_textPaste which could
be used, but they would then have to send a message to 'pd' to
announce the change.
.hc
----------------------------------------------------------------------------
http://at.or.at/hans/
More information about the Pd-dev
mailing list