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_DIALOG_COMBO_BOX_
00024 #define _SO_DIALOG_COMBO_BOX_
00025
00026 #include <DialogViz/dialog/SoDialogChoice.h>
00027
00096 class SoDialogComboBox : public SoDialogChoice
00097 {
00098 SO_DG_HEADER(SoDialogComboBox);
00099
00100
00101 public:
00102
00106 SoDialogComboBox();
00107
00108
00109 private:
00110 SoWidget *m_itemWidget;
00111 virtual void buildWidget(SoWidget parent, SbVec2i32 &rSize, SbVec2i32 & pos, SbBool isActive2d);
00112 virtual void destroyWidget();
00113 void eventNotify(unsigned int event, uintptr_t lParam);
00114 static void initClass();
00115 static void exitClass();
00116 SoWidget m_comboBoxWidget;
00117
00118 void updateComboBoxWidget();
00119 void updateLabelWidget();
00120
00121 private:
00122 virtual ~SoDialogComboBox();
00123
00124 private:
00125 SbVec2i32 m_olSize, m_ocSize;
00126 void createComboBoxWidget();
00127 void createLabelWidget();
00128 virtual SbVec2i32 getComponentInitSize();
00129 virtual void getDefaultSize(SbVec2i32 &size, SbVec2i32 &min, SbVec2i32 &max);
00130
00131
00132 virtual void changeItems();
00133 virtual void changeSelectedItem();
00134 virtual void changeLabel();
00135 virtual void changeLabelVisibility();
00136 virtual void changeLabelAlignment();
00137 virtual void changeEnable();
00138 virtual void changeWidgetEnable(SbBool state);
00139 virtual void changeEdgeStyle();
00140
00142
00143 private:
00144 static char* DialogComboBox;
00145 static void change3DSkin();
00146 static SbBool isSkinLoaded();
00147 static void setSkinLoaded(SbBool loaded);
00148
00149 private:
00150 SO_DG_CATALOG_ENTRY_HEADER( labelSep );
00151 SO_DG_CATALOG_ENTRY_HEADER( labelSwitch );
00152 SO_DG_CATALOG_ENTRY_HEADER( labelProp );
00153 SO_DG_CATALOG_ENTRY_HEADER( frameSep );
00154 SO_DG_CATALOG_ENTRY_HEADER( frame );
00155 SO_DG_CATALOG_ENTRY_HEADER( textSep );
00156 SO_DG_CATALOG_ENTRY_HEADER( textProp );
00157 SO_DG_CATALOG_ENTRY_HEADER( buttonSep );
00158 SO_DG_CATALOG_ENTRY_HEADER( buttonSwitch );
00159 SO_DG_CATALOG_ENTRY_HEADER( buttonReleased );
00160 SO_DG_CATALOG_ENTRY_HEADER( buttonPressed );
00161 SO_DG_CATALOG_ENTRY_HEADER( itemsSwitch );
00162 SO_DG_CATALOG_ENTRY_HEADER( itemStrucSep );
00163 SO_DG_CATALOG_ENTRY_HEADER( itemSep );
00164 SO_DG_CATALOG_ENTRY_HEADER( itemFrame );
00165 SO_DG_CATALOG_ENTRY_HEADER( itemTextSep );
00166 SO_DG_CATALOG_ENTRY_HEADER( itemTextProp );
00167
00168 SoScale *comboBoxFrameScale;
00169 SoText3 *comboBoxText, *comboBoxItemText;
00170 SoTransform *comboBoxFrameTransform, *comboBoxButtonTransform, *comboBoxItemTransform;
00171 SoTranslation *comboBoxFrameTranslation, *comboBoxTextTranslation, \
00172 *comboBoxItemsTranslation, *comboBoxButtonTranslation, \
00173 *comboBoxItemTranslation, *comboBoxItemTextTranslation;
00174
00175 private:
00176
00177 SoNodeList m_item3DTextList;
00178 SoNodeList m_item3DItemList;
00179 SbBox3f m_textCachedBBox;
00180
00181 void create3DDialogComboBox();
00182 void update3DComboBox();
00183 void update3DLabel();
00184
00185 virtual void change3DLabel();
00186 virtual void change3DLabelAlignment();
00187 virtual void change3DLabelVisibility();
00188 virtual void change3DSelectedItem();
00189 void change3DItems();
00190 virtual void set3DInactive();
00191
00192 static void startCB3D( void *, SoDragger *inDragger );
00193 void draggerStartCallback3D();
00194
00195 SbBool m_isOpenedDropDown;
00196
00197 static SbBool m_isSkinLoaded;
00198
00200
00201 };
00202
00203 #endif // _SO_DIALOG_COMBO_BOX_
00204
00205
00206