Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
SoMenuPushButtonLauncher.h
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_PUSH_BUTTON_LAUNCHER_
24#define _SO_MENU_PUSH_BUTTON_LAUNCHER_
25
26#include <DialogViz/dialog/SoMenuPushButton.h>
27#include <DialogViz/dialog/SoTopLevelDialog.h>
28
61{
62 SO_DG_HEADER(SoMenuPushButtonLauncher);
63
64 public:
65
70
76
80 virtual void addChild(SoTopLevelDialog *child);
81
85 virtual void insertChild(SoTopLevelDialog *child, int newChildIndex);
86
90 virtual SoNode *getChild(int index) const;
91
95 virtual int getNumChildren() const;
96
100 virtual int findChild(const SoTopLevelDialog *child) const;
101
105 virtual void removeChild(int index);
106
110 virtual void removeChild(SoTopLevelDialog *child);
111
115 virtual void removeAllChildren();
116
120 virtual void replaceChild(int index, SoTopLevelDialog *newChild);
121
125 virtual void replaceChild(SoTopLevelDialog *oldChild, SoTopLevelDialog *newChild);
126
127
128/*==============================================================================*/
129private:
130 // Returns pointer to children
131 virtual SoChildList *getChildren() const;
132
133 static void initClass();
134 static void exitClass();
135 virtual void buildMenu(void* parent, SbBool isActive2d, int index = -1);
136 virtual void menuEvent(void* parent, int itemId);
137
138 // Internal child management following inheritance of classes.
139 virtual void internalRemoveChild( int index ) { removeChild(index); }
140 virtual void internalRemoveChild( SoNode *child ) { removeChild(findChild(dynamic_cast<SoTopLevelDialog*>(child))); }
141 virtual void internalRemoveAllChildren() { removeAllChildren(); }
142 virtual void internalAddChild( SoNode *child ) { addChild(dynamic_cast<SoTopLevelDialog*>(child)); }
143 virtual int internalFindChild( const SoNode *child ) const { return findChild(dynamic_cast<const SoTopLevelDialog*>(child)); }
144 virtual void internalInsertChild( SoNode *child, int newChildIndex ) { insertChild(dynamic_cast<SoTopLevelDialog*>(child), newChildIndex); }
145 virtual SoNode *internalGetChild( int index) const { return getChild(index); }
146 virtual void internalReplaceChild( int index, SoNode *newChild) { replaceChild(index, dynamic_cast<SoTopLevelDialog*>(newChild)); }
147 virtual void internalReplaceChild( SoNode *oldChild, SoNode *newChild) { replaceChild(dynamic_cast<SoTopLevelDialog*>(oldChild),dynamic_cast<SoTopLevelDialog*>(newChild)); }
148
149private:
150
151 // Reads stuff into instance of SoGroup. Returns FALSE on error
152 virtual SbBool readInstance(SoInput *in, unsigned short flags);
153
154 // Reads just the children into instance of SoGroup. Returns FALSE on error
155 virtual SbBool readChildren(SoInput *in);
156
158
159 private:
160 int m_numberOfChildren;
161
162private:
163 virtual void search(SoSearchAction *action);
164 virtual void rayPick(SoRayPickAction *action);
165 virtual void write(SoWriteAction *action);
166
168// 3D methods
169private:
170
171private:
172 virtual void draggerStartCallback3D();
173 virtual void draggerFinishCallback3D();
174
176
177};
178
179#endif // _SO_MENU_PUSH_BUTTON_LAUNCHER_
180
181
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 pushButtonL...
virtual void insertChild(SoTopLevelDialog *child, int newChildIndex)
Adds a child so that it becomes the one with the given index.
virtual void replaceChild(SoTopLevelDialog *oldChild, SoTopLevelDialog *newChild)
Replaces first instance of given child with new child.
virtual void removeAllChildren()
Removes all children from group.
virtual void removeChild(SoTopLevelDialog *child)
Removes first instance of given child from group.
virtual void replaceChild(int index, SoTopLevelDialog *newChild)
Replaces child with given index with new child.
virtual int getNumChildren() const
Returns number of children.
virtual SoNode * getChild(int index) const
Returns pointer to child node with the given index.
SoMenuPushButtonLauncher()
Constructor.
SoDialogViz * searchForAuditorId(SbString id)
Retrieves the DialogViz object from the specified auditorID field in an SoMenuPushButtonLauncher stru...
virtual void addChild(SoTopLevelDialog *child)
Adds a child as last one in group.
virtual void removeChild(int index)
Removes child with given index from group.
virtual int findChild(const SoTopLevelDialog *child) const
Finds index of given child within group.
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