Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
Hooking to clipboard events
(1/1)
ptDev:
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.
MortenMacFly:
--- Quote from: 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.
--- End quote ---
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.
Navigation
[0] Message Index
Go to full version