Translates and reports events for a SpaceBall or SpaceMouse (Magellan) device. More...
#include <Inventor/Xt/devices/SoXtSpaceball.h>
Public Member Functions | |
| SoXtSpaceball (SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL) | |
| SoXtSpaceball (Display *d, SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL) | |
| ~SoXtSpaceball () | |
| virtual void | enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=0) |
| 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 | exists () |
| static SbBool | exists (Display *d) |
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).
| SoXtSpaceball::SoXtSpaceball | ( | SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL |
) |
Constructor.
| SoXtSpaceball::SoXtSpaceball | ( | Display * | d, | |
| SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL | |||
| ) |
Constructor.
| SoXtSpaceball::~SoXtSpaceball | ( | ) |
Destructor.
| virtual void SoXtSpaceball::disable | ( | SoWidget | w, | |
| XtEventHandler | f, | |||
| XtPointer | data | |||
| ) | [virtual] |
Disables this device for the passed widget.
The callback function f will be invoked when events occur in w. Data is the clientData which will be passed.
Implements SoXtDevice.
| virtual void SoXtSpaceball::enable | ( | SoWidget | w, | |
| XtEventHandler | f, | |||
| XtPointer | data, | |||
| Window | win = 0 | |||
| ) | [virtual] |
Enables this device for the passed widget.
The callback function f will be invoked when events occur in w. Data is the clientData which will be passed.
Implements SoXtDevice.
| static SbBool SoXtSpaceball::exists | ( | Display * | d | ) | [static] |
Returns whether or not the spaceball device exists for use.
| static SbBool SoXtSpaceball::exists | ( | ) | [inline, static] |
Returns whether or not the spaceball device exists for use.
| float SoXtSpaceball::getRotationScaleFactor | ( | ) | const [inline] |
Returns the rotation scale factor.
| float SoXtSpaceball::getTranslationScaleFactor | ( | ) | const [inline] |
Returns the translation scale factor.
| SbBool SoXtSpaceball::isFocusToWindow | ( | ) | const [inline] |
Gets the input focus method.
See setFocusToWindow() for details.
| void SoXtSpaceball::setFocusToWindow | ( | SbBool | flag | ) |
Sets the input focus method used to get events from the space ball.
If FALSE: SpaceBall events are received only if the cursor is in the window or when the window has the focus (default).
If TRUE: SpaceBall events are received even if cursor is out of the window.
| void SoXtSpaceball::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 SoXtSpaceball::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 scale factor. Default is .006.
| virtual const SoEvent* SoXtSpaceball::translateEvent | ( | XAnyEvent * | xevent | ) | [virtual] |
This converts a system event into an SoEvent, returning NULL if the event is not from this device.
Implements SoXtDevice.