Code::Blocks Forums
Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: ptDev on March 07, 2011, 01:24:35 pm
-
Is there a simple way to intercept the cbStyledTextCtrl clipboard (cut/copy/paste) events from a plugin? I had an idea for an interesting feature for CodePaste, but have found myself unable to "catch" text copied by the user.
-
Is there a simple way to intercept the cbStyledTextCtrl clipboard (cut/copy/paste) events from a plugin? I had an idea for an interesting feature for CodePaste, but have found myself unable to "catch" text copied by the user.
As scintilla does not differ between a general change and a "Paste" change this is impossible and a restriction by the underlying scintilla. The only event sent is wxEVT_SCI_CHANGE. So either you do some magic around this event (I don' can think of a solution though), or you contact the scintilla dev and ask for implementing support for this. Surely you can try to do this yourself and send a patch to the scintilla maintainer as a proposal.
Sorry.