'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoEventCallback(3IV) .SH NAME SoEventCallback \(em node which invokes callbacks for events .SH INHERITS FROM SoBase > SoFieldContainer > SoNode > SoEventCallback .SH SYNOPSIS .ps -1 \*(Cr#include .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crtypedef void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoEventCallbackCB\*(Cr(void *userData, SoEventCallback *node) .sp .in 1i \f1Methods from class SoEventCallback: .in 0.5i .sp .ta 23m .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Cr .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoEventCallback\*(Cr() .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPath\*(Cr(SoPath *path) .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crconst SoPath * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPath\*(Cr() .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaddEventCallback\*(Cr(SoType eventType, SoEventCallbackCB *f, void *userData = NULL) .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbremoveEventCallback\*(Cr(SoType eventType, SoEventCallbackCB *f, void *userData = NULL) .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(CrSoHandleEventAction * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetAction\*(Cr() const .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crconst SoEvent * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetEvent\*(Cr() const .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crconst SoPickedPoint * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickedPoint\*(Cr() const .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetHandled\*(Cr() .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisHandled\*(Cr() const .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgrabEvents\*(Cr() .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreleaseEvents\*(Cr() .sp .in 1i \f1Methods from class SoNode: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetOverride\*(Cr(SbBool state) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOverride\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbcopy\*(Cr(SbBool copyConnections = FALSE) const .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\ \} \*(CbaffectsState\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic SoNode * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetByName\*(Cr(const SbName &name, SoNodeList &list) .sp .in 1i \f1Methods from class SoFieldContainer: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetToDefaults\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbhasDefaultValues\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfieldsAreEqual\*(Cr(const SoFieldContainer *fc) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbcopyFieldValues\*(Cr(const SoFieldContainer *fc, SbBool copyConnections = FALSE) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbset\*(Cr(const char *fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbget\*(Cr(SbString &fieldDataString) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual int .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFields\*(Cr(SoFieldList &resultList) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SoField * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetField\*(Cr(const SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetFieldName\*(Cr(const SoField *field, SbName &fieldName) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisNotifyEnabled\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbenableNotify\*(Cr(SbBool flag) .sp .in 1i \f1Methods from class SoBase: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbref\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbunref\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbunrefNoDelete\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbtouch\*(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() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisOfType\*(Cr(SoType type) const .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\ \} \*(CbsetName\*(Cr(const SbName &name) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crvirtual SbName .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetName\*(Cr() const .sp .SH DESCRIPTION \*(CbSoEventCallback\f1 will invoke application supplied callback functions during \*(CbSoHandleEventAction\f1 traversal. Methods allow the application to specify which Inventor events should trigger callbacks, and which path must be picked, if any, for \&the callback invocation to occur. The application callback is able to get information about the event and the pick detail, and may grab events, release events, and set whether the event was handled. .sp If \&you register more than one callback function in an \*(CbSoEventCallback\f1 node, all the callback functions will be invoked when an event occurs, even if one of the callbacks handles the event. However, if the event is handled \&by any of the callback functions, no other node in the scene graph will see the event. .SH METHODS .ta 23m .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crstatic SoType .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetClassTypeId\*(Cr() .br .in 1i \f1Return the type id for the \*(CbSoEventCallback\f1 class. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Cr .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoEventCallback\*(Cr() .br .in 1i \f1Constructor creates an event callback node with no event interest and a NULL path. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetPath\*(Cr(SoPath *path) .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crconst SoPath * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPath\*(Cr() .br .in 1i \f1Set and get the path which must be picked in order for the callbacks to be invoked. If the path is NULL, the callbacks will be invoked for every interesting event, as specified by \*(CbaddEventCallback()\f1, regardless of what is \&picked. The \*(CbsetPath()\f1 method makes its own copy of the passed path. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbaddEventCallback\*(Cr(SoType eventType, SoEventCallbackCB *f, void *userData = NULL) .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbremoveEventCallback\*(Cr(SoType eventType, SoEventCallbackCB *f, void *userData = NULL) .br .in 1i \f1Specifies the callback functions to be invoked for different event types. When invoked, the callback function will be passed the \*(CruserData\f1, along with a pointer to this \*(CbSoEventCallback\f1 node. For example, passing \*(CbSoMouseButtonEvent::getClassTypeId()\f1 means callbacks \&will be invoked only when a mouse button is pressed or released. Passing \*(CbSoEvent::getClassTypeId()\f1 for the \*(CreventType\f1 will cause the callback to be invoked for every event which passes through this event callback node. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(CrSoHandleEventAction * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetAction\*(Cr() const .br .in 1i \f1Returns the \*(CbSoHandleEventAction\f1 currently traversing this node, or NULL if traversal is not taking place. This should be called only from callback functions. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crconst SoEvent * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetEvent\*(Cr() const .br .in 1i \f1Returns the event currently being handled, or NULL if traversal is not taking place. This should be called only from callback functions. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crconst SoPickedPoint * .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPickedPoint\*(Cr() const .br .in 1i \f1Returns pick information during \*(CbSoHandleEventAction\f1 traversal, or NULL if traversal is not taking place. This should be called only from callback functions. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetHandled\*(Cr() .br .in 1i \f1Tells the node the event was handled. The callback function is responsible for setting whether the event was handled or not. If there is more than one callback function registered with an \*(CbSoEventCallback\f1 node, all of \&them will be invoked, regardless of whether one has handled the event or not. This should be called only from callback functions. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(CrSbBool .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbisHandled\*(Cr() const .br .in 1i \f1Returns whether the event has been handled. This should be called only from callback functions. .sp .in 0.5i .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgrabEvents\*(Cr() .br .in 1i+23n .ti 0.5i .ta 23m .ds Pt \*(Crvoid .ie \w'\*(Pt'>=23n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbreleaseEvents\*(Cr() .br .in 1i \f1Tells the event callback node to grab events or release the grab. While grabbing, the node will consume all events; however, each callback function will only be invoked for events of interest. .sp .in 0.5i .SH FILE FORMAT/DEFAULTS .nf \*(CrEventCallback { } .SH SEE ALSO \*(CbSoInteraction, SoSelection, SoHandleEventAction, SoDragger