'\"! tbl | mmdoc '\"macro stdmacro .ie n \{\ . ds Cr \fB . ds Cb \fB .\} .el \{\ . ds Cr \f7 . ds Cb \f8 .\} .TH SoSelection(3IV) .SH NAME SoSelection \(em manages a list of selected objects .SH INHERITS FROM SoBase > SoFieldContainer > SoNode > SoGroup > SoSeparator > SoSelection .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\ \} \*(CbSoSelectionPathCB\*(Cr(void *userData, SoPath *path) .br .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\ \} \*(CbSoSelectionClassCB\*(Cr(void *userData, SoSelection *sel) .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crtypedef SoPath * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSelectionPickCB\*(Cr(void *userData, const SoPickedPoint *pick) .sp .in 0.5i \*(Crenum \*(CbPolicy\*(Cr { .in 1i .ta 21m .in 1.5i+21n .ti 1i .ta 21m .ds Pt \*(CbSoSelection::SINGLE\f1 .ie \w'\*(Pt'>=21n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Left mouse pick on object clears selection, then selects object. Left mouse pick on nothing clears selection. Only one object may be selected at a time. .br .in 1.5i+21n .ti 1i .ta 21m .ds Pt \*(CbSoSelection::TOGGLE\f1 .ie \w'\*(Pt'>=21n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} Left mouse pick on object toggles its selection status. Left mouse pick on nothing does nothing. Multiple objects may be selected. .br .in 1.5i+21n .ti 1i .ta 21m .ds Pt \*(CbSoSelection::SHIFT\f1 .ie \w'\*(Pt'>=21n \{\ .ne 3 \*(Pt .ti 1i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} When shift key is down, selection policy is TOGGLE. When shift key is up, selection policy is SINGLE. Multiple objects may be selected. .br .in 0.5i \*(Cr} .sp .in 1i \f1Fields from class SoSelection: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbpolicy .sp .in 1i \f1Fields from class SoSeparator: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbrenderCaching .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbboundingBoxCaching .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbrenderCulling .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbpickCulling .sp .in 1i \f1Methods from class SoSelection: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSelection\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSelection\*(Cr(int nChildren) .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 \*(Crvoid .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbselect\*(Cr(const SoPath *path) .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\ \} \*(Cbselect\*(Cr(SoNode *node) .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\ \} \*(Cbdeselect\*(Cr(const SoPath *path) .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\ \} \*(Cbdeselect\*(Cr(int which) .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\ \} \*(Cbdeselect\*(Cr(SoNode *node) .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\ \} \*(Cbtoggle\*(Cr(const SoPath *path) .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\ \} \*(Cbtoggle\*(Cr(SoNode *node) .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\ \} \*(CbisSelected\*(Cr(const SoPath *path) 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\ \} \*(CbisSelected\*(Cr(SoNode *node) 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\ \} \*(CbdeselectAll\*(Cr() .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetNumSelected\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crconst SoPathList * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetList\*(Cr() const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoPath * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPath\*(Cr(int index) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoPath * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator [\|]\*(Cr(int i) 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\ \} \*(CbaddSelectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .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\ \} \*(CbremoveSelectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .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\ \} \*(CbaddDeselectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .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\ \} \*(CbremoveDeselectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .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\ \} \*(CbaddStartCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .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\ \} \*(CbremoveStartCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .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\ \} \*(CbaddFinishCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .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\ \} \*(CbremoveFinishCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .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\ \} \*(CbsetPickFilterCallback\*(Cr(SoSelectionPickCB *f, void *userData = NULL, SbBool callOnlyIfSelectable = TRUE) .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\ \} \*(CbsetPickMatching\*(Cr(SbBool pickTwice) .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\ \} \*(CbgetPickMatching\*(Cr() const .sp .in 1i \f1Methods from class SoSeparator: .in 0.5i .sp .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crstatic void .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbsetNumRenderCaches\*(Cr(int howMany) .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\ \} \*(CbgetNumRenderCaches\*(Cr() .sp .in 1i \f1Methods from class SoGroup: .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\ \} \*(CbaddChild\*(Cr(SoNode *child) .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\ \} \*(CbinsertChild\*(Cr(SoNode *child, int newChildIndex) .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\ \} \*(CbgetChild\*(Cr(int index) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbfindChild\*(Cr(const SoNode *child) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetNumChildren\*(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\ \} \*(CbremoveChild\*(Cr(int index) .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\ \} \*(CbremoveChild\*(Cr(SoNode *child) .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\ \} \*(CbremoveAllChildren\*(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\ \} \*(CbreplaceChild\*(Cr(int index, SoNode *newChild) .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\ \} \*(CbreplaceChild\*(Cr(SoNode *oldChild, SoNode *newChild) .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 \*(CbSoSelection\f1 defines a node which can be inserted into a scene graph and will generate and manage a selection list from picks on any node in the subgraph below it. Nodes are selected based on a current selection policy. \&Callback functions report back to the application when a path has been selected or deselected. The selection list can also be managed programmatically. .sp When handling events, \*(CbSoSelection\f1 makes sure that the mouse \&release event was over the same object as the mouse press event before changing the list of selected objects. This allows users to mouse down on an object, change their mind and move the cursor off the \&object, then release the mouse button without altering the selection. .sp The selection can be highlighted automatically through the \*(CbSoXtRenderArea\f1, or the application can provide custom highlights. Please see the chapter \&"Creating a Selection Highlight Style" in the \f2Inventor Toolmaker\f1. .SH FIELDS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoSFEnum .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cbpolicy .br .in 1i \f1Selection policy that is followed in response to user interaction. This can be set to \*(CrSoSelection::SINGLE\f1, \*(CrSoSelection::TOGGLE\f1, or \*(CrSoSelection::SHIFT\f1. .sp .in 0.5i .SH METHODS .ta 20m .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSelection\*(Cr() .br .in 1i \f1Creates a selection node with the default settings. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Cr .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbSoSelection\*(Cr(int nChildren) .br .in 1i \f1Constructor that specifies the approximate number of children. .sp .in 0.5i .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 \f1Return the type id for the \*(CbSoSelection\f1 class. .sp .in 0.5i .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\ \} \*(Cbselect\*(Cr(const SoPath *path) .br .in 1i \f1Select the passed path by adding it to the selection list. The selection node must lie in the path. The path is copied and truncated such that the selection node is the head of the path. If the selection \&node does not lie in the path, the selection list remains unchanged. This method ignores the current selection policy. .sp .in 0.5i .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\ \} \*(Cbselect\*(Cr(SoNode *node) .br .in 1i \f1Select the passed node by creating a path to it, and adding the path to the selection list by calling \*(Cbselect(path)\f1. If there is more than one instance of \*(Crnode\f1 beneath the selection node, the created path will be the first \&instance found. .sp .in 0.5i .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\ \} \*(Cbdeselect\*(Cr(const SoPath *path) .br .in 1i \f1Deselect the passed path by removing it from the selection list. .sp .in 0.5i .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\ \} \*(Cbdeselect\*(Cr(int which) .br .in 1i \f1Deselect a path by removing it from the selection list. The argument \*(Crwhich\f1 specifies which path in the list to be removed. .sp .in 0.5i .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\ \} \*(Cbdeselect\*(Cr(SoNode *node) .br .in 1i \f1Deselect the passed node by creating a path to it, and removing the node from the selection list by calling \*(Cbdeselect(path)\f1. If there is more than one instance of \*(Crnode\f1 beneath the selection node, the created path will be \&the first instance found. .sp .in 0.5i .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\ \} \*(Cbtoggle\*(Cr(const SoPath *path) .br .in 1i \f1Toggle the selection status of the passed path \(em if the path is in the selection list, it is removed; if not in the list, it is added. .sp .in 0.5i .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\ \} \*(Cbtoggle\*(Cr(SoNode *node) .br .in 1i \f1Toggle the selection status of the passed node by creating a path to it, then calling \*(Cbtoggle(path)\f1. If there is more than one instance of \*(Crnode\f1 beneath the selection node, the created path will be the first instance found. .sp .in 0.5i .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\ \} \*(CbisSelected\*(Cr(const SoPath *path) const .br .in 1i \f1Returns \f2TRUE\f1 if the passed path is selected, that is, if it is in the selection list. .sp .in 0.5i .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\ \} \*(CbisSelected\*(Cr(SoNode *node) const .br .in 1i \f1Returns \f2TRUE\f1 if the passed node is selected by creating a path to it, then calling \*(CbisSelected()\f1. If there is more than one instance of \*(Crnode\f1 beneath the selection node, the created path will be the first instance found. .sp .in 0.5i .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\ \} \*(CbdeselectAll\*(Cr() .br .in 1i \f1Deselect all paths in the selection list, that is, clear the list. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crint .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetNumSelected\*(Cr() const .br .in 1i \f1Return the number of paths in the selection list. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(Crconst SoPathList * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetList\*(Cr() const .br .in 1i \f1Return the list of selected paths. .sp .in 0.5i .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoPath * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(CbgetPath\*(Cr(int index) const .br .in 1i+20n .ti 0.5i .ta 20m .ds Pt \*(CrSoPath * .ie \w'\*(Pt'>=20n \{\ .ne 3 \*(Pt .ti 0.5i \c\ \} .el\{\ .ne 2 \*(Pt \c\ \} \*(Cboperator [\|]\*(Cr(int i) const .br .in 1i \f1Return the \*(Cri\f1th path in the selection list. .sp .in 0.5i .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\ \} \*(CbaddSelectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .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\ \} \*(CbremoveSelectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .br .in 1i \f1The selection callbacks are invoked every time an object is selected, whether it be from user interaction or from method call. The callbacks are invoked after the object has been added to the selection list. .sp .in 0.5i .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\ \} \*(CbaddDeselectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .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\ \} \*(CbremoveDeselectionCallback\*(Cr(SoSelectionPathCB *f, void *userData = NULL) .br .in 1i \f1The deselection callbacks are invoked every time an object is deselected, whether it be from user interaction or from method call. This is invoked after the object has been removed from the selection list. .sp .in 0.5i .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\ \} \*(CbaddStartCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .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\ \} \*(CbremoveStartCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .br .in 1i \f1The start callbacks are invoked when the user has initiated an interactive change to the selection list (by picking objects). This will be followed by invocations of the select and/or deselect callbacks, \&finally followed by each finish callback. A start callback can be used, for instance, to save the current selection for later restoration (e.g. undo/redo). The start callbacks are not called when the selection \&list is changed programmatically. .sp .in 0.5i .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\ \} \*(CbaddFinishCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .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\ \} \*(CbremoveFinishCallback\*(Cr(SoSelectionClassCB *f, void *userData = NULL) .br .in 1i \f1The finish callbacks are invoked when the user has finished interactively changing the selection list (by picking objects). This was preceded by an invocation of each start callback, and invocations of \&the select and/or deselect callbacks. The finish callbacks are not called when the selection list is changed programmatically. .sp .in 0.5i .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\ \} \*(CbsetPickFilterCallback\*(Cr(SoSelectionPickCB *f, void *userData = NULL, SbBool callOnlyIfSelectable = TRUE) .br .in 1i \f1The pick filter callback is invoked when a pick has occurred and the selection node is about to change the selection list. The callback function returns the path that the selection node should use when \&selecting and deselecting. If no pick callback is registered (the default), the selection node will use the path returned by \*(CbSoPickedPoint::getPath()\f1 on the picked point associated with the event being processed. The returned \&path should not be ref'd - selection will \*(Cbref()\f1 and \*(Cbunref()\f1 it. (See \*(CbSoPath::unrefNoDelete()\f1.) .sp Note that a picked object may or may not be a child of the selection node. A selection node will only select paths that pass through it. Possible \&return values from the callback: .sp [a] NULL \(em selection behaves as if nothing was picked (i.e. for SINGLE and SHIFT policies, this clears the selection list). Handle event action traversal halts. .sp [b] Path \(em \&this path will be selected/deselected according to the selection policy (it must lie under the selection node). Handle event action traversal halts. .sp [c] Path containing \f2only\f1 the selection node \(em apply the \&selection policy as if nothing was picked. Handle event action traversal continues. .sp [d] Path not passing through the selection node \(em selection ignores this pick event and no change is made to the selection \&list. Handle event action traversal continues. .sp A simple way to tell selection to ignore the pick is to return an \*(CbSoPath\f1 with no nodes in it. (i.e. \*(Cbreturn new SoPath;\f1) Selection will always ref the path returned by the callback, \&make a copy of the path, then unref the path. .sp The \*(CrcallOnlyIfSelectable\f1 argument, when set to TRUE, means the pick callback function will only be invoked on picks which pass through the selection node. When FALSE, all picks \&will be passed to the callback whether they pass through the selection or not. .sp .in 0.5i .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\ \} \*(CbsetPickMatching\*(Cr(SbBool pickTwice) .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\ \} \*(CbgetPickMatching\*(Cr() const .br .in 1i \f1\*(CbSoSelection\f1 will pick once on mouse down and once on mouse up, and make sure the picks match before changing the selection list. This allows the user to pick down on an object, change their mind and drag off the object, \&release the mouse button and not affect the selection. Pass TRUE to enable this behavior. Pass FALSE to disable this, meaning whatever is picked on a mouse release is added to/removed from the selection \&list. Default is pick-matching on. .sp .in 0.5i .SH FILE FORMAT/DEFAULTS .nf \*(CrSelection { .in 1i .ta 20m renderCaching AUTO boundingBoxCaching AUTO renderCulling AUTO pickCulling AUTO policy SHIFT .in 0.5i } .SH SEE ALSO \*(CbSoEventCallback, SoXtRenderArea, SoBoxHighlightRenderAction, SoLineHighlightRenderAction