Author Topic: Hooking to clipboard events  (Read 5025 times)

Offline ptDev

  • Almost regular
  • **
  • Posts: 222
Hooking to clipboard events
« 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.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9613
Re: Hooking to clipboard events
« Reply #1 on: March 07, 2011, 03:36:45 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: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ