#ifndef ROOT_TBrowser
#define ROOT_TBrowser
#ifndef ROOT_TNamed
#include "TNamed.h"
#endif
#ifndef ROOT_TBrowserImp
#include "TBrowserImp.h"
#endif
class TContextMenu;
class TBrowserTimer;
class TBrowser : public TNamed {
private:
TObject *fLastSelectedObject;
TBrowser(const TBrowser&);
TBrowser& operator=(const TBrowser&);
protected:
TBrowserImp *fImp;
TBrowserTimer *fTimer;
TContextMenu *fContextMenu;
Bool_t fNeedRefresh;
public:
enum {
kNoHidden = BIT(9)
};
TBrowser(const char *name="Browser", const char *title="ROOT Object Browser", TBrowserImp *extimp=0, Option_t *opt="");
TBrowser(const char *name, const char *title, UInt_t width, UInt_t height, TBrowserImp *extimp=0, Option_t *opt="");
TBrowser(const char *name, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, TBrowserImp *extimp=0, Option_t *opt="");
TBrowser(const char *name, TObject *obj, const char *title="ROOT Object Browser", Option_t *opt="");
TBrowser(const char *name, TObject *obj, const char *title, UInt_t width, UInt_t height, Option_t *opt="");
TBrowser(const char *name, TObject *obj, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt="");
TBrowser(const char *name, void *obj, TClass *cl, const char *objname="", const char *title="ROOT Foreign Browser", Option_t *opt="");
TBrowser(const char *name, void *obj, TClass *cl, const char *objname, const char *title, UInt_t width, UInt_t height, Option_t *opt="");
TBrowser(const char *name, void *obj, TClass *cl, const char *objname, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt="");
virtual ~TBrowser();
void Add(TObject *obj, const char *name = 0, Int_t check = -1);
void Add(void *obj, TClass *cl, const char *name = 0, Int_t check = -1);
void AddCheckBox(TObject *obj, Bool_t check = kFALSE);
void CheckObjectItem(TObject *obj, Bool_t check = kFALSE);
void RemoveCheckBox(TObject *obj);
virtual void Create(TObject *obj = 0);
void BrowseObject(TObject *obj) { fImp->BrowseObj(obj); }
void ExecuteDefaultAction(TObject *obj);
TBrowserImp *GetBrowserImp() const { return fImp; }
void SetBrowserImp(TBrowserImp *i) { fImp = i; }
TContextMenu *GetContextMenu() const { return fContextMenu; }
Bool_t GetRefreshFlag() const { return fNeedRefresh; }
TObject *GetSelected() const { return fLastSelectedObject; }
void SetRefreshFlag(Bool_t flag) { fNeedRefresh = flag; }
void Iconify() { fImp->Iconify(); }
virtual void RecursiveRemove(TObject *obj);
void Refresh();
void SetSelected(TObject *clickedObject);
void Show() { fImp->Show(); }
void SetDrawOption(Option_t *option="") { fImp->SetDrawOption(option); }
Option_t *GetDrawOption() const { return fImp->GetDrawOption(); }
Long_t ExecPlugin(const char *name = 0, const char *fname = 0,
const char *cmd = 0, Int_t pos = 1, Int_t subpos = -1) {
return fImp->ExecPlugin(name, fname, cmd, pos, subpos);
}
void SetStatusText(const char *txt, Int_t col) {
fImp->SetStatusText(txt, col);
}
void StartEmbedding(Int_t pos, Int_t subpos) {
fImp->StartEmbedding(pos, subpos);
}
void StopEmbedding(const char *name = "") { fImp->StopEmbedding(name); }
ClassDef(TBrowser,0)
};
#endif