Logo ROOT  
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-2021, 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 #include "TObject.h"
25 
26 class TBrowser;
27 class TGMainFrame;
28 
29 class TBrowserImp {
30 
31 protected:
32  TBrowser *fBrowser{nullptr}; ///< TBrowser associated with this implementation
33  Bool_t fShowCycles{kFALSE}; ///< Show object cycle numbers in browser
34 
35  TBrowserImp(const TBrowserImp&) = delete;
36  TBrowserImp &operator=(const TBrowserImp& br) = delete;
37 
38 public:
39  TBrowserImp(TBrowser *b = nullptr);
40  TBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt = "");
41  TBrowserImp(TBrowser *b, const char *title, Int_t x, Int_t y, UInt_t width, UInt_t height, Option_t *opt = "");
42  virtual ~TBrowserImp() = default;
43 
44  virtual void Add(TObject *, const char *, Int_t) { }
45  virtual void AddCheckBox(TObject *, Bool_t = kFALSE) { }
46  virtual void CheckObjectItem(TObject *, Bool_t = kFALSE) { }
47  virtual void RemoveCheckBox(TObject *) { }
48  virtual void BrowseObj(TObject *) { }
49  TBrowser *Browser() const { return fBrowser; }
50  virtual void CloseTabs() { }
51  virtual void ExecuteDefaultAction(TObject *) { }
52  virtual void Iconify() { }
53  virtual void RecursiveRemove(TObject *) { }
54  virtual void Refresh(Bool_t = kFALSE) { }
55  virtual void Show() { }
56  virtual void SetDrawOption(Option_t * = "") { }
57  virtual Option_t *GetDrawOption() const { return nullptr; }
58 
59  virtual Long_t ExecPlugin(const char *, const char *, const char *, Int_t, Int_t) { return 0; }
60  virtual void SetStatusText(const char *, Int_t) { }
61  virtual void StartEmbedding(Int_t, Int_t) { }
62  virtual void StopEmbedding(const char *) { }
63 
64  virtual TGMainFrame *GetMainFrame() const { return nullptr; }
65 
66  virtual TBrowser *GetBrowser() const { return fBrowser; }
67  virtual void SetBrowser(TBrowser *b) { fBrowser = b; }
68 
69  ClassDef(TBrowserImp,0) //ABC describing browser implementation protocol
70 };
71 
72 #endif
TBrowserImp::operator=
TBrowserImp & operator=(const TBrowserImp &br)=delete
TBrowserImp::BrowseObj
virtual void BrowseObj(TObject *)
Definition: TBrowserImp.h:48
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
TGMainFrame
Defines top level windows that interact with the system Window Manager.
Definition: TGFrame.h:398
TBrowserImp::SetBrowser
virtual void SetBrowser(TBrowser *b)
Definition: TBrowserImp.h:67
Option_t
const char Option_t
Definition: RtypesCore.h:66
TBrowserImp::RemoveCheckBox
virtual void RemoveCheckBox(TObject *)
Definition: TBrowserImp.h:47
TBrowserImp::GetBrowser
virtual TBrowser * GetBrowser() const
Definition: TBrowserImp.h:66
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
x
Double_t x[n]
Definition: legend1.C:17
TBrowserImp::CloseTabs
virtual void CloseTabs()
Definition: TBrowserImp.h:50
TBrowserImp::StopEmbedding
virtual void StopEmbedding(const char *)
Definition: TBrowserImp.h:62
TBrowserImp::Iconify
virtual void Iconify()
Definition: TBrowserImp.h:52
TBrowserImp::SetStatusText
virtual void SetStatusText(const char *, Int_t)
Definition: TBrowserImp.h:60
TBrowserImp::~TBrowserImp
virtual ~TBrowserImp()=default
TBrowserImp::Browser
TBrowser * Browser() const
Definition: TBrowserImp.h:49
TBrowserImp::RecursiveRemove
virtual void RecursiveRemove(TObject *)
Definition: TBrowserImp.h:53
b
#define b(i)
Definition: RSha256.hxx:100
bool
TBrowserImp
ABC describing GUI independent browser implementation protocol.
Definition: TBrowserImp.h:29
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TBrowserImp::Add
virtual void Add(TObject *, const char *, Int_t)
Definition: TBrowserImp.h:44
TBrowserImp::SetDrawOption
virtual void SetDrawOption(Option_t *="")
Definition: TBrowserImp.h:56
Long_t
long Long_t
Definition: RtypesCore.h:54
TBrowserImp::GetMainFrame
virtual TGMainFrame * GetMainFrame() const
Definition: TBrowserImp.h:64
y
Double_t y[n]
Definition: legend1.C:17
unsigned int
TBrowserImp::GetDrawOption
virtual Option_t * GetDrawOption() const
Definition: TBrowserImp.h:57
TBrowserImp::TBrowserImp
TBrowserImp(const TBrowserImp &)=delete
TBrowserImp::ExecPlugin
virtual Long_t ExecPlugin(const char *, const char *, const char *, Int_t, Int_t)
Definition: TBrowserImp.h:59
TObject.h
TBrowserImp::Refresh
virtual void Refresh(Bool_t=kFALSE)
Definition: TBrowserImp.h:54
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TBrowserImp::AddCheckBox
virtual void AddCheckBox(TObject *, Bool_t=kFALSE)
Definition: TBrowserImp.h:45
TBrowserImp::StartEmbedding
virtual void StartEmbedding(Int_t, Int_t)
Definition: TBrowserImp.h:61
TBrowserImp::fShowCycles
Bool_t fShowCycles
Show object cycle numbers in browser.
Definition: TBrowserImp.h:33
TBrowserImp::Show
virtual void Show()
Definition: TBrowserImp.h:55
TBrowserImp::CheckObjectItem
virtual void CheckObjectItem(TObject *, Bool_t=kFALSE)
Definition: TBrowserImp.h:46
TBrowserImp::ExecuteDefaultAction
virtual void ExecuteDefaultAction(TObject *)
Definition: TBrowserImp.h:51
TBrowserImp::fBrowser
TBrowser * fBrowser
TBrowser associated with this implementation.
Definition: TBrowserImp.h:32
int