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
00060 class SoMenuPushButtonLauncher : public SoMenuPushButton
00061 {
00062 SO_DG_HEADER(SoMenuPushButtonLauncher);
00063
00064 public:
00065
00069 SoMenuPushButtonLauncher();
00070
00075 SoDialogViz* searchForAuditorId(SbString id);
00076
00080 virtual void addChild(SoTopLevelDialog *child);
00081
00085 virtual void insertChild(SoTopLevelDialog *child, int newChildIndex);
00086
00090 virtual SoNode *getChild(int index) const;
00091
00095 virtual int getNumChildren() const;
00096
00100 virtual int findChild(const SoTopLevelDialog *child) const;
00101
00105 virtual void removeChild(int index);
00106
00110 virtual void removeChild(SoTopLevelDialog *child);
00111
00115 virtual void removeAllChildren();
00116
00120 virtual void replaceChild(int index, SoTopLevelDialog *newChild);
00121
00125 virtual void replaceChild(SoTopLevelDialog *oldChild, SoTopLevelDialog *newChild);
00126
00127
00128
00129 private:
00130
00131 virtual SoChildList *getChildren() const;
00132
00133 static void initClass();
00134 static void exitClass();
00135 virtual void buildMenu(void* parent, SbBool isActive2d, int index = -1);
00136 virtual void menuEvent(void* parent, int itemId);
00137
00138
00139 virtual void internalRemoveChild( int index ) { removeChild(index); }
00140 virtual void internalRemoveChild( SoNode *child ) { removeChild(findChild(dynamic_cast<SoTopLevelDialog*>(child))); }
00141 virtual void internalRemoveAllChildren() { removeAllChildren(); }
00142 virtual void internalAddChild( SoNode *child ) { addChild(dynamic_cast<SoTopLevelDialog*>(child)); }
00143 virtual int internalFindChild( const SoNode *child ) const { return findChild(dynamic_cast<const SoTopLevelDialog*>(child)); }
00144 virtual void internalInsertChild( SoNode *child, int newChildIndex ) { insertChild(dynamic_cast<SoTopLevelDialog*>(child), newChildIndex); }
00145 virtual SoNode *internalGetChild( int index) const { return getChild(index); }
00146 virtual void internalReplaceChild( int index, SoNode *newChild) { replaceChild(index, dynamic_cast<SoTopLevelDialog*>(newChild)); }
00147 virtual void internalReplaceChild( SoNode *oldChild, SoNode *newChild) { replaceChild(dynamic_cast<SoTopLevelDialog*>(oldChild),dynamic_cast<SoTopLevelDialog*>(newChild)); }
00148
00149 private:
00150
00151
00152 virtual SbBool readInstance(SoInput *in, unsigned short flags);
00153
00154
00155 virtual SbBool readChildren(SoInput *in);
00156
00157 virtual ~SoMenuPushButtonLauncher();
00158
00159 private:
00160 int m_numberOfChildren;
00161
00162 private:
00163 virtual void search(SoSearchAction *action);
00164 virtual void rayPick(SoRayPickAction *action);
00165 virtual void write(SoWriteAction *action);
00166
00168
00169 private:
00170
00171 private:
00172 virtual void draggerStartCallback3D();
00173 virtual void draggerFinishCallback3D();
00174
00176
00177 };
00178
00179 #endif // _SO_MENU_PUSH_BUTTON_LAUNCHER_
00180
00181
00182