Home | Tutorials | Wiki | Issues
Ask Your Question

Revision history [back]

I'm assuming you added an event handler with AddReleaseFilter, like this for example:

MouseEventHandler::Instance()->AddReleaseFilter("my_plugin",
    boost::bind(&MyPlugin::OnMouseRelease, this, _1));

Your function returns a bool which indicates if the event was handled or not. So if you return false, the event will be propagated onwards. Return true to stop propagation.

bool MyPlugin::OnMouseMove(const common::MouseEvent &_event)
{
  // Do what you want to do and decide if you want to propagate the event

  if (propagateEvent)
    return false;
  else
    return true;
}

I'm assuming you added an event handler with AddReleaseFilter, like this for example:

MouseEventHandler::Instance()->AddReleaseFilter("my_plugin",
    boost::bind(&MyPlugin::OnMouseRelease, this, _1));

Your function returns a bool which indicates if the event was handled or not. So if you return false, the event will be propagated onwards. Return true to stop propagation.

bool MyPlugin::OnMouseMove(const MyPlugin::OnMouseRelease(const common::MouseEvent &_event)
{
  // Do what you want to do and decide if you want to propagate the event

  if (propagateEvent)
    return false;
  else
    return true;
}