diff --git a/include/osgGA/GUIEventAdapter b/include/osgGA/GUIEventAdapter index ddb505a16..f3d997969 100644 --- a/include/osgGA/GUIEventAdapter +++ b/include/osgGA/GUIEventAdapter @@ -34,22 +34,22 @@ public: enum EventType { NONE=0, - PUSH, - RELEASE, - DOUBLECLICK, - DRAG, - MOVE, - KEYDOWN, - KEYUP, - FRAME, - RESIZE, - SCROLL, - PEN_PRESSURE, - PEN_PROXIMITY_ENTER, - PEN_PROXIMITY_LEAVE, - CLOSE_WINDOW, - QUIT_APPLICATION, - USER + PUSH=1, + RELEASE=2, + DOUBLECLICK=4, + DRAG=8, + MOVE=16, + KEYDOWN=32, + KEYUP=64, + FRAME=128, + RESIZE=256, + SCROLL=512, + PEN_PRESSURE=1024, + PEN_PROXIMITY_ENTER=2048, + PEN_PROXIMITY_LEAVE=4096, + CLOSE_WINDOW=8192, + QUIT_APPLICATION=16384, + USER=32768 }; enum KeySymbol diff --git a/include/osgGA/GUIEventHandler b/include/osgGA/GUIEventHandler index 436d91138..5be7533f9 100644 --- a/include/osgGA/GUIEventHandler +++ b/include/osgGA/GUIEventHandler @@ -51,7 +51,7 @@ class OSGGA_EXPORT GUIEventHandler : public osg::NodeCallback, public osg::Drawa { public: - GUIEventHandler() {} + GUIEventHandler() : _ignoreUsedEventsMask(GUIEventAdapter::NONE) {} GUIEventHandler(const GUIEventHandler&,const osg::CopyOp&) {} META_Object(osgGA,GUIEventHandler); @@ -70,6 +70,15 @@ public: /** Get the keyboard and mouse usage of this manipulator.*/ virtual void getUsage(osg::ApplicationUsage&) const {} + + /** Set a mask of osgGA::GUIEeventAdapter::Event to be ignored if marked as handled */ + void setIgnoreUsedEventsMask(unsigned int mask) { _ignoreUsedEventsMask = mask; } + + unsigned int getIgnoreUsedEventsMask() const { return _ignoreUsedEventsMask; }; + +protected: + unsigned int _ignoreUsedEventsMask; + }; #ifdef USE_DEPRECATED_API