Mouse button press and release events. More...
#include <Inventor/events/SoMouseButtonEvent.h>
Public Types | |
enum | Button { ANY = 0, BUTTON1 = 1, BUTTON2 = 2, BUTTON3 = 3 } |
Public Member Functions | |
virtual SoType | getTypeId () const |
SoMouseButtonEvent () | |
void | setButton (SoMouseButtonEvent::Button b) |
SoMouseButtonEvent::Button | getButton () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
static SbBool | isButtonPressEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton) |
static SbBool | isButtonDoubleClickEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton) |
static SbBool | isButtonReleaseEvent (const SoEvent *e, SoMouseButtonEvent::Button whichButton) |
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
SoMouseButtonEvent::SoMouseButtonEvent | ( | ) |
Constructor.
SoMouseButtonEvent::Button SoMouseButtonEvent::getButton | ( | ) | const [inline] |
Gets which mouse button generated the event.
static SoType SoMouseButtonEvent::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoButtonEvent.
virtual SoType SoMouseButtonEvent::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Reimplemented from SoButtonEvent.
static SbBool SoMouseButtonEvent::isButtonDoubleClickEvent | ( | const SoEvent * | e, | |
SoMouseButtonEvent::Button | whichButton | |||
) | [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 SbBool SoMouseButtonEvent::isButtonPressEvent | ( | const SoEvent * | e, | |
SoMouseButtonEvent::Button | whichButton | |||
) | [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 SbBool SoMouseButtonEvent::isButtonReleaseEvent | ( | const SoEvent * | e, | |
SoMouseButtonEvent::Button | whichButton | |||
) | [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.
void SoMouseButtonEvent::setButton | ( | SoMouseButtonEvent::Button | b | ) | [inline] |
Sets which mouse button generated the event.