News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Hooking to clipboard events

Started by ptDev, March 07, 2011, 01:24:35 PM

Previous topic - Next topic

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.
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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]