00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TGedFrame
00013 #define ROOT_TGedFrame
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef ROOT_TGFrame
00024 #include "TGFrame.h"
00025 #endif
00026
00027 class TVirtualPad;
00028 class TCanvas;
00029 class TGLabel;
00030 class TGToolTip;
00031 class TList;
00032 class TGTab;
00033 class TGedEditor;
00034
00035 class TGedFrame : public TGCompositeFrame {
00036
00037 public:
00038
00039 class TGedSubFrame : public TObject {
00040 private:
00041 TGedSubFrame(const TGedSubFrame&);
00042 TGedSubFrame& operator=(const TGedSubFrame&);
00043 public:
00044 TString fName;
00045 TGCompositeFrame *fFrame;
00046
00047 TGedSubFrame(TString n, TGCompositeFrame* f) : fName(n), fFrame(f) {}
00048 };
00049
00050 private:
00051 TGedFrame(const TGedFrame&);
00052 TGedFrame& operator=(const TGedFrame&);
00053
00054 protected:
00055 Bool_t fInit;
00056 TGedEditor *fGedEditor;
00057 TClass *fModelClass;
00058 Bool_t fAvoidSignal;
00059
00060 TList *fExtraTabs;
00061 Int_t fPriority;
00062
00063 virtual void MakeTitle(const char *title);
00064
00065 public:
00066 TGedFrame(const TGWindow *p = 0,
00067 Int_t width = 140, Int_t height = 30,
00068 UInt_t options = kChildFrame,
00069 Pixel_t back = GetDefaultFrameBackground());
00070 virtual ~TGedFrame();
00071
00072 virtual void Update();
00073
00074 virtual Option_t *GetDrawOption() const;
00075
00076 TClass* GetModelClass() { return fModelClass; }
00077 Int_t GetPriority() { return fPriority; }
00078 TList* GetExtraTabs() { return fExtraTabs; }
00079 TGedEditor* GetGedEditor() { return fGedEditor; }
00080 virtual void AddExtraTab(TGedSubFrame* sf);
00081 virtual TGVerticalFrame* CreateEditorTabSubFrame(const char* name);
00082
00083 virtual void Refresh(TObject *model);
00084 virtual void SetDrawOption(Option_t *option="");
00085 virtual Bool_t AcceptModel(TObject*) { return kTRUE; }
00086 void SetModelClass(TClass* mcl) { fModelClass = mcl; }
00087 virtual void SetModel(TObject* obj) = 0;
00088 virtual void SetGedEditor(TGedEditor* ed) { fGedEditor = ed; }
00089 virtual void ActivateBaseClassEditors(TClass* cl);
00090
00091 ClassDef(TGedFrame, 0);
00092 };
00093
00094 class TGedNameFrame : public TGedFrame {
00095 private:
00096 TGedNameFrame(const TGedNameFrame&);
00097 TGedNameFrame& operator=(const TGedNameFrame&);
00098
00099 protected:
00100 TGLabel *fLabel;
00101 TGCompositeFrame *f1, *f2;
00102 TGToolTip *fTip;
00103
00104 public:
00105 TGedNameFrame(const TGWindow *p =0 ,
00106 Int_t width = 170, Int_t height = 30,
00107 UInt_t options = kChildFrame,
00108 Pixel_t back = GetDefaultFrameBackground());
00109 virtual ~TGedNameFrame();
00110
00111 virtual Bool_t HandleButton(Event_t *event);
00112 virtual Bool_t HandleCrossing(Event_t *event);
00113
00114 virtual void SetModel(TObject* obj);
00115
00116 ClassDef(TGedNameFrame,0)
00117 };
00118
00119 #endif
00120