TBrowserImp.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TBrowserImp.h 30884 2009-10-27 12:26:33Z rdm $
00002 // Author: Fons Rademakers   15/11/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_TBrowserImp
00014 #define ROOT_TBrowserImp
00015 
00016 //////////////////////////////////////////////////////////////////////////
00017 //                                                                      //
00018 // TBrowserImp                                                          //
00019 //                                                                      //
00020 // ABC describing GUI independent browser implementation protocol.      //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 #ifndef ROOT_TObject
00025 #include "TObject.h"
00026 #endif
00027 
00028 class TBrowser;
00029 class TGMainFrame;
00030 
00031 class TBrowserImp {
00032 
00033 protected:
00034    TBrowser  *fBrowser;     //TBrowser associated with this implementation
00035    Bool_t     fShowCycles;  //Show object cycle numbers in browser
00036 
00037    TBrowserImp(const TBrowserImp& br)
00038      : fBrowser(br.fBrowser), fShowCycles(br.fShowCycles) { }
00039    TBrowserImp& operator=(const TBrowserImp& br)
00040      {if(this!=&br) {fBrowser=br.fBrowser; fShowCycles=br.fShowCycles;}
00041      return *this;}
00042 
00043 public:
00044    TBrowserImp(TBrowser *b=0) : fBrowser(b), fShowCycles(kFALSE) { }
00045    TBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt = "");
00046    TBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt = "");
00047    virtual ~TBrowserImp() { }
00048 
00049    virtual void      Add(TObject *, const char *, Int_t) { }
00050    virtual void      AddCheckBox(TObject *, Bool_t = kFALSE) { }
00051    virtual void      CheckObjectItem(TObject *, Bool_t = kFALSE) { }
00052    virtual void      RemoveCheckBox(TObject *) { }
00053    virtual void      BrowseObj(TObject *) { }
00054    TBrowser         *Browser() const { return fBrowser; }
00055    virtual void      ExecuteDefaultAction(TObject *) { }
00056    virtual void      Iconify() { }
00057    virtual void      RecursiveRemove(TObject *) { }
00058    virtual void      Refresh(Bool_t = kFALSE) { }
00059    virtual void      Show() { }
00060    virtual void      SetDrawOption(Option_t *option="");
00061    virtual Option_t *GetDrawOption() const { return 0; }
00062 
00063    virtual Long_t    ExecPlugin(const char *, const char *, const char *, Int_t, Int_t) { return 0; }
00064    virtual void      SetStatusText(const char *, Int_t) { }
00065    virtual void      StartEmbedding(Int_t, Int_t) { }
00066    virtual void      StopEmbedding(const char *) { }
00067 
00068    virtual TGMainFrame *GetMainFrame() const { return 0; }
00069 
00070    virtual TBrowser *GetBrowser() const      { return fBrowser; }
00071    virtual void      SetBrowser(TBrowser *b) { fBrowser = b; }
00072 
00073    ClassDef(TBrowserImp,0)  //ABC describing browser implementation protocol
00074 };
00075 
00076 inline TBrowserImp::TBrowserImp(TBrowser *, const char *, UInt_t, UInt_t, Option_t *)
00077    : fBrowser(0), fShowCycles(kFALSE) { }
00078 inline TBrowserImp::TBrowserImp(TBrowser *, const char *, Int_t, Int_t, UInt_t, UInt_t, Option_t *)
00079    : fBrowser(0), fShowCycles(kFALSE) { }
00080 
00081 #endif

Generated on Tue Jul 5 14:10:22 2011 for ROOT_528-00b_version by  doxygen 1.5.1