OpenSceneGraph
3.0.1
|
GUIEventHandler provides a basic interface for any class which wants to handle a GUI Events. More...
Public Member Functions | |
GUIEventHandler () | |
GUIEventHandler (const GUIEventHandler &eh, const osg::CopyOp ©op) | |
META_Object (osgGA, GUIEventHandler) | |
virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv) |
Event traversal node callback method. | |
virtual void | event (osg::NodeVisitor *nv, osg::Drawable *drawable) |
Event traversal drawable callback method. | |
virtual bool | handle (const GUIEventAdapter &ea, GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *) |
Handle events, return true if handled, false otherwise. | |
bool | handleWithCheckAgainstIgnoreHandledEventsMask (const GUIEventAdapter &ea, GUIActionAdapter &aa, osg::Object *object, osg::NodeVisitor *nv) |
Convenience method that only passes on to the handle(,,,) method events that either haven't been handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask. | |
virtual bool | handle (const GUIEventAdapter &, GUIActionAdapter &) |
Deprecated, Handle events, return true if handled, false otherwise. | |
bool | handleWithCheckAgainstIgnoreHandledEventsMask (const GUIEventAdapter &ea, GUIActionAdapter &aa) |
Convenience method that only passes on to the handle(,) method events that either haven't been handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask. | |
virtual void | getUsage (osg::ApplicationUsage &) const |
Get the keyboard and mouse usage of this manipulator. | |
void | setIgnoreHandledEventsMask (unsigned int mask) |
Set a mask of osgGA::GUIEeventAdapter::Event to be ignored if marked as handled. | |
unsigned int | getIgnoreHandledEventsMask () const |
Get the event mask of the osgGA::GUIEeventAdapter::Event to be ignored if marked as handled. | |
Protected Attributes | |
unsigned int | _ignoreHandledEventsMask |
GUIEventHandler provides a basic interface for any class which wants to handle a GUI Events.
The GUIEvent is supplied by a GUIEventAdapter. Feedback resulting from the handle method is supplied by a GUIActionAdapter, which allows the GUIEventHandler to ask the GUI to take some action in response to an incoming event.
For example, consider a Trackball Viewer class which takes mouse events and manipulates a scene camera in response. The Trackball Viewer is a GUIEventHandler, and receives the events via the handle method. If the user 'throws' the model, the Trackball Viewer class can detect this via the incoming events, and request that the GUI set up a timer callback to continually redraw the view. This request is made via the GUIActionAdapter class.
osgGA::GUIEventHandler::GUIEventHandler | ( | ) | [inline] |
osgGA::GUIEventHandler::GUIEventHandler | ( | const GUIEventHandler & | eh, |
const osg::CopyOp & | copyop | ||
) | [inline] |
virtual void osgGA::GUIEventHandler::event | ( | osg::NodeVisitor * | nv, |
osg::Drawable * | drawable | ||
) | [virtual] |
Event traversal drawable callback method.
Reimplemented from osg::Drawable::EventCallback.
unsigned int osgGA::GUIEventHandler::getIgnoreHandledEventsMask | ( | ) | const [inline] |
Get the event mask of the osgGA::GUIEeventAdapter::Event to be ignored if marked as handled.
virtual void osgGA::GUIEventHandler::getUsage | ( | osg::ApplicationUsage & | ) | const [inline, virtual] |
Get the keyboard and mouse usage of this manipulator.
Reimplemented in osgViewer::ScreenCaptureHandler, osgViewer::ToggleSyncToVBlankHandler, osgViewer::LODScaleHandler, osgViewer::RecordCameraPathHandler, osgViewer::ThreadingHandler, osgViewer::WindowSizeHandler, osgGA::KeySwitchMatrixManipulator, osgGA::SphericalManipulator, osgGA::UFOManipulator, osgViewer::StatsHandler, osgGA::AnimationPathManipulator, osgGA::StandardManipulator, osgAnimation::StatsHandler, osgGA::DriveManipulator, osgGA::CameraViewSwitchManipulator, osgGA::StateSetManipulator, osgGA::FlightManipulator, and osgViewer::HelpHandler.
virtual bool osgGA::GUIEventHandler::handle | ( | const GUIEventAdapter & | ea, |
GUIActionAdapter & | aa, | ||
osg::Object * | , | ||
osg::NodeVisitor * | |||
) | [inline, virtual] |
Handle events, return true if handled, false otherwise.
Reimplemented in osgViewer::InteractiveImageHandler, osgVolume::PropertyAdjustmentCallback, osgWidget::CameraSwitchHandler, osgWidget::ResizeHandler, osgWidget::KeyboardHandler, and osgWidget::MouseHandler.
References handle().
Referenced by handle().
virtual bool osgGA::GUIEventHandler::handle | ( | const GUIEventAdapter & | , |
GUIActionAdapter & | |||
) | [inline, virtual] |
Deprecated, Handle events, return true if handled, false otherwise.
Reimplemented in osgViewer::ScreenCaptureHandler, osgViewer::ToggleSyncToVBlankHandler, osgViewer::LODScaleHandler, osgViewer::RecordCameraPathHandler, osgViewer::ThreadingHandler, osgViewer::WindowSizeHandler, osgGA::CameraManipulator, osgGA::KeySwitchMatrixManipulator, osgGA::UFOManipulator, osgViewer::StatsHandler, osgGA::AnimationPathManipulator, osgGA::StandardManipulator, osgGA::SphericalManipulator, osgAnimation::StatsHandler, osgGA::DriveManipulator, osgGA::CameraViewSwitchManipulator, osgGA::StateSetManipulator, osgViewer::HelpHandler, and osgGA::MultiTouchTrackballManipulator.
bool osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask | ( | const GUIEventAdapter & | ea, |
GUIActionAdapter & | aa, | ||
osg::Object * | object, | ||
osg::NodeVisitor * | nv | ||
) | [inline] |
Convenience method that only passes on to the handle(,,,) method events that either haven't been handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask.
Note, this method is an inline method, and not appropriate for users to override, override the handle(,,,) method instead.
References osgGA::GUIEventAdapter::getHandled(), osgGA::GUIEventAdapter::getEventType(), and osgGA::GUIEventAdapter::setHandled().
bool osgGA::GUIEventHandler::handleWithCheckAgainstIgnoreHandledEventsMask | ( | const GUIEventAdapter & | ea, |
GUIActionAdapter & | aa | ||
) | [inline] |
Convenience method that only passes on to the handle(,) method events that either haven't been handled yet, or have been handled but haven't be set to be ignored by the IgnoreHandledEventsMask.
Note, this method is an inline method, and not appropriate for users to override, override the handle(,) method instead.
References osgGA::GUIEventAdapter::getHandled(), osgGA::GUIEventAdapter::getEventType(), and osgGA::GUIEventAdapter::setHandled().
osgGA::GUIEventHandler::META_Object | ( | osgGA | , |
GUIEventHandler | |||
) |
virtual void osgGA::GUIEventHandler::operator() | ( | osg::Node * | node, |
osg::NodeVisitor * | nv | ||
) | [virtual] |
Event traversal node callback method.
Reimplemented from osg::NodeCallback.
void osgGA::GUIEventHandler::setIgnoreHandledEventsMask | ( | unsigned int | mask | ) | [inline] |
Set a mask of osgGA::GUIEeventAdapter::Event to be ignored if marked as handled.
unsigned int osgGA::GUIEventHandler::_ignoreHandledEventsMask [protected] |
![]() | Generated at Mon Oct 3 2011 12:39:47 for the OpenSceneGraph by doxygen 1.7.5. |