Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: thomas on September 13, 2005, 04:29:59 pm

Title: Mouse Events
Post by: thomas on September 13, 2005, 04:29:59 pm
Is there a way how I can catch mouse events from a plugin? Specifically, I tried to make use of the middle mouse button for an editor extension plugin (middle button is currently unused).

The obviously first thing I tried was a simple EVT_MIDDLE_DOWN(MyPlugin::OnButtonClick), but the events are not handled down to the plugin (I think for that to work, it would have to be passed upwards by the editor window, first?). If I read the wx docs correctly, this is implicitely done for wxCommandEvents. But unluckily, wxMouseEvents don't derive from wxCommandEvent :(
Title: Re: Mouse Events
Post by: rickg22 on September 13, 2005, 04:36:11 pm
You might try modifying the SDK and catch the middle mouse clicks... then do a NotifyPlugins or something...
Title: Re: Mouse Events
Post by: thomas on September 13, 2005, 04:49:49 pm
Lol, that was my thought, too.   :D
However, I dared not ask that - modifying the SDK is some heavy stuff, as dozens of others rely on its consistency. Changing a behaviour that some other people maybe rely on can cause a lot of discomfort.
Title: Re: Mouse Events
Post by: rickg22 on September 13, 2005, 04:55:14 pm
Hmmmm the main frame maybe?