openscenegraph
Public Member Functions | Protected Attributes | List of all members
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::KeyEventHandler osgPresentation::PickEventHandler osgPresentation::PropertyEventCallback osgPresentation::SlideEventHandler osgViewer::HelpHandler osgViewer::InteractiveImageHandler osgViewer::KeystoneHandler osgViewer::LODScaleHandler osgViewer::RecordCameraPathHandler osgViewer::ScreenCaptureHandler osgViewer::StatsHandler osgViewer::ThreadingHandler osgViewer::ToggleSyncToVBlankHandler osgViewer::WindowSizeHandler osgVolume::PropertyAdjustmentCallback osgWidget::CameraSwitchHandler osgWidget::KeyboardHandler osgWidget::MouseHandler osgWidget::ResizeHandler

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
 
- Public Member Functions inherited from osg::NodeCallback
 NodeCallback ()
 
 NodeCallback (const NodeCallback &nc, const CopyOp &)
 
 META_Object (osg, NodeCallback)
 
void traverse (Node *node, NodeVisitor *nv)
 
void setNestedCallback (NodeCallback *nc)
 
NodeCallbackgetNestedCallback ()
 
const NodeCallbackgetNestedCallback () const
 
void addNestedCallback (NodeCallback *nc)
 
void removeNestedCallback (NodeCallback *nc)
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *) const
 
virtual const char * libraryName () const =0
 
virtual const char * className () const =0
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
virtual void releaseGLObjects (osg::State *=0) const
 
template<typename T >
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject bool getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 
- Public Member Functions inherited from osg::Drawable::EventCallback
 EventCallback ()
 
 EventCallback (const EventCallback &, const CopyOp &)
 
 META_Object (osg, EventCallback)
 

Protected Attributes

unsigned int _ignoreHandledEventsMask
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 
- Public Attributes inherited from osg::NodeCallback
ref_ptr< NodeCallback_nestedCallback
 
- Protected Member Functions inherited from osg::NodeCallback
virtual ~NodeCallback ()
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

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

◆ GUIEventHandler() [1/2]

osgGA::GUIEventHandler::GUIEventHandler ( )
inline

◆ GUIEventHandler() [2/2]

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

Member Function Documentation

◆ event()

virtual void osgGA::GUIEventHandler::event ( osg::NodeVisitor nv,
osg::Drawable drawable 
)
virtual

Event traversal drawable callback method.

Reimplemented from osg::Drawable::EventCallback.

◆ getIgnoreHandledEventsMask()

unsigned int osgGA::GUIEventHandler::getIgnoreHandledEventsMask ( ) const
inline

Get the event mask of the osgGA::GUIEeventAdapter::Event to be ignored if marked as handled

◆ getUsage()

virtual void osgGA::GUIEventHandler::getUsage ( osg::ApplicationUsage ) const
inlinevirtual

◆ handle() [1/2]

virtual bool osgGA::GUIEventHandler::handle ( const GUIEventAdapter ea,
GUIActionAdapter aa,
osg::Object ,
osg::NodeVisitor  
)
inlinevirtual

◆ handle() [2/2]

virtual bool osgGA::GUIEventHandler::handle ( const GUIEventAdapter ,
GUIActionAdapter  
)
inlinevirtual

◆ handleWithCheckAgainstIgnoreHandledEventsMask() [1/2]

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.

◆ handleWithCheckAgainstIgnoreHandledEventsMask() [2/2]

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.

◆ META_Object()

osgGA::GUIEventHandler::META_Object ( osgGA  ,
GUIEventHandler   
)

◆ operator()()

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.

◆ setIgnoreHandledEventsMask()

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

◆ _ignoreHandledEventsMask

unsigned int osgGA::GUIEventHandler::_ignoreHandledEventsMask
protected

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