.TH "SoEventManager" 3 "Tue Dec 26 2023 17:59:22" "Version 4.0.2" "Coin" \" -*- nroff -*- .ad l .nh .SH NAME SoEventManager \- The \fBSoEventManager\fP class provides event handling for a Coin3D viewer\&. .SH SYNOPSIS .br .PP .PP \fC#include \fP .SS "Public Types" .in +1c .ti -1c .RI "enum \fBNavigationState\fP { \fBNO_NAVIGATION\fP, \fBJUST_NAVIGATION\fP, \fBMIXED_NAVIGATION\fP }" .br .in -1c .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP \fB~SoEventManager\fP ()" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetSceneGraph\fP (\fBSoNode\fP *\fBconst\fP \fBsceneroot\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBSoNode\fP * \fBgetSceneGraph\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetCamera\fP (\fBSoCamera\fP *camera)" .br .ti -1c .RI "\fBvirtual\fP \fBSoCamera\fP * \fBgetCamera\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP SbBool \fBprocessEvent\fP (\fBconst\fP \fBSoEvent\fP *\fBconst\fP event)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetNavigationState\fP (\fBNavigationState\fP state)" .br .ti -1c .RI "\fBvirtual\fP \fBNavigationState\fP \fBgetNavigationState\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "int \fBgetNumSoScXMLStateMachines\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBSoScXMLStateMachine\fP * \fBgetSoScXMLStateMachine\fP (int idx) \fBconst\fP" .br .ti -1c .RI "\fBvoid\fP \fBaddSoScXMLStateMachine\fP (\fBSoScXMLStateMachine\fP *\fBsm\fP)" .br .ti -1c .RI "\fBvoid\fP \fBremoveSoScXMLStateMachine\fP (\fBSoScXMLStateMachine\fP *\fBsm\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetSize\fP (\fBconst\fP \fBSbVec2s\fP &\fBnewsize\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetOrigin\fP (\fBconst\fP \fBSbVec2s\fP &\fBnewOrigin\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetViewportRegion\fP (\fBconst\fP \fBSbViewportRegion\fP &\fBnewregion\fP)" .br .ti -1c .RI "\fBconst\fP \fBSbViewportRegion\fP & \fBgetViewportRegion\fP (\fBvoid\fP) \fBconst\fP" .br .ti -1c .RI "\fBvirtual\fP \fBvoid\fP \fBsetHandleEventAction\fP (\fBSoHandleEventAction\fP *\fBhea\fP)" .br .ti -1c .RI "\fBvirtual\fP \fBSoHandleEventAction\fP * \fBgetHandleEventAction\fP (\fBvoid\fP) \fBconst\fP" .br .in -1c .SS "Protected Member Functions" .in +1c .ti -1c .RI "\fBvirtual\fP SbBool \fBactuallyProcessEvent\fP (\fBconst\fP \fBSoEvent\fP *\fBconst\fP event)" .br .in -1c .SH "Detailed Description" .PP The \fBSoEventManager\fP class provides event handling for a Coin3D viewer\&. It receives Coin events (typically translated from GUI events by the GUI binding in use) and passes them to the state machine or directly to the scene graph depending on the navigation mode\&. \fBSoEventManager\fP implements the event interface for the Coin3D navigation system based on \fBScXML\fP\&. \fBSoEventManager\fP and \fBSoRenderManager\fP together supersede \fBSoSceneManager\fP, which is now just a wrapper around these classes\&. The class is used by the QuarterWidget in Quarter (the Qt binding for Coin3D)\&. .SH "Member Enumeration Documentation" .PP .SS "\fBenum\fP \fBSoEventManager::NavigationState\fP" Sets how events are handled\&. .PP \fBEnumerator\fP .in +1c .TP \fB\fINO_NAVIGATION \fP\fP Forwards the events only to the scene graph\&. .TP \fB\fIJUST_NAVIGATION \fP\fP Forwards the events only to the state machines\&. .TP \fB\fIMIXED_NAVIGATION \fP\fP Forwards the events to the scene graph first\&. If it does not get handled, the events get forwarded to the state machines\&. .SH "Constructor & Destructor Documentation" .PP .SS "SoEventManager::~SoEventManager ()\fC [virtual]\fP" Destructor\&. .PP The destructor destructs all subobjects it still has handles on when invoked\&. .SH "Member Function Documentation" .PP .SS "\fBvoid\fP SoEventManager::setSceneGraph (\fBSoNode\fP *\fBconst\fP sceneroot)\fC [virtual]\fP" Set the node which is top of the scene graph we're managing\&. The \fIsceneroot\fP node reference count will be increased by 1, and any previously set scene graph top node will have its reference count decreased by 1\&. .PP \fBSee also\fP .RS 4 \fBgetSceneGraph\fP .RE .PP .SS "\fBSoNode\fP * SoEventManager::getSceneGraph (\fBvoid\fP) const\fC [virtual]\fP" Returns pointer to root of scene graph\&. .SS "\fBvoid\fP SoEventManager::setCamera (\fBSoCamera\fP * camera)\fC [virtual]\fP" Sets the camera to be used\&. .SS "\fBSoCamera\fP * SoEventManager::getCamera (\fBvoid\fP) const\fC [virtual]\fP" Returns the current camera\&. .SS "SbBool SoEventManager::processEvent (\fBconst\fP \fBSoEvent\fP *\fBconst\fP event)\fC [virtual]\fP" Handles the event\&. Depending on the navigation state, this forwards the event to the state machines and/or the scene graph\&. .SS "\fBvoid\fP SoEventManager::setNavigationState (\fBNavigationState\fP state)\fC [virtual]\fP" This method sets the navigation mode of the scene manager\&. The navigation mode decides the system the user uses to navigate the 3D model\&. .PP \fBSoEventManager::NO_NAVIGATION\fP is the default setting\&. .PP \fBSee also\fP .RS 4 \fBSoEventManager::NavigationState\fP, \fBgetNavigationState\fP .RE .PP .SS "\fBSoEventManager::NavigationState\fP SoEventManager::getNavigationState (\fBvoid\fP) const\fC [virtual]\fP" This method returns which state the camera navigation system is in\&. .PP \fBSee also\fP .RS 4 \fBSoEventManager::NavigationState\fP, \fBsetNavigationState\fP .RE .PP .SS "int SoEventManager::getNumSoScXMLStateMachines (\fBvoid\fP) const" Returns the number of SCXML state machines registered on the \fBSoEventManager\fP object\&. .SS "\fBSoScXMLStateMachine\fP * SoEventManager::getSoScXMLStateMachine (int idx) const" Returns the pointer to the Nth (\fIidx\fP) SCXML state machine registered on the \fBSoSceneManager\fP object\&. .PP The \fIidx\fP argument must be a valid index, not outside the actual range of SCXML state machine object indices\&. .SS "\fBvoid\fP SoEventManager::addSoScXMLStateMachine (\fBSoScXMLStateMachine\fP * sm)" Adds an SCXML state machine object to the \fBSoEventManager\fP's event pipeline\&. .PP The calling code is responsible for deleting the passed in state machine after \fBremoveSoScXMLStateMachine()\fP has been invoked\&. .PP (Note: this behavior changed between Coin \fB3\&.1\fP and later, as the \fBSoEventManager\fP used to destruct the state machines upon its own destruction\&.) .SS "\fBvoid\fP SoEventManager::removeSoScXMLStateMachine (\fBSoScXMLStateMachine\fP * sm)" Removes the \fBSoSceneManager\fP object reference to an SCXML state machine\&. It will just be removed, not destructed\&. .PP If no reference to the given SCXML state machine exists, nothing will happen\&. .SS "\fBvoid\fP SoEventManager::setSize (\fBconst\fP \fBSbVec2s\fP & newsize)\fC [virtual]\fP" Set size of rendering area for the viewport within the current window\&. .SS "\fBvoid\fP SoEventManager::setOrigin (\fBconst\fP \fBSbVec2s\fP & newOrigin)\fC [virtual]\fP" Set \fIonly\fP the origin of the viewport region within the rendering window\&. .PP \fBSee also\fP .RS 4 \fBsetViewportRegion()\fP, setWindowSize() .RE .PP .SS "\fBvoid\fP SoEventManager::setViewportRegion (\fBconst\fP \fBSbViewportRegion\fP & newregion)\fC [virtual]\fP" Sets the current viewport region\&. This will overwrite the default viewport region created in the constructor\&. .PP \fBSee also\fP .RS 4 \fBgetViewportRegion()\fP .RE .PP .SS "\fBconst\fP \fBSbViewportRegion\fP & SoEventManager::getViewportRegion (\fBvoid\fP) const" Returns the viewport region used by the event manager\&. .SS "\fBvoid\fP SoEventManager::setHandleEventAction (\fBSoHandleEventAction\fP * handleeventaction)\fC [virtual]\fP" Set the \fIaction\fP to use for event handling\&. Overrides the default action made in the constructor\&. .SS "\fBSoHandleEventAction\fP * SoEventManager::getHandleEventAction (\fBvoid\fP) const\fC [virtual]\fP" Returns pointer to event handler action\&. .SS "SbBool SoEventManager::actuallyProcessEvent (\fBconst\fP \fBSoEvent\fP *\fBconst\fP event)\fC [protected]\fP, \fC [virtual]\fP" Forwards the event to the scene graph\&. .SH "Author" .PP Generated automatically by Doxygen for Coin from the source code\&.