News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Mouse Events

Started by thomas, September 13, 2005, 04:29:59 PM

Previous topic - Next topic

thomas

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 :(
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

rickg22

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

thomas

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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

rickg22

Hmmmm the main frame maybe?