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) | |
Constructor. | |
SoXtSpaceball (Display *d, SoGuiSpaceball::Mask mask=SoGuiSpaceball::ALL) | |
Constructor. | |
~SoXtSpaceball () | |
Destructor. | |
virtual void | enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=0) |
Enables this device for the passed widget. | |
virtual void | disable (SoWidget w, XtEventHandler f, XtPointer data) |
Disables this device for the passed widget. | |
virtual const SoEvent * | translateEvent (XAnyEvent *xevent) |
This converts a system event into an SoEvent, returning NULL if the event is not from this device. | |
void | setRotationScaleFactor (float f) |
The spaceball reports rotations and translations as integers. | |
float | getRotationScaleFactor () const |
Returns the rotation scale factor. | |
void | setTranslationScaleFactor (float f) |
The spaceball reports rotations and translations as integers. | |
float | getTranslationScaleFactor () const |
Returns the translation scale factor. | |
void | setFocusToWindow (SbBool flag) |
Sets the input focus method used to get events from the space ball. | |
SbBool | isFocusToWindow () const |
Gets the input focus method. | |
Public Member Functions inherited from SoXtDevice | |
void | setWindowSize (const SbVec2s &s) |
Sets the size of the window this device is registered for. | |
const SbVec2s & | getWindowSize () const |
Gets the size of the window this device is registered for. | |
virtual | ~SoXtDevice () |
Static Public Member Functions | |
static SbBool | exists () |
Returns whether or not the spaceball device exists for use. | |
static SbBool | exists (Display *d) |
Returns whether or not the spaceball device exists for use. | |
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).
Definition at line 81 of file SoXtSpaceball.h.
SoXtSpaceball::SoXtSpaceball | ( | SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL | ) |
Constructor.
SoXtSpaceball::SoXtSpaceball | ( | Display * | d, |
SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL |
||
) |
Constructor.
SoXtSpaceball::~SoXtSpaceball | ( | ) |
Destructor.
|
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 |
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.
|
inlinestatic |
Returns whether or not the spaceball device exists for use.
Definition at line 153 of file SoXtSpaceball.h.
|
static |
Returns whether or not the spaceball device exists for use.
|
inline |
Returns the rotation scale factor.
Definition at line 138 of file SoXtSpaceball.h.
|
inline |
Returns the translation scale factor.
Definition at line 148 of file SoXtSpaceball.h.
|
inline |
Gets the input focus method.
See setFocusToWindow() for details.
Definition at line 169 of file SoXtSpaceball.h.
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.
|
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.
Definition at line 134 of file SoXtSpaceball.h.
|
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.
Definition at line 144 of file SoXtSpaceball.h.
|
virtual |
This converts a system event into an SoEvent, returning NULL if the event is not from this device.
Implements SoXtDevice.