From Stephan Huber,

"attached you'll find some modifications to Producer, osgGA and
osgProducer to enable Mac OS X support for

+ scrollwheels,
+ mightymouse-srollballs
+ new tracking-pads with scroll feature
+ tablet-support (pressure, proximity and pointertype) (Wacom only tested)

I think there was a bug in the windows-implementation of scroll-wheel
support (wrong order of ScrollingMotion-enum, casting problem) which is
fixed now.

The scrollwheel-code is a bit klunky across platforms, some devices on
OS X can report an absolute delta in pixel-coordinates not only the
direction, so for now there is scrollingMotion (which describes the
direction) and scrolldeltax and scrolldeltay. I decided to leave the
scrollingmotion-stuff to not break old code relying on this."
This commit is contained in:
Robert Osfield
2006-07-04 14:18:44 +00:00
parent b0d738384f
commit e7d9e91525
6 changed files with 113 additions and 7 deletions

View File

@@ -26,10 +26,14 @@ GUIEventAdapter::GUIEventAdapter():
_Ymax(1.0),
_mx(0.5),
_my(0.5),
_pressure(0.0),
_buttonMask(0),
_modKeyMask(0),
_scrollingMotion(SCROLL_DOWN),
_mouseYOrientation(Y_INCREASING_DOWNWARDS)
_scrollingMotion(SCROLL_NONE),
_scrollingDeltaX(0),
_scrollingDeltaY(0),
_mouseYOrientation(Y_INCREASING_DOWNWARDS),
_tabletPointerType(UNKNOWN)
{}
GUIEventAdapter::GUIEventAdapter(const GUIEventAdapter& rhs):
@@ -44,10 +48,14 @@ GUIEventAdapter::GUIEventAdapter(const GUIEventAdapter& rhs):
_Ymax(rhs._Ymax),
_mx(rhs._mx),
_my(rhs._my),
_pressure(rhs._pressure),
_buttonMask(rhs._buttonMask),
_modKeyMask(rhs._modKeyMask),
_scrollingMotion(rhs._scrollingMotion),
_mouseYOrientation(rhs._mouseYOrientation)
_scrollingDeltaX(rhs._scrollingDeltaX),
_scrollingDeltaY(rhs._scrollingDeltaY),
_mouseYOrientation(rhs._mouseYOrientation),
_tabletPointerType(rhs._tabletPointerType)
{}
GUIEventAdapter::~GUIEventAdapter()