OpenSceneGraph
3.4.0
|
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=osg::CopyOp::SHALLOW_COPY) | |
META_Object (osgGA, GUIEventHandler) | |
virtual bool | handle (osgGA::Event *event, osg::Object *object, osg::NodeVisitor *nv) |
Handle event. | |
virtual bool | handle (const GUIEventAdapter &ea, GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *) |
Handle events, return true if handled, false otherwise. | |
virtual bool | handle (const GUIEventAdapter &, GUIActionAdapter &) |
Deprecated, Handle events, return true if handled, false otherwise. | |
Protected Member Functions | |
virtual | ~GUIEventHandler () |
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 = osg::CopyOp::SHALLOW_COPY |
||
) | [inline] |
virtual osgGA::GUIEventHandler::~GUIEventHandler | ( | ) | [protected, virtual] |
virtual bool osgGA::GUIEventHandler::handle | ( | osgGA::Event * | event, |
osg::Object * | object, | ||
osg::NodeVisitor * | nv | ||
) | [virtual] |
Handle event.
Override the handle(..) method in your event handlers to respond to events.
Reimplemented from osgGA::EventHandler.
Reimplemented in osgGA::CameraManipulator.
Referenced by osgGA::CameraManipulator::handle().
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, osgViewer::KeystoneHandler, 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.
osgGA::GUIEventHandler::META_Object | ( | osgGA | , |
GUIEventHandler | |||
) |
![]() | Generated at Tue Dec 8 2015 00:14:28 for the OpenSceneGraph by doxygen 1.7.6.1. |