Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
SoMenuCheckBox.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_CHECK_BOX_
24#define _SO_MENU_CHECK_BOX_
25
26#include <DialogViz/dialog/SoMenuItem.h>
27
29
75{
76 SO_DG_HEADER(SoMenuCheckBox);
77
78 public:
79
85
91
96
101
106
111
112 /*==============================================================================*/
113 private:
114 virtual void buildMenu(void* parent, SbBool isActive2d, int index = -1);
115 static void initClass();
116 static void exitClass();
117 virtual void menuEvent(void* parent, int itemId);
118 virtual void updateFromSensor(SoSensor* sensor);
119 virtual void destroyNoDeleteMenuItem();
120 void applyDlgCptAuditor();
121
122 private:
123 void* m_checkBoxMenuWin;
124
125 virtual ~SoMenuCheckBox();
126 virtual void changeLabel();
127 virtual void changeEnable();
128
129 private:
130 void changeState();
131 void changeOnString();
132 void changeAccelerator();
133 void insertMenuItem(int index);
134 void updateMenuItem();
135 virtual SbVec2i32 getItemInitSize();
136
137 FIELD_SENSOR(state);
138 FIELD_SENSOR(onString);
139 FIELD_SENSOR(accelerator);
140
142// 3D methods
143private:
144 static char* MenuCheckBox; //Internal default skin.
145 static void change3DSkin();
146 static SbBool isSkinLoaded();
147 static void setSkinLoaded(SbBool loaded);
148
149private:
150
151 SO_DG_CATALOG_ENTRY_HEADER( chkSep );
152 SO_DG_CATALOG_ENTRY_HEADER( chkSwtch );
153 SO_DG_CATALOG_ENTRY_HEADER( stateOff );
154 SO_DG_CATALOG_ENTRY_HEADER( stateOn );
155
156 SoTranslation* menuCheckBoxShapeTranslation;
157 void get3DOnStringCachedBBox(SbVec3f& min, SbVec3f& max);
158
159private:
160 SbBox3f m_onStringCachedBBox;
161 static SbBool m_isSkinLoaded;
162
163 void create3DCheckBox(int index);
164 void update3DCheckBox();
165
166 void change3DState();
167 void change3DOnString();
168
169 static void finishCB3D( void *, SoDragger *inDragger );
170 virtual void draggerFinishCallback3D();
171
173
174};
175
176#endif // _SO_MENU_CHECK_BOX_
177
178
3D box class.
Definition SbBox.h:649
2D vector class.
Definition SbVec.h:517
3D vector class.
Definition SbVec.h:932
Base class for nodekits that move in response to click-drag-release mouse events.
Definition SoDragger.h:537
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu CheckBox au...
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Menu pushbutton ...
void removeAuditor(SoMenuCheckBoxAuditor *auditor)
Remove the defined checkBoxAuditor from the auditor list.
void addAuditor(SoMenuCheckBoxAuditor *auditor)
Add a menuCheckBoxAuditor to current CheckBox component.
SoSFString accelerator
Defines the menu item accelerator key.
SoSFBool state
Specify the state of the check button.
SoSFString onString
This string appears when state is TRUE.
SoMenuCheckBox()
Constructor.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Abstract class f...
Definition SoMenuItem.h:79
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing a string.
Definition SoSFString.h:117
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100
Node representing a 3D translation.
int SbBool
Boolean type.
Definition SbBase.h:87