OpenSceneGraph  3.4.0
Public Member Functions | Protected Member Functions
osgGA::GUIEventHandler Class Reference

GUIEventHandler provides a basic interface for any class which wants to handle a GUI Events. More...

Inheritance diagram for osgGA::GUIEventHandler:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 GUIEventHandler ()
 GUIEventHandler (const GUIEventHandler &eh, const osg::CopyOp &copyop=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 ()

Detailed Description

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.


Constructor & Destructor Documentation

virtual osgGA::GUIEventHandler::~GUIEventHandler ( ) [protected, virtual]

Member Function Documentation

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]
virtual bool osgGA::GUIEventHandler::handle ( const GUIEventAdapter ,
GUIActionAdapter  
) [inline, virtual]

The documentation for this class was generated from the following file:

osg logo
Generated at Tue Dec 8 2015 00:14:28 for the OpenSceneGraph by doxygen 1.7.6.1.