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