Base class for all events.
More...
#include <Inventor/events/SoEvent.h>
|
| SoEvent () |
| Constructor and destructor.
|
|
virtual | ~SoEvent () |
| Constructor and destructor.
|
|
virtual SoType | getTypeId () const |
| Return the type id for this event instance.
|
|
bool | isOfType (SoType type) const |
| This returns TRUE if the event is an instance of or derived from an event of the passed type.
|
|
void | setTime (SbTime t) |
| Set the time at which the event occurred.
|
|
SbTime | getTime () const |
| Get the time at which the event occurred.
|
|
void | setPosition (const SbVec2s &p) |
| Set the window pixel location of the cursor when the event occurred.
|
|
const SbVec2s & | getPosition () const |
| Get position in pixel coodinates.
|
|
const SbVec2s & | getPosition (const SbViewportRegion &vpRgn) const |
| Get position relative to the specified viewport bounds.
|
|
const SbVec2f & | getNormalizedPosition (const SbViewportRegion &vpRgn) const |
| Get the normalized location of the cursor when the event occurred, relative to the specified viewport region.
|
|
void | setShiftDown (bool isDown) |
| Set whether the modifier keys were down when the event occurred.
|
|
void | setCtrlDown (bool isDown) |
| Set whether the modifier keys were down when the event occurred.
|
|
void | setAltDown (bool isDown) |
| Set whether the modifier keys were down when the event occurred.
|
|
bool | wasShiftDown () const |
| Get whether the modifier keys were down when the event occurred.
|
|
bool | wasCtrlDown () const |
| Get whether the modifier keys were down when the event occurred.
|
|
bool | wasAltDown () const |
| Get whether the modifier keys were down when the event occurred.
|
|
void | setMouseButtonMask (int mask) |
| Get which mouse buttons are currently pressed (as bit mask)
|
|
int | getMouseButtonMask () const |
| Set which mouse buttons are currently pressed.
|
|
SoEvent is the base class for events in the Inventor event model. An event typically represents a user action, such as a mouse button being pressed or a keyboard key being released. SoEvent contains general information found in all Inventor events, including the time the event occurred, the position of the locater when the event occurred, and the state of the modifier keys when the event occurred.
- See Also
- SoButtonEvent, SoKeyboardEvent, SoLocation2Event, SoMotion3Event, SoMouseButtonEvent, SoSpaceballButtonEvent, SoHandleEventAction, SoEventCallback, SoSelection, SoInteraction
Definition at line 84 of file SoEvent.h.
◆ MouseButtonsMask
Enumerator |
---|
NO_MOUSEBUTTON_MASK | |
LEFT_MOUSEBUTTON_MASK | |
MIDDLE_MOUSEBUTTON_MASK | |
RIGHT_MOUSEBUTTON_MASK | |
ALL_MOUSEBUTTONS_MASK | |
Definition at line 88 of file SoEvent.h.
◆ SoEvent()
◆ ~SoEvent()
virtual SoEvent::~SoEvent |
( |
| ) |
|
|
virtual |
◆ getClassTypeId()
static SoType SoEvent::getClassTypeId |
( |
| ) |
|
|
inlinestatic |
◆ getMouseButtonMask()
int SoEvent::getMouseButtonMask |
( |
| ) |
const |
|
inline |
◆ getNormalizedPosition()
The returned value will lie between 0.0 and 1.0.
◆ getPosition() [1/2]
const SbVec2s & SoEvent::getPosition |
( |
| ) |
const |
|
inline |
◆ getPosition() [2/2]
◆ getTime()
SbTime SoEvent::getTime |
( |
| ) |
const |
|
inline |
◆ getTypeId()
virtual SoType SoEvent::getTypeId |
( |
| ) |
const |
|
virtual |
◆ initClass()
static void SoEvent::initClass |
( |
| ) |
|
|
static |
◆ initClasses()
static void SoEvent::initClasses |
( |
| ) |
|
|
static |
◆ isOfType()
bool SoEvent::isOfType |
( |
SoType |
type | ) |
const |
◆ setAltDown()
void SoEvent::setAltDown |
( |
bool |
isDown | ) |
|
|
inline |
◆ setCtrlDown()
void SoEvent::setCtrlDown |
( |
bool |
isDown | ) |
|
|
inline |
◆ setMouseButtonMask()
void SoEvent::setMouseButtonMask |
( |
int |
mask | ) |
|
|
inline |
◆ setPosition()
void SoEvent::setPosition |
( |
const SbVec2s & |
p | ) |
|
|
inline |
The position is relative to the lower left corner of the window in which the event occurred.
Definition at line 119 of file SoEvent.h.
◆ setShiftDown()
void SoEvent::setShiftDown |
( |
bool |
isDown | ) |
|
|
inline |
◆ setTime()
void SoEvent::setTime |
( |
SbTime |
t | ) |
|
|
inline |
◆ wasAltDown()
bool SoEvent::wasAltDown |
( |
| ) |
const |
|
inline |
◆ wasCtrlDown()
bool SoEvent::wasCtrlDown |
( |
| ) |
const |
|
inline |
◆ wasShiftDown()
bool SoEvent::wasShiftDown |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file:
- C:/jh/mevislab/4.0.2_1/build/MeVis/ThirdParty/Sources/Inventor/include/Inventor/events/SoEvent.h