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) | |
Constructor. | |
~SoWinSpaceball () | |
Destructor. | |
virtual void | enable (SoWidget w, XtEventHandler f, XtPointer data, Window win=NULL) |
Enables the device for the passed window handle. | |
virtual void | disable (SoWidget w, XtEventHandler f, XtPointer data) |
Disables the device. | |
virtual const SoEvent * | translateEvent (XAnyEvent *xevent) |
Attempts to convert the passed message into an SoEvent. | |
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) |
Win32 does not support focus change. | |
SbBool | isFocusToWindow () const |
Win32 does not support focus change. | |
Public Member Functions inherited from SoWinDevice | |
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. | |
Static Public Member Functions | |
static SbBool | isSpaceMousePresent () |
Used in glxWindowProc method from SoWinGLWidget and SoWinMPGLWidget. | |
static SbBool | exists () |
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).
SoWinDevice, SoMotion3Event, SoSpaceballButtonEvent
Definition at line 55 of file SoWinSpaceball.h.
SoWinSpaceball::SoWinSpaceball | ( | SoGuiSpaceball::Mask | mask = SoGuiSpaceball::ALL | ) |
Constructor.
SoWinSpaceball::~SoWinSpaceball | ( | ) |
Destructor.
|
virtual |
Disables the device.
Implements SoWinDevice.
|
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 |
Returns whether or not the spaceball device exists for use.
|
inline |
Returns the rotation scale factor.
Definition at line 104 of file SoWinSpaceball.h.
|
inline |
Returns the translation scale factor.
Definition at line 116 of file SoWinSpaceball.h.
|
inline |
Win32 does not support focus change.
This method is provided for source compatibility.
Definition at line 133 of file SoWinSpaceball.h.
|
static |
Used in glxWindowProc method from SoWinGLWidget and SoWinMPGLWidget.
|
inline |
Win32 does not support focus change.
This method is provided for source compatibility.
Definition at line 127 of file SoWinSpaceball.h.
|
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 99 of file SoWinSpaceball.h.
|
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.
Definition at line 111 of file SoWinSpaceball.h.
Attempts to convert the passed message into an SoEvent.
Returns a pointer to an internal SoEvent object owned by the class. Do not delete this object. If the message was not generated by this device, then NULL is returned.
Implements SoWinDevice.