1SoMouseButtonEvent(3IV)()                            SoMouseButtonEvent(3IV)()
2
3
4

NAME

6       SoMouseButtonEvent — mouse button press and release events
7

INHERITS FROM

9       SoEvent > SoButtonEvent > SoMouseButtonEvent
10

SYNOPSIS

12       #include <Inventor/events/SoMouseButtonEvent.h>
13
14       #define SO_MOUSE_PRESS_EVENT(EVENT,BUTTON)
15           (SoMouseButtonEvent::isButtonPressEvent(EVENT,SoMouseButton‐
16       Event::BUTTON))
17       #define SO_MOUSE_RELEASE_EVENT(EVENT,BUTTON)
18           (SoMouseButtonEvent::isButtonReleaseEvent(EVENT,SoMouseButton‐
19       Event::BUTTON))
20
21     enum Button {
22          SoMouseButtonEvent::ANY      Any button
23          SoMouseButtonEvent::BUTTON1  First mouse button
24          SoMouseButtonEvent::BUTTON2  Second mouse button
25          SoMouseButtonEvent::BUTTON3  Third mouse button
26     }
27
28          Methods from class SoMouseButtonEvent:
29
30                                 SoMouseButtonEvent()
31     static SoType               getClassTypeId()
32     void                        setButton(SoMouseButtonEvent::Button b)
33     SoMouseButtonEvent::Button  getButton() const
34     static SbBool               isButtonPressEvent(const SoEvent *e, SoMouse‐
35                                      ButtonEvent::Button whichButton)
36     static   SbBool               isButtonReleaseEvent(const   SoEvent    *e,
37                                      SoMouseButtonEvent::Button whichButton)
38
39          Methods from class SoButtonEvent:
40
41     void                  setState(SoButtonEvent::State s)
42     SoButtonEvent::State  getState() const
43
44          Methods from class SoEvent:
45
46     virtual SoType      getTypeId() const
47     SbBool              isOfType(SoType type) const
48     void                setTime(SbTime t)
49     SbTime              getTime() const
50     void                setPosition(const SbVec2s &p)
51     const SbVec2s &     getPosition() const
52     const SbVec2s &     getPosition(const SbViewportRegion &vpRgn) const
53     const  SbVec2f &     getNormalizedPosition(const SbViewportRegion &vpRgn)
54                              const
55     void                setShiftDown(SbBool isDown)
56     void                setCtrlDown(SbBool isDown)
57     void                setAltDown(SbBool isDown)
58     SbBool              wasShiftDown() const
59     SbBool              wasCtrlDown() const
60     SbBool              wasAltDown() const
61
62

DESCRIPTION

64       SoMouseButtonEvent represents mouse button press and release events  in
65       the Inventor event model.
66

METHODS

68                                 SoMouseButtonEvent()
69          Constructor.
70
71     static SoType               getClassTypeId()
72          Return the type id for the SoMouseButtonEvent class.
73
74     void                        setButton(SoMouseButtonEvent::Button b)
75     SoMouseButtonEvent::Button  getButton() const
76          Set and get which mouse button generated the event.
77
78     static SbBool               isButtonPressEvent(const SoEvent *e, SoMouse‐
79                                      ButtonEvent::Button whichButton)
80     static   SbBool               isButtonReleaseEvent(const   SoEvent    *e,
81                                      SoMouseButtonEvent::Button whichButton)
82          Returns  whether the passed event is a mouse button press or release
83          event of the passed button. When SoMouseButtonEvent::ANY is  passed,
84          this  returns TRUE if the event represents a button press or release
85          of any mouse button.
86
87

SEE ALSO

89       SoEvent,  SoButtonEvent,   SoKeyboardEvent,   SoLocation2Event,   SoMo‐
90       tion3Event,  SoSpaceballButtonEvent,  SoHandleEventAction, SoEventCall‐
91       back, SoSelection, SoInteraction, SoXtDevice
92
93
94
95
96                                                     SoMouseButtonEvent(3IV)()
Impressum