1 #ifndef COIN_SOSELECTION_H
2 #define COIN_SOSELECTION_H
27 #include <Inventor/nodes/SoSubNode.h>
28 #include <Inventor/nodes/SoSeparator.h>
29 #include <Inventor/fields/SoSFEnum.h>
30 #include <Inventor/lists/SoPathList.h>
37 typedef void SoSelectionPathCB(
void * data,
SoPath * path);
38 typedef void SoSelectionClassCB(
void * data,
SoSelection * sel);
47 static void initClass(
void);
58 void select(
const SoPath * path);
60 void deselect(
const SoPath * path);
61 void deselect(
const int which);
62 void deselect(
SoNode * node);
63 void toggle(
const SoPath * path);
64 void toggle(
SoNode * node);
65 SbBool isSelected(
const SoPath * path)
const;
66 SbBool isSelected(
SoNode * node)
const;
67 void deselectAll(
void);
68 int getNumSelected(
void)
const;
70 SoPath * getPath(
const int index)
const;
71 SoPath * operator[](
const int i)
const;
72 void addSelectionCallback(SoSelectionPathCB * f,
void * userData = NULL);
73 void removeSelectionCallback(SoSelectionPathCB * f,
void * userData = NULL);
74 void addDeselectionCallback(SoSelectionPathCB * f,
void * userData = NULL);
75 void removeDeselectionCallback(SoSelectionPathCB * f,
76 void * userData = NULL);
77 void addStartCallback(SoSelectionClassCB * f,
void * userData = NULL);
78 void removeStartCallback(SoSelectionClassCB * f,
void * userData = NULL);
79 void addFinishCallback(SoSelectionClassCB * f,
void * userData = NULL);
80 void removeFinishCallback(SoSelectionClassCB * f,
void * userData = NULL);
81 void setPickFilterCallback(SoSelectionPickCB * f,
void * userData = NULL,
82 const SbBool callOnlyIfSelectable = TRUE);
83 void setPickMatching(
const SbBool pickMatching);
84 SbBool isPickMatching(
void)
const;
85 SbBool getPickMatching(
void)
const;
86 void addChangeCallback(SoSelectionClassCB * f,
void * userData = NULL);
87 void removeChangeCallback(SoSelectionClassCB * f,
void * userData = NULL);
92 void invokeSelectionPolicy(
SoPath *path, SbBool shiftDown);
93 void performSingleSelection(
SoPath *path);
94 void performToggleSelection(
SoPath *path);
96 void addPath(
SoPath *path);
97 void removePath(
const int which);
98 int findPath(
const SoPath *path)
const;
124 SbBool &ignorepick, SbBool &haltaction);
127 #endif // !COIN_SOSELECTION_H
void setPickMatching(const SbBool pickMatching)
Definition: SoSelection.cpp:656
int getLength(void) const
Definition: SbPList.h:94
void removeDeselectionCallback(SoSelectionPathCB *f, void *userData=NULL)
Definition: SoSelection.cpp:555
SbBool callPickCBOnlyIfSelectable
Definition: SoSelection.h:113
@ TOGGLE
Definition: SoSelection.h:51
void removeCallback(SoCallbackListCB *f, void *userdata=NULL)
Definition: SoCallbackList.cpp:71
void remove(const int index)
Definition: SoBaseList.cpp:121
virtual void apply(SoNode *root)
Definition: SoAction.cpp:476
void addFinishCallback(SoSelectionClassCB *f, void *userData=NULL)
Definition: SoSelection.cpp:594
SoSelectionPickCB * pickCBFunc
Definition: SoSelection.h:111
SoCallbackList * finishCBList
Definition: SoSelection.h:109
int getNumSelected(void) const
Definition: SoSelection.cpp:482
void addChangeCallback(SoSelectionClassCB *f, void *userData=NULL)
Definition: SoSelection.cpp:688
SbBool pickMatching
Definition: SoSelection.h:118
void removeChangeCallback(SoSelectionClassCB *f, void *userData=NULL)
Definition: SoSelection.cpp:698
void removeStartCallback(SoSelectionClassCB *f, void *userData=NULL)
Definition: SoSelection.cpp:581
SbBool isPickMatching(void) const
Definition: SoSelection.cpp:667
void setPickFilterCallback(SoSelectionPickCB *f, void *userData=NULL, const SbBool callOnlyIfSelectable=1)
Definition: SoSelection.cpp:638
SoPath * mouseDownPickPath
Definition: SoSelection.h:117
virtual ~SoSelection()
Definition: SoSelection.cpp:301
The SoSearchAction class provides methods for searching through scene graphs.
Definition: SoSearchAction.h:32
void toggle(const SoPath *path)
Definition: SoSelection.cpp:420
void setNode(SoNode *const node)
Definition: SoSearchAction.cpp:145
SoCallbackList * selCBList
Definition: SoSelection.h:106
void invokeSelectionPolicy(SoPath *path, SbBool shiftDown)
Definition: SoSelection.cpp:707
SoPath * copyFromThis(const SoPath *path) const
Definition: SoSelection.cpp:774
void removeSelectionCallback(SoSelectionPathCB *f, void *userData=NULL)
Definition: SoSelection.cpp:532
Policy
Definition: SoSelection.h:50
void deselect(const SoPath *path)
Definition: SoSelection.cpp:384
The SoPathList class is a container for pointers to SoPath objects.
Definition: SoPathList.h:31
void addCallback(SoCallbackListCB *f, void *userData=NULL)
Definition: SoCallbackList.cpp:59
virtual void handleEvent(SoHandleEventAction *action)
Definition: SoSelection.cpp:835
SoCallbackList * deselCBList
Definition: SoSelection.h:107
int findPath(const SoPath *path) const
Definition: SoSelection.cpp:815
void * pickCBData
Definition: SoSelection.h:112
SbBool getPickMatching(void) const
Definition: SoSelection.cpp:678
SoSFEnum policy
Definition: SoSelection.h:54
The SoCallbackList is a container for callback function pointers.
Definition: SoCallbackList.h:35
SoCallbackList * changeCBList
Definition: SoSelection.h:115
void setHandled(void)
Definition: SoHandleEventAction.cpp:211
void unref(void) const
Definition: SoBase.cpp:627
void append(SoPath *const path)
Definition: SoPathList.cpp:88
void invokeCallbacks(void *callbackdata)
Definition: SoCallbackList.cpp:129
int findNode(const SoNode *const node) const
Definition: SoPath.cpp:587
void addDeselectionCallback(SoSelectionPathCB *f, void *userData=NULL)
Definition: SoSelection.cpp:544
The SoPath class is a container class for traversal path descriptions.
Definition: SoPath.h:43
virtual void handleEvent(SoHandleEventAction *action)
Definition: SoSeparator.cpp:745
void deselectAll(void)
Definition: SoSelection.cpp:472
SbBool isHandled(void) const
Definition: SoHandleEventAction.cpp:223
int getLength(void) const
Definition: SoPath.cpp:473
const SoPathList * getList(void) const
Definition: SoSelection.cpp:491
SoPath * getPath(const int index) const
Definition: SoSelection.cpp:500
@ SINGLE
Definition: SoSelection.h:51
SbBool isSelected(const SoPath *path) const
Definition: SoSelection.cpp:447
SoPath * getPath(void) const
Definition: SoSearchAction.cpp:317
The SoSFEnum class is a container for an enum value.
Definition: SoSFEnum.h:31
void removeFinishCallback(SoSelectionClassCB *f, void *userData=NULL)
Definition: SoSelection.cpp:605
void performToggleSelection(SoPath *path)
Definition: SoSelection.cpp:757
The SoBase class is the top-level superclass for a number of class-hierarchies.
Definition: SoBase.h:41
SoPath * operator[](const int i) const
Definition: SoSelection.cpp:509
void performSingleSelection(SoPath *path)
Definition: SoSelection.cpp:723
SoCallbackList * startCBList
Definition: SoSelection.h:108
SoSelection(void)
Definition: SoSelection.cpp:279
void ref(void) const
Definition: SoBase.cpp:574
void setInterest(const Interest interest)
Definition: SoSearchAction.cpp:249
void reset(void)
Definition: SoSearchAction.cpp:341
void select(const SoPath *path)
Definition: SoSelection.cpp:353
@ SHIFT
Definition: SoSelection.h:51
SoPath * copy(const int startfromnodeindex=0, int numnodes=0) const
Definition: SoPath.cpp:673
void addSelectionCallback(SoSelectionPathCB *f, void *userData=NULL)
Definition: SoSelection.cpp:521
The SoPickedPoint class is used for specifying picked points.
Definition: SoPickedPoint.h:39
The SoSeparator class is a state-preserving group node.
Definition: SoSeparator.h:34
void removePath(const int which)
Definition: SoSelection.cpp:801
int findPath(const SoPath &path) const
Definition: SoPathList.cpp:120
const SoEvent * getEvent(void) const
Definition: SoHandleEventAction.cpp:196
SoNode * getNode(const int index) const
Definition: SoPath.cpp:402
const SoPickedPoint * getPickedPoint(void)
Definition: SoHandleEventAction.cpp:315
void addPath(SoPath *path)
Definition: SoSelection.cpp:790
The SoNode class is the base class for nodes used in scene graphs.
Definition: SoNode.h:47
void addStartCallback(SoSelectionClassCB *f, void *userData=NULL)
Definition: SoSelection.cpp:570
The SoHandleEventAction class distributes user events to the scene.
Definition: SoHandleEventAction.h:36
The SoEvent class is the base class for all Coin events.
Definition: SoEvent.h:34
void unrefNoDelete(void) const
Definition: SoBase.cpp:665
SoPath * getPath() const
Definition: SoPickedPoint.cpp:178
SoPathList selectionList
Definition: SoSelection.h:104
SoNode * getHead(void) const
Definition: SoPath.cpp:180
The SoSelection class manages a list of selected nodes.
Definition: SoSelection.h:41
Copyright © 1998-2007 by Systems in Motion AS. All rights reserved.
Generated on Wed Jul 24 2019 for Coin by Doxygen. 1.8.17