00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef _SO_MENU_PUSH_BUTTON_
00024 #define _SO_MENU_PUSH_BUTTON_
00025
00026 #include <DialogViz/dialog/SoMenuItem.h>
00027
00028 class SoMenuPushButtonAuditor;
00029
00073 class SoMenuPushButton : public SoMenuItem
00074 {
00075 SO_DG_HEADER(SoMenuPushButton);
00076
00077 public:
00078
00082 SoMenuPushButton();
00083
00087 SoSFString accelerator;
00088
00092 void addAuditor(SoMenuPushButtonAuditor* auditor);
00093
00097 void removeAuditor(SoMenuPushButtonAuditor* auditor);
00098
00099
00100 private:
00101 virtual void buildMenu(void* parent, SbBool is2dRender, int index = -1);
00102 static void initClass();
00103 static void exitClass();
00104 virtual void updateFromSensor(SoSensor* sensor);
00105 virtual void menuEvent(void* parent, int itemId);
00106 virtual void destroyNoDeleteMenuItem();
00107 void applyDlgCptAuditor();
00108
00109 private:
00110 void* m_pushButtonMenuWin;
00111 virtual ~SoMenuPushButton();
00112
00113 virtual void changeLabel();
00114 virtual void changeEnable();
00115
00116 private:
00117 void insertMenuItem(int index);
00118 void updateMenuItem();
00119
00121
00122 private:
00123 static char* MenuPushButton;
00124 static void change3DSkin();
00125 static SbBool isSkinLoaded();
00126 static void setSkinLoaded(SbBool loaded);
00127
00128 private:
00129
00130 SO_DG_CATALOG_ENTRY_HEADER( btnSep );
00131 SO_DG_CATALOG_ENTRY_HEADER( btnSwtch );
00132 SO_DG_CATALOG_ENTRY_HEADER( released );
00133 SO_DG_CATALOG_ENTRY_HEADER( pressed );
00134
00135 SoScale* menuPushButtonFrameScale;
00136 SoTransform* menuPushButtonFrameTransform;
00137
00138 virtual void draggerStartCallback3D();
00139 virtual void draggerFinishCallback3D();
00140 virtual void add3DCallbackMethods();
00141 static void startCB3D( void *, SoDragger *inDragger );
00142 static void finishCB3D( void *, SoDragger *inDragger );
00143
00144 private:
00145 FIELD_SENSOR(accelerator);
00146 static SbBool m_isSkinLoaded;
00147
00148 void create3DPushButton(int index);
00149 void update3DPushButton();
00150 void changeAccelerator();
00151
00153
00154 };
00155
00156 #endif // _SO_MENU_PUSH_BUTTON_
00157
00158
00159