233 {
return getPath(i); }
322 void *userData = NULL,
323 bool callOnlyIfSelectable =
TRUE);
411 void constructorCommon();
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
INVENTOR_API void SoSelectionClassCB(void *userData, SoSelection *sel)
INVENTOR_API SoPath * SoSelectionPickCB(void *userData, const SoPickedPoint *pick)
INVENTOR_API void SoSelectionPathCB(void *userData, SoPath *path)
callback function prototypes
#define SO_NODE_HEADER(className)
Non-abstract classes have everything abstract classes have, plus a way to create an instance.
Manages a list of callback functions and associated data.
Base class for all events.
Allows nodes in a graph to receive input events.
Abstract base class for all database nodes.
Maintains a list of pointers to paths.
Path that points to a list of hierarchical nodes.
Maintains a list of pointers to SoPickedPoint instances.
Represents point on surface of picked object.
Field containing a single boolean value.
Field containing an enumerated value.
Searches for nodes in a scene graph.
Manages a list of selected objects.
void removeSelectionCallback(SoSelectionPathCB *f, void *userData=NULL)
Remove selection callback.
void invokeSelectionPolicy(SoPath *path, bool shiftDown)
Selection policies (shiftSelection is a combination of these) invokeSelectionPolicy() is called from ...
void select(SoNode *node)
Select the passed node by creating a path to it, and adding the path to the selection list by calling...
void addPath(SoPath *path)
addPath() assumes the path is rooted by 'this'
SoCallbackList * selCBList
Selection callback lists.
void deselectAll()
Deselect all paths in the selection list, that is, clear the list.
SoCallbackList * finishCBList
const SoPathList * getList() const
Return the list of selected paths.
void deselect(const SoPath *path)
Deselect the passed path by removing it from the selection list.
SoPathList selectionList
List of paths of selected objects.
SoPath * mouseDownPickPath
Mouse down picked path.
SbVec2s mouseDownPosition
void toggle(const SoPath *path)
Toggle the selection status of the passed path em if the path is in the selection list,...
SoCallbackList * startCBList
bool callPickCBOnlyIfSelectable
void deselect(SoNode *node)
Deselect the passed node by creating a path to it, and removing the node from the selection list by c...
SoSelection()
Creates a selection node with the default settings.
void removePath(int which)
int findPath(const SoPath *path) const
This locates path in the selection list.
static void initClass()
Internal:
void performToggleSelection(SoPath *path)
SoPath * copyFromThis(const SoPath *path) const
This copies the path so the copy is rooted by 'this'.
void toggle(SoNode *node)
Toggle the selection status of the passed node by creating a path to it, then calling toggle(path).
void removeStartCallback(SoSelectionClassCB *f, void *userData=NULL)
Remove the start callback.
SoSelection(int nChildren)
Constructor that specifies the approximate number of children.
SoCallbackList * changeCBList
Change callbacks.
void addDeselectionCallback(SoSelectionPathCB *f, void *userData=NULL)
The deselection callbacks are invoked every time an object is deselected, whether it be from user int...
SoSFEnum policy
Selection policy that is followed in response to user interaction.
void addFinishCallback(SoSelectionClassCB *f, void *userData=NULL)
The finish callbacks are invoked when the user has finished interactively changing the selection list...
SoSFBool selectOnlyOnClick
If on, only perform selection on a single click, and not after the mouse has been dragged from the in...
SoSelectionPickCB * pickCBFunc
Pick filter is a single callback function, not a list.
bool isPickMatching() const
Returns if pick matching is on.
~SoSelection()
Destructor removes everything from the list.
void removeChangeCallback(SoSelectionClassCB *f, void *userData=NULL)
void addSelectionCallback(SoSelectionPathCB *f, void *userData=NULL)
The selection callbacks are invoked every time an object is selected, whether it be from user interac...
bool isSelected(SoNode *node) const
This convenience version of deselect will search for the first instance of the passed node under this...
SoPath * getPath(int index) const
Return the ith path in the selection list.
void removeDeselectionCallback(SoSelectionPathCB *f, void *userData=NULL)
Remove deselection callback.
virtual void handleEvent(SoHandleEventAction *action)
Traversal routine for SoHandleEventAction - this will call action->setHandled() if the event is handl...
Policy
Default selection policy is SoSelection::SHIFT.
@ SINGLE
left mouse pick on object clears selection, then selects object.
@ TOGGLE
left mouse pick on object toggles its selection status.
bool getPickMatching() const
Returns if pick matching is on.
bool isSelected(const SoPath *path) const
returns TRUE if the path is selected
void deselect(int which)
Deselect a path by removing it from the selection list.
void removeFinishCallback(SoSelectionClassCB *f, void *userData=NULL)
Remove finish callback.
void setPickFilterCallback(SoSelectionPickCB *f, void *userData=NULL, bool callOnlyIfSelectable=TRUE)
The pick filter callback is invoked when a pick has occurred and the selection node is about to chang...
SoPath * getPickedPath(const SoPickedPoint *pickedPoint)
Get path from picked point, calls callbacks.
void addChangeCallback(SoSelectionClassCB *f, void *userData=NULL)
Selection notify callbacks - invoked whenever the selection changes.
void setPickMatching(bool pickTwice)
SoSelection will pick once on mouse down and once on mouse up, and make sure the picks match before c...
void performSingleSelection(SoPath *path)
void select(const SoPath *path)
Select the passed path by adding it to the selection list.
int getNumSelected() const
Return the number of paths in the selection list.
void addStartCallback(SoSelectionClassCB *f, void *userData=NULL)
The start callbacks are invoked when the user has initiated an interactive change to the selection li...
SoCallbackList * deselCBList
Group node that saves and restores traversal state.
Maintains a list of SoTypes.