Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoDialogComboBox.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_COMBO_BOX_
24#define _SO_DIALOG_COMBO_BOX_
25
26#include <DialogViz/dialog/SoDialogChoice.h>
27
96{
97 SO_DG_HEADER(SoDialogComboBox);
98
99
100 public:
101
106
107/*==============================================================================*/
108private:
109 SoWidget *m_itemWidget;
110 virtual void buildWidget(SoWidget parent, SbVec2i32 &rSize, SbVec2i32 & pos, SbBool isActive2d);
111 virtual void destroyWidget();
112 void eventNotify(unsigned int event, uintptr_t lParam);
113 static void initClass();
114 static void exitClass();
115 SoWidget m_comboBoxWidget;
116
117 void updateComboBoxWidget();
118 void updateLabelWidget();
119
120private:
121 virtual ~SoDialogComboBox();
122
123 private:
124 SbVec2i32 m_olSize, m_ocSize;
125 void createComboBoxWidget();
126 void createLabelWidget();
127 virtual SbVec2i32 getComponentInitSize();
128 virtual void getDefaultSize(SbVec2i32 &size, SbVec2i32 &min, SbVec2i32 &max);
129
130 // reflex function when fields change
131 virtual void changeItems();
132 virtual void changeSelectedItem();
133 virtual void changeLabel();
134 virtual void changeLabelVisibility();
135 virtual void changeLabelAlignment();
136 virtual void changeEnable();
137 virtual void changeWidgetEnable(SbBool state);
138 virtual void changeEdgeStyle();
139
141// 3D methods
142private:
143 static char* DialogComboBox; // Internal default skins.
144 static void change3DSkin();
145 static SbBool isSkinLoaded();
146 static void setSkinLoaded(SbBool loaded);
147
148private:
149 SO_DG_CATALOG_ENTRY_HEADER( labelSep );
150 SO_DG_CATALOG_ENTRY_HEADER( labelSwitch );
151 SO_DG_CATALOG_ENTRY_HEADER( labelProp );
152 SO_DG_CATALOG_ENTRY_HEADER( frameSep );
153 SO_DG_CATALOG_ENTRY_HEADER( frame );
154 SO_DG_CATALOG_ENTRY_HEADER( textSep );
155 SO_DG_CATALOG_ENTRY_HEADER( textProp );
156 SO_DG_CATALOG_ENTRY_HEADER( buttonSep );
157 SO_DG_CATALOG_ENTRY_HEADER( buttonSwitch );
158 SO_DG_CATALOG_ENTRY_HEADER( buttonReleased );
159 SO_DG_CATALOG_ENTRY_HEADER( buttonPressed );
160 SO_DG_CATALOG_ENTRY_HEADER( itemsSwitch );
161 SO_DG_CATALOG_ENTRY_HEADER( itemStrucSep );
162 SO_DG_CATALOG_ENTRY_HEADER( itemSep );
163 SO_DG_CATALOG_ENTRY_HEADER( itemFrame );
164 SO_DG_CATALOG_ENTRY_HEADER( itemTextSep );
165 SO_DG_CATALOG_ENTRY_HEADER( itemTextProp );
166
167 SoScale *comboBoxFrameScale;
168 SoText3 *comboBoxText, *comboBoxItemText;
169 SoTransform *comboBoxFrameTransform, *comboBoxButtonTransform, *comboBoxItemTransform;
170 SoTranslation *comboBoxFrameTranslation, *comboBoxTextTranslation, \
171 *comboBoxItemsTranslation, *comboBoxButtonTranslation, \
172 *comboBoxItemTranslation, *comboBoxItemTextTranslation;
173
174private:
175
176 SoNodeList m_item3DTextList;
177 SoNodeList m_item3DItemList;
178 SbBox3f m_textCachedBBox;
179
180 void create3DDialogComboBox();
181 void update3DComboBox();
182 void update3DLabel();
183
184 virtual void change3DLabel();
185 virtual void change3DLabelAlignment();
186 virtual void change3DLabelVisibility();
187 virtual void change3DSelectedItem();
188 void change3DItems();
189 virtual void set3DInactive();
190
191 static void startCB3D( void *, SoDragger *inDragger );
192 void draggerStartCallback3D();
193
194 SbBool m_isOpenedDropDown;
195
196 static SbBool m_isSkinLoaded;
197
199
200};
201
202#endif // _SO_DIALOG_COMBO_BOX_
203
204
3D box class.
Definition SbBox.h:649
2D vector class.
Definition SbVec.h:517
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract class f...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Dialog ComboBox ...
SoDialogComboBox()
Constructor.
Base class for nodekits that move in response to click-drag-release mouse events.
Definition SoDragger.h:537
Maintains a list of pointers to nodes.
Definition SoNodeList.h:74
Node representing a 3D geometric scaling.
Definition SoScale.h:96
3D text shape node.
Definition SoText3.h:204
General 3D geometric transformation node.
Node representing a 3D translation.
int SbBool
Boolean type.
Definition SbBase.h:87