1 #ifndef COIN_SOSELECTION_H
2 #define COIN_SOSELECTION_H
36 #include <Inventor/nodes/SoSubNode.h>
37 #include <Inventor/nodes/SoSeparator.h>
38 #include <Inventor/fields/SoSFEnum.h>
39 #include <Inventor/lists/SoPathList.h>
46 typedef void SoSelectionPathCB(
void * data,
SoPath * path);
47 typedef void SoSelectionClassCB(
void * data,
SoSelection * sel);
56 static void initClass(
void);
67 void select(
const SoPath * path);
69 void deselect(
const SoPath * path);
70 void deselect(
const int which);
71 void deselect(
SoNode * node);
72 void toggle(
const SoPath * path);
73 void toggle(
SoNode * node);
74 SbBool isSelected(
const SoPath * path)
const;
75 SbBool isSelected(
SoNode * node)
const;
76 void deselectAll(
void);
77 int getNumSelected(
void)
const;
79 SoPath * getPath(
const int index)
const;
80 SoPath * operator[](
const int i)
const;
81 void addSelectionCallback(SoSelectionPathCB * f,
void * userData = NULL);
82 void removeSelectionCallback(SoSelectionPathCB * f,
void * userData = NULL);
83 void addDeselectionCallback(SoSelectionPathCB * f,
void * userData = NULL);
84 void removeDeselectionCallback(SoSelectionPathCB * f,
85 void * userData = NULL);
86 void addStartCallback(SoSelectionClassCB * f,
void * userData = NULL);
87 void removeStartCallback(SoSelectionClassCB * f,
void * userData = NULL);
88 void addFinishCallback(SoSelectionClassCB * f,
void * userData = NULL);
89 void removeFinishCallback(SoSelectionClassCB * f,
void * userData = NULL);
91 const SbBool callOnlyIfSelectable = TRUE);
92 void setPickMatching(
const SbBool pickMatching);
93 SbBool isPickMatching(
void)
const;
94 SbBool getPickMatching(
void)
const;
95 void addChangeCallback(SoSelectionClassCB * f,
void * userData = NULL);
96 void removeChangeCallback(SoSelectionClassCB * f,
void * userData = NULL);
101 void invokeSelectionPolicy(
SoPath *path, SbBool shiftDown);
102 void performSingleSelection(
SoPath *path);
103 void performToggleSelection(
SoPath *path);
105 void addPath(
SoPath *path);
106 void removePath(
const int which);
107 int findPath(
const SoPath *path)
const;
133 SbBool &ignorepick, SbBool &haltaction);
136 #endif // !COIN_SOSELECTION_H