Mouse button press and release events. More...
#include <Inventor/events/SoMouseButtonEvent.h>
Public Types | |
enum | Button { ANY = 0 , BUTTON1 = 1 , BUTTON2 = 2 , BUTTON3 = 3 } |
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. | |
SoMouseButtonEvent () | |
Constructor. | |
void | setButton (SoMouseButtonEvent::Button b) |
Sets which mouse button generated the event. | |
SoMouseButtonEvent::Button | getButton () const |
Gets which mouse 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 SbVec2s & | getPosition () const |
Returns the window pixel location of the cursor when the event occurred as integer values. | |
const SbVec2f & | getPositionFloat () const |
Returns the window pixel location of the cursor when the event occurred as float values. | |
const SbVec2s & | getPosition (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 SbVec2f & | getPositionFloat (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 SbVec2f & | getNormalizedPosition (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 SbTrackerInfo * | getTrackerInfo () const |
Gets whether an event object has associated tracker information. | |
SbTrackerInfo * | getTrackerInfo () |
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, SoMouseButtonEvent::Button whichButton) |
Returns whether the passed event is a mouse button press event of the passed button. | |
static SbBool | isButtonDoubleClickEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton) |
Returns whether the passed event is a mouse button double click event of the passed button. | |
static SbBool | isButtonReleaseEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton) |
Returns whether the passed event is a mouse 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. | |
Mouse button press and release events.
SoMouseButtonEvent represents mouse button press and release events in the Open Inventor event model.
Some convenience macros for determining if an event matches
Mouse event can only have one state: Press, Release or DoubleClick.
Mouse move events are represented by an SoLocation2Event.
Add an SoEventCallback node to the scene graph to handle Open Inventor events.
SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, SoWinDevice
Definition at line 104 of file SoMouseButtonEvent.h.
Button.
Enumerator | |
---|---|
ANY | Any button. |
BUTTON1 | First mouse button. |
BUTTON2 | Second mouse button. |
BUTTON3 | Third mouse button. |
Definition at line 111 of file SoMouseButtonEvent.h.
SoMouseButtonEvent::SoMouseButtonEvent | ( | ) |
Constructor.
|
inline |
Gets which mouse button generated the event.
Definition at line 146 of file SoMouseButtonEvent.h.
|
static |
Returns the type identifier for this class.
|
virtual |
Returns the type identifier for this specific instance.
Reimplemented from SoButtonEvent.
|
static |
Returns whether the passed event is a mouse button double click event of the passed button.
When SoMouseButtonEvent::ANY is passed, this returns TRUE if the event represents a double click of any mouse button.
|
static |
Returns whether the passed event is a mouse button press event of the passed button.
When SoMouseButtonEvent::ANY is passed, this returns TRUE if the event represents a button press of any mouse button.
|
static |
Returns whether the passed event is a mouse button release event of the passed button.
When SoMouseButtonEvent::ANY is passed, this returns TRUE if the event represents a button release of any mouse button.
|
inline |
Sets which mouse button generated the event.
Definition at line 142 of file SoMouseButtonEvent.h.