#ifndef ROOT_TGedFrame
#define ROOT_TGedFrame
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
class TVirtualPad;
class TCanvas;
class TGLabel;
class TGToolTip;
class TList;
class TGTab;
class TGedEditor;
class TGedFrame : public TGCompositeFrame {
public:
class TGedSubFrame : public TObject {
private:
TGedSubFrame(const TGedSubFrame&);
TGedSubFrame& operator=(const TGedSubFrame&);
public:
TString fName;
TGCompositeFrame *fFrame;
TGedSubFrame(TString n, TGCompositeFrame* f) : fName(n), fFrame(f) {}
};
private:
TGedFrame(const TGedFrame&);
TGedFrame& operator=(const TGedFrame&);
protected:
Bool_t fInit;
TGedEditor *fGedEditor;
TClass *fModelClass;
TGLayoutHints *fLayoutHints;
Bool_t fAvoidSignal;
TList *fExtraTabs;
Int_t fPriority;
virtual void MakeTitle(const char *title);
public:
TGedFrame(const TGWindow *p = 0,
Int_t width = 140, Int_t height = 30,
UInt_t options = kChildFrame,
Pixel_t back = GetDefaultFrameBackground());
virtual ~TGedFrame();
virtual void Update();
virtual Option_t *GetDrawOption() const;
virtual TGLayoutHints* GetLayoutHints();
TClass* GetModelClass() { return fModelClass; }
Int_t GetPriority() { return fPriority; }
TList* GetExtraTabs() { return fExtraTabs; }
TGedEditor* GetGedEditor() { return fGedEditor; }
virtual void AddExtraTab(TGedSubFrame* sf);
virtual TGVerticalFrame* CreateEditorTabSubFrame(const char* name);
virtual void Refresh(TObject *model);
virtual void SetDrawOption(Option_t *option="");
virtual Bool_t AcceptModel(TObject*) { return kTRUE; }
void SetModelClass(TClass* mcl) { fModelClass = mcl; }
virtual void SetModel(TObject* obj) = 0;
virtual void SetGedEditor(TGedEditor* ed) { fGedEditor = ed; }
virtual void ActivateBaseClassEditors(TClass* cl);
ClassDef(TGedFrame, 0);
};
class TGedNameFrame : public TGedFrame {
private:
TGedNameFrame(const TGedNameFrame&);
TGedNameFrame& operator=(const TGedNameFrame&);
protected:
TGLabel *fLabel;
TGCompositeFrame *f1, *f2;
TGToolTip *fTip;
public:
TGedNameFrame(const TGWindow *p =0 ,
Int_t width = 170, Int_t height = 30,
UInt_t options = kChildFrame,
Pixel_t back = GetDefaultFrameBackground());
virtual ~TGedNameFrame();
virtual Bool_t HandleButton(Event_t *event);
virtual Bool_t HandleCrossing(Event_t *event);
virtual void SetModel(TObject* obj);
ClassDef(TGedNameFrame,0)
};
#endif