Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoMenuPushButton.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_
24#define _SO_MENU_PUSH_BUTTON_
25
26#include <DialogViz/dialog/SoMenuItem.h>
27
29
73{
74 SO_DG_HEADER(SoMenuPushButton);
75
76 public:
77
82
87
92
97
98/*==============================================================================*/
99private:
100 virtual void buildMenu(void* parent, SbBool is2dRender, int index = -1);
101 static void initClass();
102 static void exitClass();
103 virtual void updateFromSensor(SoSensor* sensor);
104 virtual void menuEvent(void* parent, int itemId);
105 virtual void destroyNoDeleteMenuItem();
106 void applyDlgCptAuditor();
107
108private:
109 void* m_pushButtonMenuWin;
110 virtual ~SoMenuPushButton();
111
112 virtual void changeLabel();
113 virtual void changeEnable();
114
115private:
116 void insertMenuItem(int index);
117 void updateMenuItem();
118
120// 3D methods
121private:
122 static char* MenuPushButton; //Internal default skin.
123 static void change3DSkin();
124 static SbBool isSkinLoaded();
125 static void setSkinLoaded(SbBool loaded);
126
127private:
128
129 SO_DG_CATALOG_ENTRY_HEADER( btnSep );
130 SO_DG_CATALOG_ENTRY_HEADER( btnSwtch );
131 SO_DG_CATALOG_ENTRY_HEADER( released );
132 SO_DG_CATALOG_ENTRY_HEADER( pressed );
133
134 SoScale* menuPushButtonFrameScale;
135 SoTransform* menuPushButtonFrameTransform;
136
137 virtual void draggerStartCallback3D();
138 virtual void draggerFinishCallback3D();
139 virtual void add3DCallbackMethods();
140 static void startCB3D( void *, SoDragger *inDragger );
141 static void finishCB3D( void *, SoDragger *inDragger );
142
143private:
144 FIELD_SENSOR(accelerator);
145 static SbBool m_isSkinLoaded;
146
147 void create3DPushButton(int index);
148 void update3DPushButton();
149 void changeAccelerator();
150
152
153};
154
155#endif // _SO_MENU_PUSH_BUTTON_
156
157
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> Abstract class f...
Definition SoMenuItem.h:79
<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 pushbutton ...
void removeAuditor(SoMenuPushButtonAuditor *auditor)
Remove the defined pushButtonAuditor from the auditor list.
SoMenuPushButton()
Constructor.
void addAuditor(SoMenuPushButtonAuditor *auditor)
Add a menuPushButtonAuditor to current PushButton component.
SoSFString accelerator
Defines the menu item accelerator key.
Field containing a string.
Definition SoSFString.h:117
Node representing a 3D geometric scaling.
Definition SoScale.h:96
Abstract base class for Open Inventor sensors.
Definition SoSensor.h:100
General 3D geometric transformation node.
int SbBool
Boolean type.
Definition SbBase.h:87