| 1 |
NAME SoMouseButtonEvent SoMouseEv SO_MOUSE_EV_ { mouse button press and release events } |
| 2 |
|
| 3 |
INCLUDE events/SoMouseButtonEvent.h |
| 4 |
|
| 5 |
DESC { \cSoMouseButtonEvent\. represents mouse button press and release events |
| 6 |
in the Inventor event model. |
| 7 |
} |
| 8 |
|
| 9 |
ENUM Button { |
| 10 |
ANY "Any button", |
| 11 |
BUTTON1 "First mouse button", |
| 12 |
BUTTON2 "Second mouse button", |
| 13 |
BUTTON3 "Third mouse button" |
| 14 |
} |
| 15 |
|
| 16 |
BEGIN C++ |
| 17 |
DEFINE { SO_MOUSE_PRESS_EVENT(EVENT,BUTTON) |
| 18 |
(SoMouseButtonEvent::isButtonPressEvent(EVENT,SoMouseButtonEvent::BUTTON)) } |
| 19 |
DEFINE { SO_MOUSE_RELEASE_EVENT(EVENT,BUTTON) |
| 20 |
(SoMouseButtonEvent::isButtonReleaseEvent(EVENT,SoMouseButtonEvent::BUTTON)) } |
| 21 |
END |
| 22 |
BEGIN C |
| 23 |
DEFINE { SO_MOUSE_PRESS_EV(EVENT,BUTTON) |
| 24 |
(SoMouseEvIsBtnPressEv(EVENT,BUTTON)) } |
| 25 |
DEFINE { SO_MOUSE_RELEASE_EV(EVENT,BUTTON) |
| 26 |
(SoMouseEvIsBtnReleaseEv(EVENT,BUTTON)) } |
| 27 |
END |
| 28 |
|
| 29 |
METHOD "" SoMouseButtonEvent() { Constructor. } |
| 30 |
|
| 31 |
METHOD "" static SoType getClassTypeId() { |
| 32 |
Return the type id for the \cSoMouseButtonEvent\. class. |
| 33 |
} |
| 34 |
|
| 35 |
BEGIN C++ |
| 36 |
METHOD "setBtn" void setButton(SoMouseButtonEvent::Button b) {} |
| 37 |
METHOD "getBtn" SoMouseButtonEvent::Button getButton() const |
| 38 |
{ Set and get which mouse button generated the event. } |
| 39 |
END |
| 40 |
BEGIN C |
| 41 |
METHOD "setBtn" void setButton(SoMouseButtonEventButton b) {} |
| 42 |
METHOD "getBtn" SoMouseButtonEventButton getButton() const |
| 43 |
{ Set and get which mouse button generated the event. } |
| 44 |
END |
| 45 |
|
| 46 |
BEGIN C++ |
| 47 |
METHOD "isBtnPressEv" static SbBool isButtonPressEvent( |
| 48 |
const SoEvent *e, |
| 49 |
SoMouseButtonEvent::Button whichButton) {} |
| 50 |
METHOD "isBtnReleaseEv" static SbBool isButtonReleaseEvent( |
| 51 |
const SoEvent *e, |
| 52 |
SoMouseButtonEvent::Button whichButton) |
| 53 |
{ Returns whether the passed event is a mouse button press or release event |
| 54 |
of the passed button. When \mSoMouseButtonEvent::ANY\. is passed, |
| 55 |
this returns TRUE if the event represents a button press |
| 56 |
or release of any mouse button. } |
| 57 |
END |
| 58 |
BEGIN C |
| 59 |
METHOD "isBtnPressEv" static SbBool isButtonPressEvent( |
| 60 |
const SoEvent *e, |
| 61 |
SoMouseButtonEventButton whichButton) {} |
| 62 |
METHOD "isBtnReleaseEv" static SbBool isButtonReleaseEvent( |
| 63 |
const SoEvent *e, |
| 64 |
SoMouseButtonEventButton whichButton) |
| 65 |
{ Returns whether the passed event is a mouse button press or release event |
| 66 |
of the passed button. When \eSO_MOUSE_EV_ANY\. is passed, |
| 67 |
this returns \eTRUE\. if the event represents a button press |
| 68 |
or release of any mouse button. } |
| 69 |
END |
| 70 |
|
| 71 |
ALSO { |
| 72 |
SoEvent, SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, |
| 73 |
SoSpaceballButtonEvent, |
| 74 |
SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction, |
| 75 |
SoXtDevice } |
| 76 |
|
| 77 |
|
| 78 |
|