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_LAUNCHER_
00024 #define _SO_MENU_PUSH_BUTTON_LAUNCHER_
00025
00026 #include <DialogViz/dialog/SoMenuPushButton.h>
00027 #include <DialogViz/dialog/SoTopLevelDialog.h>
00028
00061 class SoMenuPushButtonLauncher : public SoMenuPushButton
00062 {
00063 SO_DG_HEADER(SoMenuPushButtonLauncher);
00064
00065 public:
00066
00070 SoMenuPushButtonLauncher();
00071
00076 SoDialogViz* searchForAuditorId(SbString id);
00077
00081 virtual void addChild(SoTopLevelDialog *child);
00082
00086 virtual void insertChild(SoTopLevelDialog *child, int newChildIndex);
00087
00091 virtual SoNode *getChild(int index) const;
00092
00096 virtual int getNumChildren() const;
00097
00101 virtual int findChild(const SoTopLevelDialog *child) const;
00102
00106 virtual void removeChild(int index);
00107
00111 virtual void removeChild(SoTopLevelDialog *child);
00112
00116 virtual void removeAllChildren();
00117
00121 virtual void replaceChild(int index, SoTopLevelDialog *newChild);
00122
00126 virtual void replaceChild(SoTopLevelDialog *oldChild, SoTopLevelDialog *newChild);
00127
00128
00129
00130 private:
00131
00132 virtual SoChildList *getChildren() const;
00133
00134 static void initClass();
00135 static void exitClass();
00136 virtual void buildMenu(void* parent, SbBool isActive2d, int index = -1);
00137 virtual void menuEvent(void* parent, int itemId);
00138
00139
00140 virtual void internalRemoveChild( int index ) { removeChild(index); }
00141 virtual void internalRemoveChild( SoNode *child ) { removeChild(findChild(dynamic_cast<SoTopLevelDialog*>(child))); }
00142 virtual void internalRemoveAllChildren() { removeAllChildren(); }
00143 virtual void internalAddChild( SoNode *child ) { addChild(dynamic_cast<SoTopLevelDialog*>(child)); }
00144 virtual int internalFindChild( const SoNode *child ) const { return findChild(dynamic_cast<const SoTopLevelDialog*>(child)); }
00145 virtual void internalInsertChild( SoNode *child, int newChildIndex ) { insertChild(dynamic_cast<SoTopLevelDialog*>(child), newChildIndex); }
00146 virtual SoNode *internalGetChild( int index) const { return getChild(index); }
00147 virtual void internalReplaceChild( int index, SoNode *newChild) { replaceChild(index, dynamic_cast<SoTopLevelDialog*>(newChild)); }
00148 virtual void internalReplaceChild( SoNode *oldChild, SoNode *newChild) { replaceChild(dynamic_cast<SoTopLevelDialog*>(oldChild),dynamic_cast<SoTopLevelDialog*>(newChild)); }
00149
00150 private:
00151
00152
00153 virtual SbBool readInstance(SoInput *in, unsigned short flags);
00154
00155
00156 virtual SbBool readChildren(SoInput *in);
00157
00158 virtual ~SoMenuPushButtonLauncher();
00159
00160 private:
00161 int m_numberOfChildren;
00162
00163 private:
00164 virtual void search(SoSearchAction *action);
00165 virtual void rayPick(SoRayPickAction *action);
00166 virtual void write(SoWriteAction *action);
00167
00169
00170 private:
00171
00172 private:
00173 virtual void draggerStartCallback3D();
00174 virtual void draggerFinishCallback3D();
00175
00177
00178 };
00179
00180 #endif // _SO_MENU_PUSH_BUTTON_LAUNCHER_
00181
00182
00183