00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGeoTabManager
00013 #define ROOT_TGeoTabManager
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ROOT_TGFrame
00024 #include "TGFrame.h"
00025 #endif
00026
00027 #ifndef ROOT_TMap
00028 #include "TMap.h"
00029 #endif
00030
00031 class TVirtualPad;
00032 class TClass;
00033
00034 class TList;
00035 class TGCompositeFrame;
00036 class TGLabel;
00037 class TGTab;
00038 class TGComboBox;
00039 class TGListTree;
00040 class TGListTreeItem;
00041 class TGCanvas;
00042
00043 class TGedEditor;
00044
00045 class TGeoShape;
00046 class TGeoVolume;
00047 class TGeoMedium;
00048 class TGeoMaterial;
00049 class TGeoMatrix;
00050
00051 class TGeoTreeDialog;
00052 class TGeoTransientPanel;
00053
00054 class TGeoTabManager : public TObject {
00055 friend class TGeoManagerEditor;
00056 private:
00057 TGedEditor *fGedEditor;
00058 TVirtualPad *fPad;
00059 TGTab *fTab;
00060 TGeoVolume *fVolume;
00061 TGeoTransientPanel *fShapePanel;
00062 TGeoTransientPanel *fMediumPanel;
00063 TGeoTransientPanel *fMaterialPanel;
00064 TGeoTransientPanel *fMatrixPanel;
00065 TGCompositeFrame *fVolumeTab;
00066
00067 static TMap fgEditorToMgrMap;
00068
00069 void GetEditors(TClass *cl);
00070 public:
00071 TGeoTabManager(TGedEditor *ged);
00072 virtual ~TGeoTabManager();
00073
00074 static TGeoTabManager *GetMakeTabManager(TGedEditor *ged);
00075 static void Cleanup(TGCompositeFrame *frame);
00076 TVirtualPad *GetPad() const {return fPad;}
00077 TGTab *GetTab() const {return fTab;}
00078 Int_t GetTabIndex() const;
00079 static void MoveFrame(TGCompositeFrame *fr, TGCompositeFrame *p);
00080 void SetVolTabEnabled(Bool_t flag=kTRUE);
00081 void SetModel(TObject *model);
00082 void SetTab();
00083
00084 void GetShapeEditor(TGeoShape *shape);
00085 void GetVolumeEditor(TGeoVolume *vol);
00086 void GetMatrixEditor(TGeoMatrix *matrix);
00087 void GetMediumEditor(TGeoMedium *medium);
00088 void GetMaterialEditor(TGeoMaterial *material);
00089
00090 TGCompositeFrame *GetVolumeTab() const {return fVolumeTab;}
00091 TGeoVolume *GetVolume() const {return fVolume;}
00092
00093 ClassDef(TGeoTabManager, 0)
00094 };
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104 class TGeoTreeDialog : public TGTransientFrame {
00105
00106 protected:
00107 static TObject *fgSelectedObj;
00108 TGCanvas *fCanvas;
00109 TGLabel *fObjLabel;
00110 TGListTree *fLT;
00111 TGCompositeFrame *f1;
00112 TGTextButton *fClose;
00113
00114 virtual void BuildListTree() = 0;
00115 virtual void ConnectSignalsToSlots() = 0;
00116 public:
00117 TGeoTreeDialog(TGFrame *caller, const TGWindow *main, UInt_t w = 1, UInt_t h = 1);
00118 virtual ~TGeoTreeDialog();
00119
00120 static TObject *GetSelected();
00121
00122 virtual void DoClose() = 0;
00123 virtual void DoItemClick(TGListTreeItem *item, Int_t btn) = 0;
00124 void DoSelect(TGListTreeItem *item);
00125
00126 ClassDef(TGeoTreeDialog, 0)
00127 };
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137 class TGeoVolumeDialog : public TGeoTreeDialog {
00138
00139 protected:
00140 virtual void BuildListTree();
00141 virtual void ConnectSignalsToSlots();
00142
00143 public:
00144 TGeoVolumeDialog(TGFrame *caller, const TGWindow *main, UInt_t w = 1, UInt_t h = 1);
00145 virtual ~TGeoVolumeDialog() {;}
00146
00147
00148 virtual void DoClose();
00149 virtual void DoItemClick(TGListTreeItem *item, Int_t btn);
00150
00151 ClassDef(TGeoVolumeDialog, 0)
00152 };
00153
00154
00155
00156
00157
00158
00159
00160
00161
00162 class TGeoShapeDialog : public TGeoTreeDialog {
00163
00164 protected:
00165 virtual void BuildListTree();
00166 virtual void ConnectSignalsToSlots();
00167
00168 public:
00169 TGeoShapeDialog(TGFrame *caller, const TGWindow *main, UInt_t w = 1, UInt_t h = 1);
00170 virtual ~TGeoShapeDialog() {;}
00171
00172
00173 virtual void DoClose();
00174 virtual void DoItemClick(TGListTreeItem *item, Int_t btn);
00175
00176 ClassDef(TGeoShapeDialog, 0)
00177 };
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187 class TGeoMediumDialog : public TGeoTreeDialog {
00188
00189 protected:
00190 virtual void BuildListTree();
00191 virtual void ConnectSignalsToSlots();
00192
00193 public:
00194 TGeoMediumDialog(TGFrame *caller, const TGWindow *main, UInt_t w = 1, UInt_t h = 1);
00195 virtual ~TGeoMediumDialog() {;}
00196
00197
00198 virtual void DoClose();
00199 virtual void DoItemClick(TGListTreeItem *item, Int_t btn);
00200
00201 ClassDef(TGeoMediumDialog, 0)
00202 };
00203
00204
00205
00206
00207
00208
00209
00210
00211
00212 class TGeoMaterialDialog : public TGeoTreeDialog {
00213
00214 protected:
00215 virtual void BuildListTree();
00216 virtual void ConnectSignalsToSlots();
00217
00218 public:
00219 TGeoMaterialDialog(TGFrame *caller, const TGWindow *main, UInt_t w = 1, UInt_t h = 1);
00220 virtual ~TGeoMaterialDialog() {;}
00221
00222
00223 virtual void DoClose();
00224 virtual void DoItemClick(TGListTreeItem *item, Int_t btn);
00225
00226 ClassDef(TGeoMaterialDialog, 0)
00227 };
00228
00229
00230
00231
00232
00233
00234
00235
00236
00237 class TGeoMatrixDialog : public TGeoTreeDialog {
00238
00239 protected:
00240 virtual void BuildListTree();
00241 virtual void ConnectSignalsToSlots();
00242
00243 public:
00244 TGeoMatrixDialog(TGFrame *caller, const TGWindow *main, UInt_t w = 1, UInt_t h = 1);
00245 virtual ~TGeoMatrixDialog() {;}
00246
00247
00248 virtual void DoClose();
00249 virtual void DoItemClick(TGListTreeItem *item, Int_t btn);
00250
00251 ClassDef(TGeoMatrixDialog, 0)
00252 };
00253
00254
00255
00256
00257
00258
00259
00260
00261
00262 class TGeoTransientPanel : public TGMainFrame {
00263 TGedEditor *fGedEditor;
00264 TGCanvas *fCan;
00265 TGTab *fTab;
00266 TGCompositeFrame *fTabContainer;
00267 TGCompositeFrame *fStyle;
00268 TObject *fModel;
00269 TGTextButton *fClose;
00270
00271 public:
00272 TGeoTransientPanel(TGedEditor* ged, const char *name, TObject *obj);
00273 virtual ~TGeoTransientPanel();
00274
00275 virtual void CloseWindow();
00276 virtual void DeleteEditors();
00277
00278 TGTab *GetTab() const {return fTab;}
00279 TGCompositeFrame *GetStyle() const {return fStyle;}
00280 TObject *GetModel() const {return fModel;}
00281
00282 void GetEditors(TClass *cl);
00283 virtual void Hide();
00284 virtual void Show();
00285 void SetModel(TObject *model);
00286
00287 ClassDef(TGeoTransientPanel, 0)
00288 };
00289
00290 #endif