Open Inventor Reference
SoSpaceballButtonEvent Class Reference

Spaceball button press and release events. More...

#include <Inventor/events/SoSpaceballButtonEvent.h>

Inheritance diagram for SoSpaceballButtonEvent:
SoButtonEvent SoEvent

Public Types

enum  Button {
  ANY = 0 , BUTTON1 = 1 , BUTTON2 = 2 , BUTTON3 = 3 ,
  BUTTON4 = 4 , BUTTON5 = 5 , BUTTON6 = 6 , BUTTON7 = 7 ,
  BUTTON8 = 8 , PICK = 9
}
 
- Public Types inherited from SoButtonEvent
enum  State { UP , DOWN , UNKNOWN }
 
- Public Types inherited from SoEvent
enum  MouseButtonsMask {
  NO_MOUSEBUTTON_MASK = 0 , LEFT_MOUSEBUTTON_MASK = 1 , MIDDLE_MOUSEBUTTON_MASK = 2 , RIGHT_MOUSEBUTTON_MASK = 4 ,
  ALL_MOUSEBUTTONS_MASK = LEFT_MOUSEBUTTON_MASK + MIDDLE_MOUSEBUTTON_MASK + RIGHT_MOUSEBUTTON_MASK
}
 This describes the bit mask values of setButtonMask and getButtonMask. More...
 

Public Member Functions

 SoSpaceballButtonEvent ()
 Constructor. More...
 
virtual ~SoSpaceballButtonEvent ()
 
void setButton (SoSpaceballButtonEvent::Button b)
 which button generated the event, e.g. SoSpaceballButtonEvent::BUTTON1 More...
 
SoSpaceballButtonEvent::Button getButton () const
 
- Public Member Functions inherited from SoButtonEvent
 SoButtonEvent ()
 Constructor. More...
 
virtual ~SoButtonEvent ()
 
void setState (SoButtonEvent::State s)
 get state of the button More...
 
SoButtonEvent::State getState () const
 
- Public Member Functions inherited from SoEvent
 SoEvent ()
 Constructor and destructor. More...
 
virtual ~SoEvent ()
 Constructor and destructor. More...
 
virtual SoType getTypeId () const
 Return the type id for this event instance. More...
 
bool isOfType (SoType type) const
 This returns TRUE if the event is an instance of or derived from an event of the passed type. More...
 
void setTime (SbTime t)
 Set the time at which the event occurred. More...
 
SbTime getTime () const
 Get the time at which the event occurred. More...
 
void setPosition (const SbVec2s &p)
 Set the window pixel location of the cursor when the event occurred. More...
 
const SbVec2sgetPosition () const
 Get position in pixel coodinates. More...
 
const SbVec2sgetPosition (const SbViewportRegion &vpRgn) const
 Get position relative to the specified viewport bounds. More...
 
const SbVec2fgetNormalizedPosition (const SbViewportRegion &vpRgn) const
 Get the normalized location of the cursor when the event occurred, relative to the specified viewport region. More...
 
void setShiftDown (bool isDown)
 Set whether the modifier keys were down when the event occurred. More...
 
void setCtrlDown (bool isDown)
 Set whether the modifier keys were down when the event occurred. More...
 
void setAltDown (bool isDown)
 Set whether the modifier keys were down when the event occurred. More...
 
bool wasShiftDown () const
 Get whether the modifier keys were down when the event occurred. More...
 
bool wasCtrlDown () const
 Get whether the modifier keys were down when the event occurred. More...
 
bool wasAltDown () const
 Get whether the modifier keys were down when the event occurred. More...
 
void setMouseButtonMask (int mask)
 Get which mouse buttons are currently pressed (as bit mask) More...
 
int getMouseButtonMask () const
 Set which mouse buttons are currently pressed. More...
 

Static Public Member Functions

static bool isButtonPressEvent (const SoEvent *e, SoSpaceballButtonEvent::Button whichButton)
 convenience routines to see if an SoEvent is a press or release of the passed spaceball button More...
 
static bool isButtonReleaseEvent (const SoEvent *e, SoSpaceballButtonEvent::Button whichButton)
 
static void initClass ()
 
- Static Public Member Functions inherited from SoButtonEvent
static void initClass ()
 
- Static Public Member Functions inherited from SoEvent
static SoType getClassTypeId ()
 Return the type id for the SoEvent class. More...
 
static void initClass ()
 Initializes base event class. More...
 
static void initClasses ()
 Initialize ALL Inventor event classes. More...
 

Detailed Description

SoSpaceballButtonEvent represents spaceball button press and release events in the Inventor event model.

See Also
SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction

Definition at line 87 of file SoSpaceballButtonEvent.h.

Member Enumeration Documentation

◆ Button

Enumerator
ANY 
BUTTON1 
BUTTON2 
BUTTON3 
BUTTON4 
BUTTON5 
BUTTON6 
BUTTON7 
BUTTON8 
PICK 

Definition at line 92 of file SoSpaceballButtonEvent.h.

Constructor & Destructor Documentation

◆ SoSpaceballButtonEvent()

SoSpaceballButtonEvent::SoSpaceballButtonEvent ( )

◆ ~SoSpaceballButtonEvent()

virtual SoSpaceballButtonEvent::~SoSpaceballButtonEvent ( )
virtual

Member Function Documentation

◆ getButton()

SoSpaceballButtonEvent::Button SoSpaceballButtonEvent::getButton ( ) const
inline

Definition at line 112 of file SoSpaceballButtonEvent.h.

◆ initClass()

static void SoSpaceballButtonEvent::initClass ( )
static

◆ isButtonPressEvent()

static bool SoSpaceballButtonEvent::isButtonPressEvent ( const SoEvent e,
SoSpaceballButtonEvent::Button  whichButton 
)
static

◆ isButtonReleaseEvent()

static bool SoSpaceballButtonEvent::isButtonReleaseEvent ( const SoEvent e,
SoSpaceballButtonEvent::Button  whichButton 
)
static

◆ setButton()

void SoSpaceballButtonEvent::setButton ( SoSpaceballButtonEvent::Button  b)
inline

Definition at line 110 of file SoSpaceballButtonEvent.h.


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