Open Inventor Release 2023.2.3
 
Loading...
Searching...
No Matches
SoMenuRadioButtons.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_RADIO_BUTTONS_
24#define _SO_MENU_RADIO_BUTTONS_
25
29
31
76{
78
79 public:
80
85
90
95
100
105
110
111 /*==============================================================================*/
112 private:
113 virtual void buildMenu(void* parent, SbBool isActive2d, int index = -1);
114 static void initClass();
115 static void exitClass();
116 void menuEvent(void* parent, int itemId);
117 virtual void updateFromSensor(SoSensor* sensor);
118 virtual void destroyNoDeleteMenuItem();
119 void applyDlgCptAuditor();
120
121 private:
122
123 virtual ~SoMenuRadioButtons();
124
125 private:
126
127 int m_numItems;
128 int m_oldNumItems;
129 int m_index;
130
134
135 virtual SbVec2i32 getItemInitSize();
136 virtual void setItemSize(SbVec2i32 nSize, SbBool force = FALSE);
137
138 virtual void changeLabel();
139 virtual void changeEnable();
140 void changeSelectedItem();
141 void changeItems();
142 void changeAccelerators();
143
144 void** m_radioButtonsMenuWin;
145 void insertMenuItem(int index);
146 void updateMenuItem();
147 void verifySelectedItem();
148
150// 3D methods
151private:
152 static char* MenuRadioButtons; //Internal default skin.
153 static void change3DSkin();
154 static SbBool isSkinLoaded();
155 static void setSkinLoaded(SbBool loaded);
156
157private:
158 SO_DG_CATALOG_ENTRY_HEADER( radioSep );
159 SO_DG_CATALOG_ENTRY_HEADER( itemsSep );
160 SO_DG_CATALOG_ENTRY_HEADER( itemSwtch );
161 SO_DG_CATALOG_ENTRY_HEADER( stateOff );
163
164 SoTranslation* menuRadioButtonsShapeTranslation;
165 SoScale* menuRadioButtonsShapeScale;
166
167private:
168 SoNodeList m_item3DList;
169 SoNodeList m_item3DSwitchList;
170 SoNodeList m_item3DTextList;
171 SoNodeList m_item3DLabelTranslList;
172 static SbBool m_isSkinLoaded;
173
174 void create3DRadioButtons(int index);
175 void update3DRadioButtons();
176 void add3DItem(int index);
177
178 void change3DItems();
179 void change3DSelectedItem();
180
181 static void finishCB3D( void *, SoDragger *inDragger );
182 virtual void draggerFinishCallback3D();
183
185
186};
187
188#endif // _SO_MENU_RADIO_BUTTONS_
189
190
#define FALSE
Possible value of SbBool.
Definition SbBase.h:75
#define SO_DG_HEADER(className)
#define FIELD_SENSOR(field)
#define SO_DG_CATALOG_ENTRY_HEADER(resource)
2D vector class.
Definition SbVec.h:517
Base class for nodekits that move in response to click-drag-release mouse events.
Definition SoDragger.h:534
Multiple-value field containing any number of strings.
Definition SoMFString.h:116
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract class f...
Definition SoMenuItem.h:79
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu RadioButton...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Dialog RadioButt...
SoMFString accelerators
Defines the accelerator keys for each items.
SoMenuRadioButtons()
Constructor.
void addAuditor(SoMenuRadioButtonsAuditor *auditor)
Add a menuRadioButtonsAuditor to current RadioButtons component.
SoMFString items
List of string appearing in the component.
void removeAuditor(SoMenuRadioButtonsAuditor *auditor)
Remove the defined radioButtonsAuditor from the auditor list.
SoSFInt32 selectedItem
Selected choice.
Maintains a list of pointers to nodes.
Definition SoNodeList.h:74
Field containing a int32_t integer.
Definition SoSFInt32.h:80
Node representing a 3D geometric scaling.
Definition SoScale.h:96
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:97
Node representing a 3D translation.
int SbBool
Boolean type.
Definition SbBase.h:87