Open Inventor Reference
SoEvent Class Reference

Base class for all events. More...

#include <Inventor/events/SoEvent.h>

Inheritance diagram for SoEvent:
SoButtonEvent SoLocation2Event SoMotion3Event SoMouseWheelEvent SoKeyboardEvent SoMouseButtonEvent SoSpaceballButtonEvent

List of all members.

Public Member Functions

 SoEvent ()
 Constructor and destructor.
virtual ~SoEvent ()
 Constructor and destructor.
virtual SoType getTypeId () const
 Return the type id for this event instance.
SbBool 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 SbVec2sgetPosition () const
 Get position in pixel coodinates.
const SbVec2sgetPosition (const SbViewportRegion &vpRgn) const
 Get position relative to the specified viewport bounds.
const SbVec2fgetNormalizedPosition (const SbViewportRegion &vpRgn) const
 Get the normalized location of the cursor when the event occurred, relative to the specified viewport region.
void setShiftDown (SbBool isDown)
 Set whether the modifier keys were down when the event occurred.
void setCtrlDown (SbBool isDown)
 Set whether the modifier keys were down when the event occurred.
void setAltDown (SbBool isDown)
 Set whether the modifier keys were down when the event occurred.
SbBool wasShiftDown () const
 Get whether the modifier keys were down when the event occurred.
SbBool wasCtrlDown () const
 Get whether the modifier keys were down when the event occurred.
SbBool wasAltDown () const
 Get whether the modifier keys were down when the event occurred.

Static Public Member Functions

static SoType getClassTypeId ()
 Return the type id for the SoEvent class.
static void initClass ()
 Initializes base event class.
static void initClasses ()
 Initialize ALL Inventor event classes.

Detailed Description

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.


Constructor & Destructor Documentation

SoEvent::SoEvent ( )
virtual SoEvent::~SoEvent ( ) [virtual]

Member Function Documentation

static SoType SoEvent::getClassTypeId ( ) [inline, static]

Definition at line 96 of file SoEvent.h.

const SbVec2f& SoEvent::getNormalizedPosition ( const SbViewportRegion vpRgn) const

The returned value will lie between 0.0 and 1.0.

const SbVec2s& SoEvent::getPosition ( const SbViewportRegion vpRgn) const
const SbVec2s& SoEvent::getPosition ( ) const [inline]

Definition at line 113 of file SoEvent.h.

SbTime SoEvent::getTime ( ) const [inline]

Definition at line 105 of file SoEvent.h.

virtual SoType SoEvent::getTypeId ( ) const [virtual]
static void SoEvent::initClass ( ) [static]
static void SoEvent::initClasses ( ) [static]
SbBool SoEvent::isOfType ( SoType  type) const
void SoEvent::setAltDown ( SbBool  isDown) [inline]

Definition at line 128 of file SoEvent.h.

void SoEvent::setCtrlDown ( SbBool  isDown) [inline]

Definition at line 126 of file SoEvent.h.

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 110 of file SoEvent.h.

void SoEvent::setShiftDown ( SbBool  isDown) [inline]

Definition at line 124 of file SoEvent.h.

void SoEvent::setTime ( SbTime  t) [inline]

Definition at line 103 of file SoEvent.h.

SbBool SoEvent::wasAltDown ( ) const [inline]

Definition at line 135 of file SoEvent.h.

SbBool SoEvent::wasCtrlDown ( ) const [inline]

Definition at line 133 of file SoEvent.h.

SbBool SoEvent::wasShiftDown ( ) const [inline]

Definition at line 131 of file SoEvent.h.


The documentation for this class was generated from the following file: