#ifndef ROOT_TGedEditor
#define ROOT_TGedEditor
#ifndef ROOT_TGFrame
#include "TGFrame.h"
#endif
#ifndef ROOT_TVirtualPadEditor
#include "TVirtualPadEditor.h"
#endif
#ifndef ROOT_TList
#include "TList.h"
#endif
#ifndef ROOT_TMap
#include "TMap.h"
#endif
class TCanvas;
class TGCanvas;
class TGTab;
class TGTabElement;
class TVirtualPad;
class TGedFrame;
class TGedNameFrame;
class TGedTabInfo;
class TGedEditor : public TVirtualPadEditor, public TGMainFrame
{
private:
TGedEditor(const TGedEditor&);
TGedEditor& operator=(const TGedEditor&);
protected:
TMap fFrameMap;
TMap fExclMap;
TList fGedFrames;
TGCanvas *fCan;
TGTab *fTab;
TList fCreatedTabs;
TList fVisibleTabs;
TGCompositeFrame *fTabContainer;
TObject *fModel;
TVirtualPad *fPad;
TCanvas *fCanvas;
TClass *fClass;
Bool_t fGlobal;
void ConfigureGedFrames(Bool_t objChaged);
virtual TGedFrame* CreateNameFrame(const TGWindow* parent, const char* tab_name);
static TGedEditor *fgFrameCreator;
public:
TGedEditor(TCanvas* canvas = 0, UInt_t width = 175, UInt_t height = 20);
virtual ~TGedEditor();
void PrintFrameStat();
virtual void Update(TGedFrame* frame = 0);
void ReinitWorkspace();
void ActivateEditor (TClass* cl, Bool_t recurse);
void ActivateEditors(TList* bcl, Bool_t recurse);
void ExcludeClassEditor(TClass* cl, Bool_t recurse = kFALSE);
void InsertGedFrame(TGedFrame* f);
TGCanvas* GetTGCanvas() const { return fCan; }
TGTab* GetTab() const { return fTab; }
virtual TGCompositeFrame* GetEditorTab(const char* name);
virtual TGedTabInfo* GetEditorTabInfo(const char* name);
virtual TCanvas* GetCanvas() const { return fCanvas; }
virtual TVirtualPad* GetPad() const { return fPad; }
virtual TObject* GetModel() const { return fModel; }
virtual void CloseWindow();
virtual void ConnectToCanvas(TCanvas *c);
virtual void DisconnectFromCanvas();
virtual Bool_t IsGlobal() const { return fGlobal; }
virtual void Hide();
virtual void GlobalClosed();
virtual void SetCanvas(TCanvas *c);
virtual void SetGlobal(Bool_t global);
virtual void GlobalSetModel(TVirtualPad *, TObject *, Int_t);
virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
virtual void Show();
virtual void RecursiveRemove(TObject* obj);
static TGedEditor* GetFrameCreator();
static void SetFrameCreator(TGedEditor* e);
ClassDef(TGedEditor,0)
};
#endif