Coin Logo http://www.sim.no
http://www.coin3d.org

SoXtSpaceball Class Reference
[Xt Device Classes]

#include <Inventor/Xt/devices/SoXtSpaceball.h>

Inheritance diagram for SoXtSpaceball:

SoXtDevice SoXtObject List of all members.

Detailed Description

The SoXtSpaceball class is the spaceball input device abstraction.

The SoXtSpaceball class is the glue between native spaceball handling and how those events translates to generic events for the Inventor API scenegraph.


Public Types

 MOTION_EVENT = 0x01
 MOTION = MOTION_EVENT
 PRESS_EVENT = 0x02
 PRESS = PRESS_EVENT
 RELEASE_EVENT = 0x04
 RELEASE = RELEASE_EVENT
 ALL_EVENTS = MOTION_EVENT | PRESS_EVENT | RELEASE_EVENT
 ALL = ALL_EVENTS
 SPACE_BALL = 0x01
 MAGELLAN_SPACE_MOUSE = 0x02
enum  Mask {
  MOTION_EVENT = 0x01, MOTION = MOTION_EVENT, PRESS_EVENT = 0x02, PRESS = PRESS_EVENT,
  RELEASE_EVENT = 0x04, RELEASE = RELEASE_EVENT, ALL_EVENTS = MOTION_EVENT | PRESS_EVENT | RELEASE_EVENT, ALL = ALL_EVENTS
}
enum  DeviceType { SPACE_BALL = 0x01, MAGELLAN_SPACE_MOUSE = 0x02 }

Public Member Functions

 SoXtSpaceball (int events=ALL_EVENTS)
virtual ~SoXtSpaceball ()
virtual void enable (Widget widget, SoXtEventHandler *handler, void *closure)
virtual void disable (Widget widget, SoXtEventHandler *handler, void *closure)
virtual const SoEvent * translateEvent (XAnyEvent *event)
void setRotationScaleFactor (float f)
float getRotationScaleFactor (void) const
void setTranslationScaleFactor (float f)
float getTranslationScaleFactor (void) const
void setFocusToWindow (SbBool flag)
SbBool isFocusToWindow (void) const

Static Public Member Functions

static SbBool exists (void)


Member Enumeration Documentation

enum SoXtSpaceball::Mask

Enumeration of spaceball input device event types.

enum SoXtSpaceball::DeviceType

Enumeration of spaceball input device types.


Constructor & Destructor Documentation

SoXtSpaceball::SoXtSpaceball ( int  mask = ALL_EVENTS  ) 

Public constructor. The mask argument specifies which events we are interested in.

SoXtSpaceball::~SoXtSpaceball (  )  [virtual]

Destructor.


Member Function Documentation

void SoXtSpaceball::enable ( Widget  widget,
SoXtEventHandler *  handler,
void *  closure 
) [virtual]

This method will enable the device for the widget.

handler is invoked with the closure argument when an event occur in widget.

Implements SoXtDevice.

void SoXtSpaceball::disable ( Widget  widget,
SoXtEventHandler *  handler,
void *  closure 
) [virtual]

This method will disable the handler for the device.

Implements SoXtDevice.

const SoEvent * SoXtSpaceball::translateEvent ( XAnyEvent *  event  )  [virtual]

This method translates from native events to Open Inventor SoEvent events.

Implements SoXtDevice.

void SoXtSpaceball::setRotationScaleFactor ( float  f  ) 

This method sets the scale factor for the spaceball rotation vectors.

float SoXtSpaceball::getRotationScaleFactor ( void   )  const

This method returns the scale factor for the spaceball rotation vectors.

void SoXtSpaceball::setTranslationScaleFactor ( float  f  ) 

This method sets the scale factor for the spaceball translation vectors.

float SoXtSpaceball::getTranslationScaleFactor ( void   )  const

This method returns the scale factor for the spaceball translation vectors.

SbBool SoXtSpaceball::exists ( void   )  [static]

Returns TRUE iff there could be a device of this type available on the system.

Note that a return value of TRUE does not signify that there is such a device active.

void SoXtSpaceball::setFocusToWindow ( SbBool  flag  ) 

Set to TRUE if you want spaceball events to be received even when the component does not have focus.

SbBool SoXtSpaceball::isFocusToWindow ( void   )  const

Returns whether or not spaceball events are caught even when the component does not have focus.


The documentation for this class was generated from the following files:

Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.

Generated on Tue Dec 2 23:15:46 2008 for SoXt by Doxygen. 1.4.7