Author Topic: Mouse Events  (Read 6639 times)

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Mouse Events
« 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 :(
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Mouse Events
« Reply #1 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...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Mouse Events
« Reply #2 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Re: Mouse Events
« Reply #3 on: September 13, 2005, 04:55:14 pm »
Hmmmm the main frame maybe?