Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoDialogGroup.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_DIALOG_GROUP_
24#define _SO_DIALOG_GROUP_
25
26#include <DialogViz/dialog/SoDialogComponent.h>
27
28class SoDialogAuditor;
29class SoDialogGroupAuditor;
30
47{
48 SO_DG_HEADER(SoDialogGroup);
49
50 public:
51
60
65
70
75
80
85
90
95
101
105 virtual void addChild(SoDialogComponent *child);
106
110 virtual void insertChild(SoDialogComponent *child, int newChildIndex);
111
115 virtual SoNode *getChild(int index) const;
116
120 virtual int getNumChildren() const;
121
125 virtual int findChild(const SoDialogComponent *child) const;
126
130 virtual void removeChild(int index);
131
135 virtual void removeChild(SoDialogComponent *child);
136
140 virtual void removeAllChildren();
141
145 virtual void replaceChild(int index, SoDialogComponent *newChild);
146
150 virtual void replaceChild(SoDialogComponent *oldChild, SoDialogComponent *newChild);
151
152/*==============================================================================*/
153private:
154 virtual SoChildList *getChildren() const;
155
156 virtual void buildWidget(SoWidget parent, SbVec2i32 & rSize, SbVec2i32 & pos, SbBool isActive2d);
157 static void initClass();
158 static void exitClass();
159 virtual void updateFromSensor(SoSensor* sensor);
160 SbBool isVScrollVisible() {return m_vScrollVisible;};
161 void updateAfterSceneGraphChange();
162 virtual void resetSize();
163 virtual void destroyWidget();
164
165 // Internal child management following inheritance of classes.
166 virtual void internalRemoveChild( int index ) { removeChild(index); }
167 virtual void internalRemoveChild( SoNode *child ) { removeChild(internalFindChild(child)); }
168 virtual void internalRemoveAllChildren() { removeAllChildren(); }
169 virtual void internalAddChild( SoNode *child );
170 virtual int internalFindChild( const SoNode *child ) const;
171 virtual void internalInsertChild( SoNode *child, int newChildIndex );
172 virtual SoNode *internalGetChild( int index) const { return getChild(index); }
173 virtual void internalReplaceChild( int index, SoNode *newChild);
174 virtual void internalReplaceChild( SoNode *oldChild, SoNode *newChild) { replaceChild(dynamic_cast<SoDialogComponent*>(oldChild),dynamic_cast<SoDialogComponent*>(newChild) ); }
175
176private:
177
178 // Reads stuff into instance of SoGroup. Returns FALSE on error
179 virtual SbBool readInstance(SoInput *in, unsigned short flags);
180
181 // Reads just the children into instance of SoGroup. Returns FALSE on error
182 virtual SbBool readChildren(SoInput *in);
183
184 int m_arrayNumChildren;
185 SbVec2i32* m_childrenMin;
186 SbVec2i32* m_childrenMax;
187 SbVec2i32* m_childrenSize;
188 int m_cptToResize;
189 SbBool m_hScrollVisible;
190 SbBool m_vScrollVisible;
191 SoWidget m_groupWidget;
192 SoWidget m_horzSBXt;
193 SoWidget m_vertSBXt;
194 int m_numberOfChildren;
195 SbBool m_firstBuild;
196
198 virtual ~SoDialogGroup();
199 virtual void fixSizeWithBorder(SbVec2i32 &size, int revert = 1);
200 virtual SbVec2i32 getLabelInitSize();
201 virtual SbVec2i32 getComponentInitSize();
202
203 virtual void getSize(SbVec2i32 &size, SbVec2i32 &min, SbVec2i32 &max);
204 virtual void setChildrenComponentSize() {};
205 virtual void setChildrenLabelSize() {};
206 virtual void setComponentSize(SbVec2i32& size);
207 virtual void setLabelSize(SbVec2i32& size);
208 void setScrollProperties();
209 void updateGroupWidgetScrollPosition();
210 void updateChildrenSizeDB();
211
212 virtual void changeEnable();
213 virtual void changeWidgetEnable(SbBool state);
214
215 private:
216
217 void createGroupWidget(SbVec2i32 & rSize, SbVec2i32 & pos);
218 virtual void applyAuditor(SoDialogViz* dlgCpt);
219
220
221 SoDialogGroupAuditor* m_defaultAuditor;
222
224// 3D methods
225private:
226 virtual void show3D(SbBool show);
227 virtual void change3DPosition();
228 virtual void change3DEnable();
229 virtual void change3DWidgetEnable(SbBool state);
230
232private:
233 virtual void getBoundingBox(SoGetBoundingBoxAction* action);
234 virtual void rayPick(SoRayPickAction *action);
235 virtual void search(SoSearchAction *action);
236 virtual void write(SoWriteAction *action);
237
239
240};
241
242#endif // _SO_DIALOG_GROUP_
243
244
Class for smart character strings.
Definition SbString.h:202
2D vector class.
Definition SbVec.h:517
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Dialog auditor
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
SoDialogViz * searchForAuditorId(SbString id)
Retrieves the DialogViz object from the specified auditorID field in an SoDialogGroup structure.
SoSFBool windowResizedByChildren
Control the window sizing when a child is added or removed.
virtual void removeChild(SoDialogComponent *child)
Removes first instance of given child from group.
virtual void removeAllChildren()
Removes all children from group.
virtual void insertChild(SoDialogComponent *child, int newChildIndex)
Adds a child so that it becomes the one with the given index.
virtual void addChild(SoDialogComponent *child)
Adds a child as last one in group.
virtual int findChild(const SoDialogComponent *child) const
Finds index of given child within group.
void removeAuditor(SoDialogAuditor *auditor)
Removes the specified DialogGroupAuditor from the auditor list.
virtual void removeChild(int index)
Removes child with given index from group.
void addAuditor(SoDialogAuditor *auditor)
Adds a dialogGroupAuditor to the current column component.
virtual int getNumChildren() const
Returns number of children.
SoSFInt32 margin
Specifies the margin width.
virtual SoNode * getChild(int index) const
Returns pointer to child node with the given index.
void applyAuditors()
Applies all DialogGroupAuditors in the auditor list.
SoSFEnum vScrollVisibility
Control how vertical scrollbar appears.
@ AUTO
Automatic scroll bar : displayed when needed (Default).
@ NEVER
Scroll bar never displayed.
@ ALWAYS
Sscroll bar always visible.
virtual void replaceChild(SoDialogComponent *oldChild, SoDialogComponent *newChild)
Replaces first instance of given child with new child.
SoSFEnum hScrollVisibility
Control how horizontal scrollbar appears.
virtual void replaceChild(int index, SoDialogComponent *newChild)
Replaces child with given index with new child.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract base cl...
Computes bounding box of a scene.
Used to read Open Inventor data files.
Definition SoInput.h:363
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.
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Searches for nodes in a scene graph.
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100
Writes a scene graph to a file.
int SbBool
Boolean type.
Definition SbBase.h:87