Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

TBrowser.h

Go to the documentation of this file.
00001 // @(#)root/base:$Name:  $:$Id: TBrowser.h,v 1.9 2003/01/20 15:33:35 rdm Exp $
00002 // Author: Fons Rademakers   25/10/95
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 
00013 #ifndef ROOT_TBrowser
00014 #define ROOT_TBrowser
00015 
00017 //                                                                      //
00018 // TBrowser                                                             //
00019 //                                                                      //
00020 // Using a TBrowser on can browse all ROOT objects. It shows in a list  //
00021 // on the left side of the window all browsable ROOT classes. Selecting //
00022 // one of the classes displays, in the iconbox on the right side, all   //
00023 // objects in the class. Selecting one of the objects in the iconbox,   //
00024 // will place all browsable objects in a new list and draws the         //
00025 // contents of the selected class in the iconbox. And so on....         //
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;        //True if the browser needs refresh
00051 
00052 public:
00053    enum {
00054       kNoHidden     = BIT(9)   // don't show '.' files and directories
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);      // Create this Browser
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)  //ROOT Object Browser
00080 };
00081 
00082 #endif

Generated on Thu Dec 18 14:52:16 2003 for ROOT by doxygen1.2.16