Logo ROOT   6.08/07
Reference Guide
TBrowserImp.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Fons Rademakers 15/11/95
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TBrowserImp
14 #define ROOT_TBrowserImp
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // TBrowserImp //
19 // //
20 // ABC describing GUI independent browser implementation protocol. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 #ifndef ROOT_TObject
25 #include "TObject.h"
26 #endif
27 
28 class TBrowser;
29 class TGMainFrame;
30 
31 class TBrowserImp {
32 
33 protected:
34  TBrowser *fBrowser; //TBrowser associated with this implementation
35  Bool_t fShowCycles; //Show object cycle numbers in browser
36 
38  : fBrowser(br.fBrowser), fShowCycles(br.fShowCycles) { }
40  {if(this!=&br) {fBrowser=br.fBrowser; fShowCycles=br.fShowCycles;}
41  return *this;}
42 
43 public:
44  TBrowserImp(TBrowser *b=0) : fBrowser(b), fShowCycles(kFALSE) { }
45  TBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt = "");
46  TBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt = "");
47  virtual ~TBrowserImp() { }
48 
49  virtual void Add(TObject *, const char *, Int_t) { }
50  virtual void AddCheckBox(TObject *, Bool_t = kFALSE) { }
51  virtual void CheckObjectItem(TObject *, Bool_t = kFALSE) { }
52  virtual void RemoveCheckBox(TObject *) { }
53  virtual void BrowseObj(TObject *) { }
54  TBrowser *Browser() const { return fBrowser; }
55  virtual void CloseTabs() { }
56  virtual void ExecuteDefaultAction(TObject *) { }
57  virtual void Iconify() { }
58  virtual void RecursiveRemove(TObject *) { }
59  virtual void Refresh(Bool_t = kFALSE) { }
60  virtual void Show() { }
61  virtual void SetDrawOption(Option_t *option="");
62  virtual Option_t *GetDrawOption() const { return 0; }
63 
64  virtual Long_t ExecPlugin(const char *, const char *, const char *, Int_t, Int_t) { return 0; }
65  virtual void SetStatusText(const char *, Int_t) { }
66  virtual void StartEmbedding(Int_t, Int_t) { }
67  virtual void StopEmbedding(const char *) { }
68 
69  virtual TGMainFrame *GetMainFrame() const { return 0; }
70 
71  virtual TBrowser *GetBrowser() const { return fBrowser; }
72  virtual void SetBrowser(TBrowser *b) { fBrowser = b; }
73 
74  ClassDef(TBrowserImp,0) //ABC describing browser implementation protocol
75 };
76 
78  : fBrowser(0), fShowCycles(kFALSE) { }
80  : fBrowser(0), fShowCycles(kFALSE) { }
81 
82 #endif
virtual void CheckObjectItem(TObject *, Bool_t=kFALSE)
Definition: TBrowserImp.h:51
virtual void BrowseObj(TObject *)
Definition: TBrowserImp.h:53
const char Option_t
Definition: RtypesCore.h:62
virtual void ExecuteDefaultAction(TObject *)
Definition: TBrowserImp.h:56
TBrowserImp & operator=(const TBrowserImp &br)
Definition: TBrowserImp.h:39
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual void SetBrowser(TBrowser *b)
Definition: TBrowserImp.h:72
virtual void CloseTabs()
Definition: TBrowserImp.h:55
TBrowser * Browser() const
Definition: TBrowserImp.h:54
TBrowserImp(const TBrowserImp &br)
Definition: TBrowserImp.h:37
virtual TBrowser * GetBrowser() const
Definition: TBrowserImp.h:71
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
virtual void Iconify()
Definition: TBrowserImp.h:57
virtual void RecursiveRemove(TObject *)
Definition: TBrowserImp.h:58
virtual void StopEmbedding(const char *)
Definition: TBrowserImp.h:67
virtual ~TBrowserImp()
Definition: TBrowserImp.h:47
virtual void SetStatusText(const char *, Int_t)
Definition: TBrowserImp.h:65
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
virtual TGMainFrame * GetMainFrame() const
Definition: TBrowserImp.h:69
TBrowserImp(TBrowser *b=0)
Definition: TBrowserImp.h:44
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual Long_t ExecPlugin(const char *, const char *, const char *, Int_t, Int_t)
Definition: TBrowserImp.h:64
virtual void SetDrawOption(Option_t *option="")
Definition: TBrowserImp.cxx:22
virtual void Refresh(Bool_t=kFALSE)
Definition: TBrowserImp.h:59
long Long_t
Definition: RtypesCore.h:50
virtual void Add(TObject *, const char *, Int_t)
Definition: TBrowserImp.h:49
Double_t y[n]
Definition: legend1.C:17
virtual void StartEmbedding(Int_t, Int_t)
Definition: TBrowserImp.h:66
virtual void Show()
Definition: TBrowserImp.h:60
Mother of all ROOT objects.
Definition: TObject.h:37
Bool_t fShowCycles
Definition: TBrowserImp.h:35
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
virtual void AddCheckBox(TObject *, Bool_t=kFALSE)
Definition: TBrowserImp.h:50
virtual Option_t * GetDrawOption() const
Definition: TBrowserImp.h:62
TBrowser * fBrowser
Definition: TBrowserImp.h:34
virtual void RemoveCheckBox(TObject *)
Definition: TBrowserImp.h:52
ABC describing GUI independent browser implementation protocol.
Definition: TBrowserImp.h:31