'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoHandleEventAction(3IV) .SH NAME SoHandleEventAction \(em allows nodes in a graph to receive input events .SH INHERITS FROM SoAction > SoHandleEventAction .SH SYNOPSIS .ps -1 \*(Cr#include .sp .in 1i \f1Methods from class SoHandleEventAction: .in 0.5i .sp .ta 27m .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Cr .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoHandleEventAction\*(Cr(const SbViewportRegion &viewportRegion) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetViewportRegion\*(Cr(const SbViewportRegion &newRegion) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SbViewportRegion & .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewportRegion\*(Cr() const .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetEvent\*(Cr(const SoEvent *ev) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SoEvent * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetEvent\*(Cr() const .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetHandled\*(Cr() .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisHandled\*(Cr() const .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetGrabber\*(Cr(SoNode *node) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreleaseGrabber\*(Cr() .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetGrabber\*(Cr() const .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPickRoot\*(Cr(SoNode *node) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickRoot\*(Cr() const .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPickRadius\*(Cr(float radiusInPixels) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SoPickedPoint * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickedPoint\*(Cr() .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SoPickedPointList & .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickedPointList\*(Cr() .sp .in 1i \f1Methods from class SoAction: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbapply\*(Cr(SoNode *node) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbapply\*(Cr(SoPath *path) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbapply\*(Cr(const SoPathList &pathList, SbBool obeysRules = FALSE) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoType .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetTypeId\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOfType\*(Cr(SoType type) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbinvalidateState\*(Cr() .sp .SH DESCRIPTION This class is used to allow nodes in a scene graph to handle input events. It is usually invoked from a component derived from \*(CbSoXtRenderArea\f1 when the component receives a window system event. .sp Manipulator, dragger and \&selection nodes respond to and process events. Most other group nodes just pass the event to their children, while most other nodes simply ignore the action entirely. Once a node has indicated to the action \&that it has handled the event, traversal stops. .sp A node that handles an event can also grab future events. Once it has done so, all events will be sent directly to that node, with no traversal taking place, \&until the node releases the grab. .SH METHODS .ta 27m .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Cr .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoHandleEventAction\*(Cr(const SbViewportRegion &viewportRegion) .br .in 1i \f1Constructor takes viewport region to use; this is needed to perform a pick operation when requested. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetViewportRegion\*(Cr(const SbViewportRegion &newRegion) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SbViewportRegion & .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetViewportRegion\*(Cr() const .br .in 1i \f1Sets/returns current viewport region to use for action. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetEvent\*(Cr(const SoEvent *ev) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SoEvent * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetEvent\*(Cr() const .br .in 1i \f1Sets/returns the event being handled. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetHandled\*(Cr() .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisHandled\*(Cr() const .br .in 1i \f1Sets/returns whether any node has yet handled the event. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetGrabber\*(Cr(SoNode *node) .br .in 1i \f1Initiates grabbing of future events. All events will be sent to the given node until the grab is released. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreleaseGrabber\*(Cr() .br .in 1i \f1Releases the grab. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetGrabber\*(Cr() const .br .in 1i \f1Returns the node that is currently grabbing events, or NULL if there is none. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPickRoot\*(Cr(SoNode *node) .br .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickRoot\*(Cr() const .br .in 1i \f1Sets/returns the root node used for initiating a pick action for those nodes that want to know what is under the cursor. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPickRadius\*(Cr(float radiusInPixels) .br .in 1i \f1Set the radius (in pixels) around the viewport-space point through which the ray passes when doing ray picking. Ray picking is performed when \*(CbgetPickedPoint()\f1 is called. The pick radius set here is used when testing \&the ray against lines and points. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SoPickedPoint * .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickedPoint\*(Cr() .br .in 1i \f1Returns the frontmost object hit (as an \*(CbSoPickedPoint\f1) by performing a pick based on the mouse location specified in the event for which the action is being applied. The first time this is called for a particular event, \&a \*(CbSoRayPickAction\f1 is applied to find this object; subsequent calls for the same event return the same information. The storage for the picked point remains valid as long as the action is not re-applied or deleted. .sp .in 0.5i .in 1i+27n .ti 0.5i .ta 27m .ds Pt \*(Crconst SoPickedPointList & .ie \w'\*(Pt'>=27n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickedPointList\*(Cr() .br .in 1i \f1Returns a list of objects intersected by a picking operation, sorted from nearest to farthest. .sp .in 0.5i .SH SEE ALSO \*(CbSoEvent, SoPickedPoint, SoRayPickAction