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
00072 class SoMenuPushButton : public SoMenuItem
00073 {
00074 SO_DG_HEADER(SoMenuPushButton);
00075
00076 public:
00077
00081 SoMenuPushButton();
00082
00086 SoSFString accelerator;
00087
00091 void addAuditor(SoMenuPushButtonAuditor* auditor);
00092
00096 void removeAuditor(SoMenuPushButtonAuditor* auditor);
00097
00098
00099 private:
00100 virtual void buildMenu(void* parent, SbBool is2dRender, int index = -1);
00101 static void initClass();
00102 static void exitClass();
00103 virtual void updateFromSensor(SoSensor* sensor);
00104 virtual void menuEvent(void* parent, int itemId);
00105 virtual void destroyNoDeleteMenuItem();
00106 void applyDlgCptAuditor();
00107
00108 private:
00109 void* m_pushButtonMenuWin;
00110 virtual ~SoMenuPushButton();
00111
00112 virtual void changeLabel();
00113 virtual void changeEnable();
00114
00115 private:
00116 void insertMenuItem(int index);
00117 void updateMenuItem();
00118
00120
00121 private:
00122 static char* MenuPushButton;
00123 static void change3DSkin();
00124 static SbBool isSkinLoaded();
00125 static void setSkinLoaded(SbBool loaded);
00126
00127 private:
00128
00129 SO_DG_CATALOG_ENTRY_HEADER( btnSep );
00130 SO_DG_CATALOG_ENTRY_HEADER( btnSwtch );
00131 SO_DG_CATALOG_ENTRY_HEADER( released );
00132 SO_DG_CATALOG_ENTRY_HEADER( pressed );
00133
00134 SoScale* menuPushButtonFrameScale;
00135 SoTransform* menuPushButtonFrameTransform;
00136
00137 virtual void draggerStartCallback3D();
00138 virtual void draggerFinishCallback3D();
00139 virtual void add3DCallbackMethods();
00140 static void startCB3D( void *, SoDragger *inDragger );
00141 static void finishCB3D( void *, SoDragger *inDragger );
00142
00143 private:
00144 FIELD_SENSOR(accelerator);
00145 static SbBool m_isSkinLoaded;
00146
00147 void create3DPushButton(int index);
00148 void update3DPushButton();
00149 void changeAccelerator();
00150
00152
00153 };
00154
00155 #endif // _SO_MENU_PUSH_BUTTON_
00156
00157
00158