00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ROOT_TBrowser
00014 #define ROOT_TBrowser
00015
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00028
00029 #ifndef ROOT_TNamed
00030 #include "TNamed.h"
00031 #endif
00032 #ifndef ROOT_TBrowserImp
00033 #include "TBrowserImp.h"
00034 #endif
00035
00036
00037 class TContextMenu;
00038 class TBrowserTimer;
00039
00040
00041 class TBrowser : public TNamed {
00042
00043 private:
00044 TObject *fLastSelectedObject;
00045
00046 protected:
00047 TBrowserImp *fImp;
00048 TBrowserTimer *fTimer;
00049 TContextMenu *fContextMenu;
00050 Bool_t fNeedRefresh;
00051
00052 public:
00053 enum {
00054 kNoHidden = BIT(9)
00055 };
00056
00057 TBrowser(const char *name="Browser", const char *title="ROOT Object Browser");
00058 TBrowser(const char *name, const char *title, UInt_t width, UInt_t height);
00059 TBrowser(const char *name, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height);
00060 TBrowser(const char *name, TObject *obj, const char *title="ROOT Object Browser");
00061 TBrowser(const char *name, TObject *obj, const char *title, UInt_t width, UInt_t height);
00062 TBrowser(const char *name, TObject *obj, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height);
00063 virtual ~TBrowser();
00064
00065 void Add(TObject *obj, const char *name = 0);
00066 virtual void Create(TObject *obj = 0);
00067 void ExecuteDefaultAction(TObject *obj);
00068 TBrowserImp *GetBrowserImp() const { return fImp; }
00069 TContextMenu *GetContextMenu() const { return fContextMenu; }
00070 Bool_t GetRefreshFlag() const { return fNeedRefresh; }
00071 TObject *GetSelected() const { return fLastSelectedObject; }
00072 void SetRefreshFlag(Bool_t flag) { fNeedRefresh = flag; }
00073 void Iconify() { fImp->Iconify(); }
00074 virtual void RecursiveRemove(TObject *obj);
00075 void Refresh();
00076 void SetSelected(TObject *clickedObject);
00077 void Show() { fImp->Show(); }
00078
00079 ClassDef(TBrowser,0)
00080 };
00081
00082 #endif