Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Mouse Events


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 :(

You might try modifying the SDK and catch the middle mouse clicks... then do a NotifyPlugins or something...

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.

Hmmmm the main frame maybe?


[0] Message Index

Go to full version