Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device.
More...
#include <Inventor/Win/devices/SoWinSpaceball.h>
Public Member Functions | |
| SoWinSpaceball (SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL) | |
| ~SoWinSpaceball () | |
| virtual void | enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=NULL) |
| virtual void | disable (SoWidget w, XtEventHandler f, XtPointer data) |
| virtual const SoEvent * | translateEvent (XAnyEvent *xevent) |
| void | setRotationScaleFactor (float f) |
| float | getRotationScaleFactor () const |
| void | setTranslationScaleFactor (float f) |
| float | getTranslationScaleFactor () const |
| void | setFocusToWindow (SbBool flag) |
| SbBool | isFocusToWindow () const |
Static Public Member Functions | |
| static SbBool | isSpaceMousePresent () |
| static SbBool | exists () |
Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device.
This class manages events generated by the spaceball, including spaceball motion (SoMotion3Event), and spaceball button press and release events (SoSpaceballButtonEvent).
SoWinDevice, SoMotion3Event, SoSpaceballButtonEvent
| SoWinSpaceball::SoWinSpaceball | ( | SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL |
) |
Constructor.
| SoWinSpaceball::~SoWinSpaceball | ( | ) |
Destructor.
| virtual void SoWinSpaceball::disable | ( | SoWidget | w, | |
| XtEventHandler | f, | |||
| XtPointer | data | |||
| ) | [virtual] |
Disables the device.
Implements SoWinDevice.
| virtual void SoWinSpaceball::enable | ( | SoWidget | w, | |
| XtEventHandler | f, | |||
| XtPointer | data, | |||
| Window | win = NULL | |||
| ) | [virtual] |
Enables the device for the passed window handle. When enabled, the callback function f will be invoked when messages occur in the window. data is the clientData which will be passed.
Implements SoWinDevice.
| static SbBool SoWinSpaceball::exists | ( | ) | [static] |
Returns whether or not the spaceball device exists for use.
| float SoWinSpaceball::getRotationScaleFactor | ( | ) | const [inline] |
Returns the rotation scale factor.
| float SoWinSpaceball::getTranslationScaleFactor | ( | ) | const [inline] |
Returns the translation scale factor.
| SbBool SoWinSpaceball::isFocusToWindow | ( | ) | const [inline] |
Win32 does not support focus change.
This method is provided for source compatibility.
| static SbBool SoWinSpaceball::isSpaceMousePresent | ( | ) | [static] |
Used in glxWindowProc method from SoWinGLWidget and SoWinMPGLWidget.
| void SoWinSpaceball::setFocusToWindow | ( | SbBool | flag | ) | [inline] |
Win32 does not support focus change.
This method is provided for source compatibility.
| void SoWinSpaceball::setRotationScaleFactor | ( | float | f | ) | [inline] |
The spaceball reports rotations and translations as integers.
These values must be scaled to be useful. This method sets the rotation scale factor. Default is .006.
| void SoWinSpaceball::setTranslationScaleFactor | ( | float | f | ) | [inline] |
The spaceball reports rotations and translations as integers.
These values must be scaled to be useful. This method sets the translation the scale factor. Default is .006.
| virtual const SoEvent* SoWinSpaceball::translateEvent | ( | XAnyEvent * | xevent | ) | [virtual] |