openscenegraph
Public Member Functions | Protected Attributes
osgGA::GUIEventHandler Class Reference
Inheritance diagram for osgGA::GUIEventHandler:
osg::NodeCallback osg::Drawable::EventCallback osg::Object osg::Object osg::Referenced osg::Referenced osgAnimation::StatsHandler osgGA::CameraManipulator osgGA::StateSetManipulator osgPresentation::PickEventHandler osgPresentation::SlideEventHandler osgViewer::HelpHandler osgViewer::InteractiveImageHandler osgViewer::LODScaleHandler osgViewer::RecordCameraPathHandler osgViewer::ScreenCaptureHandler osgViewer::StatsHandler osgViewer::ThreadingHandler osgViewer::ToggleSyncToVBlankHandler osgViewer::WindowSizeHandler osgVolume::PropertyAdjustmentCallback osgWidget::CameraSwitchHandler osgWidget::KeyboardHandler osgWidget::MouseHandler osgWidget::ResizeHandler

List of all members.

Public Member Functions

 GUIEventHandler ()
 GUIEventHandler (const GUIEventHandler &eh, const osg::CopyOp &copyop)
 META_Object (osgGA, GUIEventHandler)
virtual void operator() (osg::Node *node, osg::NodeVisitor *nv)
virtual void event (osg::NodeVisitor *nv, osg::Drawable *drawable)
virtual bool handle (const GUIEventAdapter &ea, GUIActionAdapter &aa, osg::Object *, osg::NodeVisitor *)
bool handleWithCheckAgainstIgnoreHandledEventsMask (const GUIEventAdapter &ea, GUIActionAdapter &aa, osg::Object *object, osg::NodeVisitor *nv)
virtual bool handle (const GUIEventAdapter &, GUIActionAdapter &)
bool handleWithCheckAgainstIgnoreHandledEventsMask (const GUIEventAdapter &ea, GUIActionAdapter &aa)
virtual void getUsage (osg::ApplicationUsage &) const
void setIgnoreHandledEventsMask (unsigned int mask)
unsigned int getIgnoreHandledEventsMask () const

Protected Attributes

unsigned int _ignoreHandledEventsMask

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

osgGA::GUIEventHandler::GUIEventHandler ( const GUIEventHandler eh,
const osg::CopyOp copyop 
) [inline]

Member Function Documentation

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]
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]

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::getEventType(), osgGA::GUIEventAdapter::getHandled(), and osgGA::GUIEventAdapter::setHandled().

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::getEventType(), osgGA::GUIEventAdapter::getHandled(), and osgGA::GUIEventAdapter::setHandled().

virtual void osgGA::GUIEventHandler::operator() ( osg::Node node,
osg::NodeVisitor nv 
) [virtual]

Event traversal node callback method.

Reimplemented from osg::NodeCallback.

Reimplemented in osgPresentation::SlideEventHandler.

void osgGA::GUIEventHandler::setIgnoreHandledEventsMask ( unsigned int  mask) [inline]

Set a mask of osgGA::GUIEeventAdapter::Event to be ignored if marked as handled


Member Data Documentation


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