SoEvent — base class for all events
Contents
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.
Inherits From
SoEvent
Methods
SoEvent()virtual~SoEvent()
Constructor and destructor.
virtualSoTypegetTypeId()const
Return the type id for this event instance.
staticSoTypegetClassTypeId()
Return the type id for the SoEvent class.
SbBoolisOfType(SoTypetype)const
This returns TRUE if the event is an instance of or derived from an event of the passed type.
voidsetTime(SbTimet)SbTimegetTime()const
Set and get the time at which the event occurred.
voidsetPosition(constSbVec2s&p)constSbVec2s&getPosition()const
Set the window pixel location of the cursor when the event occurred. The position is relative to the
lower left corner of the window in which the event occurred.
constSbVec2s&getPosition(constSbViewportRegion&vpRgn)const
Get the viewport pixel location of the cursor when the event occurred, relative to the specified
viewport region.
constSbVec2f&getNormalizedPosition(constSbViewportRegion&vpRgn)const
Get the normalized location of the cursor when the event occurred, relative to the specified viewport
region. The returned value will lie between 0.0 and 1.0.
voidsetShiftDown(SbBoolisDown)voidsetCtrlDown(SbBoolisDown)voidsetAltDown(SbBoolisDown)
Set whether the modifier keys were down when the event occurred.
SbBoolwasShiftDown()constSbBoolwasCtrlDown()constSbBoolwasAltDown()const
Get whether the modifier keys were down when the event occurred.
Name
SoEvent — base class for all events
See Also
SoButtonEvent,SoKeyboardEvent,SoLocation2Event,SoMotion3Event,SoMouseButtonEvent,SoSpaceballButtonEvent,SoHandleEventAction,SoEventCallback,SoSelection,SoInteraction,SoXtDevice,SoXtRenderAreaSoEvent(3IV)()
Synopsis
#include<Inventor/events/SoEvent.h>
Methods from class SoEvent:
SoEvent()virtual~SoEvent()virtualSoTypegetTypeId()conststaticSoTypegetClassTypeId()SbBoolisOfType(SoTypetype)constvoidsetTime(SbTimet)SbTimegetTime()constvoidsetPosition(constSbVec2s&p)constSbVec2s&getPosition()constconstSbVec2s&getPosition(constSbViewportRegion&vpRgn)constconstSbVec2f&getNormalizedPosition(constSbViewportRegion&vpRgn)constvoidsetShiftDown(SbBoolisDown)voidsetCtrlDown(SbBoolisDown)voidsetAltDown(SbBoolisDown)SbBoolwasShiftDown()constSbBoolwasCtrlDown()constSbBoolwasAltDown()const