Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoSpaceballButtonEvent Class Reference

VSG extension Spaceball button press and release events. More...

#include <Inventor/events/SoSpaceballButtonEvent.h>

+ Inheritance diagram for SoSpaceballButtonEvent:

Public Types

enum  Button {
  ANY = 0 ,
  BUTTON1 = 1 ,
  BUTTON2 = 2 ,
  BUTTON3 = 3 ,
  BUTTON4 = 4 ,
  BUTTON5 = 5 ,
  BUTTON6 = 6 ,
  BUTTON7 = 7 ,
  BUTTON8 = 8 ,
  PICK = 9
}
 Button. More...
 
- Public Types inherited from SoButtonEvent
enum  State {
  UP ,
  DOWN ,
  DBCLK ,
  UNKNOWN
}
 State. More...
 

Public Member Functions

virtual SoType getTypeId () const
 Returns the type identifier for this specific instance.
 
 SoSpaceballButtonEvent ()
 Constructor.
 
void setButton (SoSpaceballButtonEvent::Button b)
 Sets which spaceball button generated the event.
 
SoSpaceballButtonEvent::Button getButton () const
 Gets which spaceball button generated the event.
 
- Public Member Functions inherited from SoButtonEvent
 SoButtonEvent ()
 Constructor.
 
void setState (SoButtonEvent::State s)
 Sets the state of the button.
 
SoButtonEvent::State getState () const
 Gets the state of the button.
 
- Public Member Functions inherited from SoEvent
 SoEvent ()
 Constructor.
 
virtual ~SoEvent ()
 Destructor.
 
virtual void setTime (SbTime t)
 Sets the time at which the event occurred.
 
SbTime getTime () const
 Gets the time at which the event occurred.
 
virtual void setPosition (const SbVec2s &p)
 Sets the window pixel location of the cursor when the event occurred.
 
virtual void setPosition (const SbVec2f &p)
 Float version of setPosition(const SbVec2s &p).
 
const SbVec2sgetPosition () const
 Returns the window pixel location of the cursor when the event occurred as integer values.
 
const SbVec2fgetPositionFloat () const
 Returns the window pixel location of the cursor when the event occurred as float values.
 
const SbVec2sgetPosition (const SbViewportRegion &vpRgn) const
 Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values.
 
const SbVec2fgetPositionFloat (const SbViewportRegion &vpRgn) const
 Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values.
 
const SbVec2fgetNormalizedPosition (const SbViewportRegion &vpRgn) const
 Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region.
 
void setShiftDown (SbBool isDown)
 Sets whether the shift key was down when the event occurred.
 
void setCtrlDown (SbBool isDown)
 Sets whether the CTRL key was down when the event occurred.
 
void setAltDown (SbBool isDown)
 Sets whether the ALT key was down when the event occurred.
 
void setButton1Down (SbBool isDown)
 Sets whether mouse Button 1 was down when the event occurred.
 
SbBool wasShiftDown () const
 Returns true if the shift key was down when the event occurred.
 
SbBool wasCtrlDown () const
 Returns true if the CTRL key was down when the event occurred.
 
SbBool wasAltDown () const
 Returns true if the ALT key was down when the event occurred.
 
SbBool wasButton1Down () const
 Returns true if mouse button 1 was down when the event occurred.
 
virtual const SbTrackerInfogetTrackerInfo () const
 Gets whether an event object has associated tracker information.
 
SbTrackerInfogetTrackerInfo ()
 Gets whether an event object has associated tracker information.
 
- Public Member Functions inherited from SoTypedObject
SbBool isOfType (const SoType &type) const
 Returns TRUE if this object is of the type specified in type or is derived from that type.
 
template<typename TypedObjectClass >
SbBool isOfType () const
 Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class.
 

Static Public Member Functions

static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
static SbBool isButtonPressEvent (const SoEvent *e, SoSpaceballButtonEvent::Button whichButton)
 Returns whether the passed event is a spaceball button press event of the passed button.
 
static SbBool isButtonReleaseEvent (const SoEvent *e, SoSpaceballButtonEvent::Button whichButton)
 Returns whether the passed event is a spaceball button release event of the passed button.
 
- Static Public Member Functions inherited from SoButtonEvent
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 
- Static Public Member Functions inherited from SoEvent
static SoType getClassTypeId ()
 Returns the type id for the SoEvent class.
 
- Static Public Member Functions inherited from SoTypedObject
static SoType getClassTypeId ()
 Returns the type identifier for this class.
 

Detailed Description

VSG extension Spaceball button press and release events.

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

Some convenience macros for determining if an event matches

  • SO_SPACEBALL_PRESS_EVENT(EVENT,BUTTON)
  • SO_SPACEBALL_RELEASE_EVENT(EVENT,BUTTON)

SEE ALSO

SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice

Definition at line 95 of file SoSpaceballButtonEvent.h.

Member Enumeration Documentation

◆ Button

Button.

Enumerator
ANY 
BUTTON1 

Spaceball button 1.

BUTTON2 

Spaceball button 2.

BUTTON3 

Spaceball button 3.

BUTTON4 

Spaceball button 4.

BUTTON5 

Spaceball button 5.

BUTTON6 

Spaceball button 6.

BUTTON7 

Spaceball button 7.

BUTTON8 

Spaceball button 8.

PICK 

Spaceball pick button.

Definition at line 101 of file SoSpaceballButtonEvent.h.

Constructor & Destructor Documentation

◆ SoSpaceballButtonEvent()

SoSpaceballButtonEvent::SoSpaceballButtonEvent ( )

Constructor.

Member Function Documentation

◆ getButton()

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

Gets which spaceball button generated the event.

Definition at line 158 of file SoSpaceballButtonEvent.h.

◆ getClassTypeId()

static SoType SoSpaceballButtonEvent::getClassTypeId ( )
static

Returns the type identifier for this class.


◆ getTypeId()

virtual SoType SoSpaceballButtonEvent::getTypeId ( ) const
virtual

Returns the type identifier for this specific instance.

Reimplemented from SoButtonEvent.

◆ isButtonPressEvent()

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

Returns whether the passed event is a spaceball button press event of the passed button.

When SoSpaceballButtonEvent::ANY is passed, this returns TRUE if the event represents a button press of any spaceball button.

◆ isButtonReleaseEvent()

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

Returns whether the passed event is a spaceball button release event of the passed button.

When SoSpaceballButtonEvent::ANY is passed, this returns TRUE if the event represents a button release of any spaceball button.

◆ setButton()

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

Sets which spaceball button generated the event.

Definition at line 153 of file SoSpaceballButtonEvent.h.


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