diff --git a/include/osgProducer/KeyboardMouseCallback b/include/osgProducer/KeyboardMouseCallback index 5c2401e04..025b563d7 100644 --- a/include/osgProducer/KeyboardMouseCallback +++ b/include/osgProducer/KeyboardMouseCallback @@ -39,7 +39,7 @@ class OSGPRODUCER_EXPORT KeyboardMouseCallback : public Producer::KeyboardMouseC virtual void mouseScroll( Producer::KeyboardMouseCallback::ScrollingMotion sm ); virtual void mouseScroll2D( float, float); virtual void penPressure(float pressure); - virtual void penProximity(TabletPointerType, bool); + virtual void penProximity(Producer::KeyboardMouseCallback::TabletPointerType, bool); virtual void mouseMotion( float mx, float my); virtual void passiveMouseMotion( float mx, float my); virtual void mouseWarp( float mx, float my); diff --git a/src/osgProducer/KeyboardMouseCallback.cpp b/src/osgProducer/KeyboardMouseCallback.cpp index 178b8aaaa..1b14a0d6b 100644 --- a/src/osgProducer/KeyboardMouseCallback.cpp +++ b/src/osgProducer/KeyboardMouseCallback.cpp @@ -46,7 +46,7 @@ void KeyboardMouseCallback::penPressure( float pressure ) if (_eventQueue.valid()) _eventQueue->penPressure(pressure); } -void KeyboardMouseCallback::penProximity(TabletPointerType pt, bool isEntering) +void KeyboardMouseCallback::penProximity(Producer::KeyboardMouseCallback::TabletPointerType pt, bool isEntering) { updateWindowSize(); if (_eventQueue.valid()) _eventQueue->penProximity((osgGA::GUIEventAdapter::TabletPointerType)pt, isEntering); diff --git a/src/osgWrappers/osgGA/EventQueue.cpp b/src/osgWrappers/osgGA/EventQueue.cpp index 13cb5f85d..f406b4a8b 100644 --- a/src/osgWrappers/osgGA/EventQueue.cpp +++ b/src/osgWrappers/osgGA/EventQueue.cpp @@ -33,6 +33,9 @@ BEGIN_OBJECT_REFLECTOR(osgGA::EventQueue) I_Method1(void, addEvent, IN, osgGA::GUIEventAdapter *, event); I_Method4(void, windowResize, IN, float, Xmin, IN, float, Ymin, IN, float, Xmax, IN, float, Ymax); I_Method1(void, mouseScroll, IN, osgGA::GUIEventAdapter::ScrollingMotion, sm); + I_Method2(void, mouseScroll2D, IN, float, x, IN, float, y); + I_Method1(void, penPressure, IN, float, pressure); + I_Method2(void, penProximity, IN, osgGA::GUIEventAdapter::TabletPointerType, pt, IN, bool, isEntering); I_Method2(void, mouseWarp, IN, float, x, IN, float, y); I_Method2(void, mouseMotion, IN, float, x, IN, float, y); I_Method3(void, mouseButtonPress, IN, float, x, IN, float, y, IN, unsigned int, button); diff --git a/src/osgWrappers/osgGA/GUIEventAdapter.cpp b/src/osgWrappers/osgGA/GUIEventAdapter.cpp index 85d3f6cf1..c52c8cb42 100644 --- a/src/osgWrappers/osgGA/GUIEventAdapter.cpp +++ b/src/osgWrappers/osgGA/GUIEventAdapter.cpp @@ -37,6 +37,9 @@ BEGIN_ENUM_REFLECTOR(osgGA::GUIEventAdapter::EventType) I_EnumLabel(osgGA::GUIEventAdapter::FRAME); I_EnumLabel(osgGA::GUIEventAdapter::RESIZE); I_EnumLabel(osgGA::GUIEventAdapter::SCROLL); + I_EnumLabel(osgGA::GUIEventAdapter::PEN_PRESSURE); + I_EnumLabel(osgGA::GUIEventAdapter::PEN_PROXIMITY_ENTER); + I_EnumLabel(osgGA::GUIEventAdapter::PEN_PROXIMITY_LEAVE); END_REFLECTOR BEGIN_ENUM_REFLECTOR(osgGA::GUIEventAdapter::KeySymbol) @@ -187,10 +190,19 @@ BEGIN_ENUM_REFLECTOR(osgGA::GUIEventAdapter::MouseYOrientation) END_REFLECTOR BEGIN_ENUM_REFLECTOR(osgGA::GUIEventAdapter::ScrollingMotion) + I_EnumLabel(osgGA::GUIEventAdapter::SCROLL_NONE); I_EnumLabel(osgGA::GUIEventAdapter::SCROLL_LEFT); I_EnumLabel(osgGA::GUIEventAdapter::SCROLL_RIGHT); I_EnumLabel(osgGA::GUIEventAdapter::SCROLL_UP); I_EnumLabel(osgGA::GUIEventAdapter::SCROLL_DOWN); + I_EnumLabel(osgGA::GUIEventAdapter::SCROLL_2D); +END_REFLECTOR + +BEGIN_ENUM_REFLECTOR(osgGA::GUIEventAdapter::TabletPointerType) + I_EnumLabel(osgGA::GUIEventAdapter::UNKNOWN); + I_EnumLabel(osgGA::GUIEventAdapter::PEN); + I_EnumLabel(osgGA::GUIEventAdapter::PUCK); + I_EnumLabel(osgGA::GUIEventAdapter::ERASER); END_REFLECTOR BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventAdapter) @@ -223,7 +235,14 @@ BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventAdapter) I_Method0(unsigned int, getButtonMask); I_Method1(void, setModKeyMask, IN, unsigned int, mask); I_Method0(unsigned int, getModKeyMask); + I_Method0(float, getPenPressure); + I_Method1(void, setPenPressure, IN, float, pressure); + I_Method0(osgGA::GUIEventAdapter::TabletPointerType, getTabletPointerType); + I_Method1(void, setTabletPointerType, IN, osgGA::GUIEventAdapter::TabletPointerType, pt); I_Method1(void, setScrollingMotion, IN, osgGA::GUIEventAdapter::ScrollingMotion, motion); + I_Method0(float, getScrollingDeltaX); + I_Method0(float, getScrollingDeltaY); + I_Method2(void, setScrollingMotionDelta, IN, float, x, IN, float, y); I_Method0(osgGA::GUIEventAdapter::ScrollingMotion, getScrollingMotion); I_Method0(float, getXnormalized); I_Method0(float, getYnormalized); @@ -235,7 +254,11 @@ BEGIN_OBJECT_REFLECTOR(osgGA::GUIEventAdapter) I_Property(int, Key); I_Property(unsigned int, ModKeyMask); I_Property(osgGA::GUIEventAdapter::MouseYOrientation, MouseYOrientation); + I_Property(float, PenPressure); + I_ReadOnlyProperty(float, ScrollingDeltaX); + I_ReadOnlyProperty(float, ScrollingDeltaY); I_Property(osgGA::GUIEventAdapter::ScrollingMotion, ScrollingMotion); + I_Property(osgGA::GUIEventAdapter::TabletPointerType, TabletPointerType); I_Property(double, Time); I_Property(float, X); I_Property(float, Xmax); diff --git a/src/osgWrappers/osgProducer/KeyboardMouseCallback.cpp b/src/osgWrappers/osgProducer/KeyboardMouseCallback.cpp index 56a0ab942..8e9a26d59 100644 --- a/src/osgWrappers/osgProducer/KeyboardMouseCallback.cpp +++ b/src/osgWrappers/osgProducer/KeyboardMouseCallback.cpp @@ -26,6 +26,9 @@ TYPE_NAME_ALIAS(osgGA::EventQueue::Events, osgProducer::KeyboardMouseCallback::E BEGIN_OBJECT_REFLECTOR(osgProducer::KeyboardMouseCallback) I_ConstructorWithDefaults3(IN, Producer::KeyboardMouse *, keyboardMouse, , IN, bool &, done, , IN, bool, escapeKeySetsDone, true); I_Method1(void, mouseScroll, IN, Producer::KeyboardMouseCallback::ScrollingMotion, sm); + I_Method2(void, mouseScroll2D, IN, float, x, IN, float, x); + I_Method1(void, penPressure, IN, float, pressure); + I_Method2(void, penProximity, IN, Producer::KeyboardMouseCallback::TabletPointerType, x, IN, bool, x); I_Method2(void, mouseMotion, IN, float, mx, IN, float, my); I_Method2(void, passiveMouseMotion, IN, float, mx, IN, float, my); I_Method2(void, mouseWarp, IN, float, mx, IN, float, my);