Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoMenuCheckBoxLauncher.h
Go to the documentation of this file.
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Nicolas DAGUISE (Oct 2002)
22**=======================================================================*/
23#ifndef _SO_MENU_CHECK_BOX_LAUNCHER_
24#define _SO_MENU_CHECK_BOX_LAUNCHER_
25
28
63{
65
66 public:
67
72
78
82 virtual void addChild(SoTopLevelDialog *child);
83
87 virtual void insertChild(SoTopLevelDialog *child, int newChildIndex);
88
92 virtual SoNode *getChild(int index) const;
93
97 virtual int getNumChildren() const;
98
102 virtual int findChild(const SoTopLevelDialog *child) const;
103
107 virtual void removeChild(int index);
108
112 virtual void removeChild(SoTopLevelDialog *child);
113
117 virtual void removeAllChildren();
118
122 virtual void replaceChild(int index, SoTopLevelDialog *newChild);
123
127 virtual void replaceChild(SoTopLevelDialog *oldChild, SoTopLevelDialog *newChild);
128
129/*==============================================================================*/
130private:
131
132 // Returns pointer to children
133 virtual SoChildList *getChildren() const;
134 static void initClass();
135 static void exitClass();
136 virtual void buildMenu(void* parent, SbBool isActive2d, int index = -1);
137 virtual void menuEvent(void* parent, int itemId);
138
139 // Internal child management following inheritance of classes.
140 virtual void internalRemoveChild( int index ) { removeChild(index); }
141 virtual void internalRemoveChild( SoNode *child ) { removeChild(findChild(dynamic_cast<SoTopLevelDialog*>(child))); }
142 virtual void internalRemoveAllChildren() { removeAllChildren(); }
143 virtual void internalAddChild( SoNode *child ) { addChild(dynamic_cast<SoTopLevelDialog*>(child)); }
144 virtual int internalFindChild( const SoNode *child ) const { return findChild(dynamic_cast<const SoTopLevelDialog*>(child)); }
145 virtual void internalInsertChild( SoNode *child, int newChildIndex ) { insertChild(dynamic_cast<SoTopLevelDialog*>(child), newChildIndex); }
146 virtual SoNode *internalGetChild( int index) const { return getChild(index); }
147 virtual void internalReplaceChild( int index, SoNode *newChild) { replaceChild(index, dynamic_cast<SoTopLevelDialog*>(newChild)); }
148 virtual void internalReplaceChild( SoNode *oldChild, SoNode *newChild) { replaceChild(dynamic_cast<SoTopLevelDialog*>(oldChild),dynamic_cast<SoTopLevelDialog*>(newChild)); }
149
150 private:
151
152 // Reads stuff into instance of SoGroup. Returns FALSE on error
153 virtual SbBool readInstance(SoInput *in, unsigned short flags);
154
155 // Reads just the children into instance of SoGroup. Returns FALSE on error
156 virtual SbBool readChildren(SoInput *in);
157
158 virtual ~SoMenuCheckBoxLauncher();
159
160 private:
161 int m_numberOfChildren;
162
163private:
164 virtual void search(SoSearchAction *action);
165 virtual void rayPick(SoRayPickAction *action);
166 virtual void write(SoWriteAction *action);
167
168};
169
170#endif // _SO_MENU_CHECK_BOX_LAUNCHER_
171
172
#define SO_DG_HEADER(className)
Class for smart character strings.
Definition SbString.h:202
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Used to read Open Inventor data files.
Definition SoInput.h:363
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu pushbutton ...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu checkBoxLau...
SoDialogViz * searchForAuditorId(SbString id)
Retrieves the DialogViz object from the specified auditorID field in an SoMenuCheckBoxLauncher struct...
virtual int findChild(const SoTopLevelDialog *child) const
Finds index of given child within group.
virtual void insertChild(SoTopLevelDialog *child, int newChildIndex)
Adds a child so that it becomes the one with the given index.
virtual void removeAllChildren()
Removes all children from group.
virtual SoNode * getChild(int index) const
Returns pointer to child node with the given index.
virtual void replaceChild(SoTopLevelDialog *oldChild, SoTopLevelDialog *newChild)
Replaces first instance of given child with new child.
virtual void removeChild(int index)
Removes child with given index from group.
SoMenuCheckBoxLauncher()
Constructor.
virtual void removeChild(SoTopLevelDialog *child)
Removes first instance of given child from group.
virtual void addChild(SoTopLevelDialog *child)
Adds a child as last one in group.
virtual void replaceChild(int index, SoTopLevelDialog *newChild)
Replaces child with given index with new child.
virtual int getNumChildren() const
Returns number of children.
Abstract base class for all database nodes.
Definition SoNode.h:145
friend class SoChildList
Definition SoNode.h:473
Intersects objects with a ray cast into scene.
Searches for nodes in a scene graph.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Top Level Dialog...
Writes a scene graph to a file.
int SbBool
Boolean type.
Definition SbBase.h:87