40class TBrowserTimer :
public TTimer {
57class TBrowserObject :
public TNamed
62 TBrowserObject(
void *obj,
TClass *cl,
const char *brname);
91 if (
gROOT->IsBatch()) {
92 Warning(
"TBrowser",
"The ROOT browser cannot run in batch mode");
106 :
TNamed(
name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0),
107 fContextMenu(0), fNeedRefresh(
kFALSE)
127 :
TNamed(
name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0), fContextMenu(0),
141 :
TNamed(
name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0), fContextMenu(0),
154 :
TNamed(
name, title), fLastSelectedObject(0), fImp(0), fTimer(0), fContextMenu(0),
172 :
TNamed(
name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
187 :
TNamed(
name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
200 const char *objname,
const char *title,
Option_t *opt)
201 :
TNamed(
name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
212 Create(
new TBrowserObject(obj,cl,objname));
219 const char *objname,
const char *title,
221 :
TNamed(
name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
227 Create(
new TBrowserObject(obj,cl,objname));
234 const char *objname,
const char *title,
237 :
TNamed(
name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
243 Create(
new TBrowserObject(obj,cl,objname));
261 gROOT->GetListOfBrowsers()->Remove(
this);
293 if (!obj || !cl)
return;
296 else to =
new TBrowserObject(obj,cl,
name);
339 fTimer =
new TBrowserTimer(
this);
343 gROOT->GetListOfBrowsers()->Add(
this);
407Bool_t TBrowserTimer::Notify()
410 if (fBrowser->GetRefreshFlag()) {
411 fBrowser->SetRefreshFlag(
kFALSE);
413 }
else if (fActivate) {
431TBrowserObject::TBrowserObject(
void *obj,
TClass *cl,
const char *brname)
432 :
TNamed(brname, cl ? cl->GetName() :
""), fObj(obj),
fClass(cl)
434 if (cl==0)
Fatal(
"Constructor",
"Class parameter should not be null");
441Bool_t TBrowserObject::IsFolder()
const
443 return fClass->IsFolder(fObj);
R__EXTERN TApplication * gApplication
include TDocParser_001 C image html pict1_TDocParser_001 png width
R__EXTERN TGuiFactory * gGuiFactory
R__EXTERN TVirtualMutex * gROOTMutex
R__EXTERN TStyle * gStyle
R__EXTERN TSystem * gSystem
#define R__LOCKGUARD(mutex)
void InitializeGraphics()
Initialize the graphics environment.
static void CreateApplication()
Static function used to create a default application environment.
static void NeedGraphicsLibs()
Static method.
ABC describing GUI independent browser implementation protocol.
virtual void ExecuteDefaultAction(TObject *)
virtual void RemoveCheckBox(TObject *)
virtual void AddCheckBox(TObject *, Bool_t=kFALSE)
virtual void BrowseObj(TObject *)
virtual void RecursiveRemove(TObject *)
virtual void Refresh(Bool_t=kFALSE)
virtual void CheckObjectItem(TObject *, Bool_t=kFALSE)
virtual void Add(TObject *, const char *, Int_t)
Using a TBrowser one can browse all ROOT objects.
virtual void Create(TObject *obj=0)
Create the browser, called by the ctors.
void CheckObjectItem(TObject *obj, Bool_t check=kFALSE)
Change status of checkbox for this item.
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
TObject * fLastSelectedObject
virtual ~TBrowser()
Delete the browser.
TContextMenu * fContextMenu
Browser's timer.
virtual void Destructor()
Actual browser destructor.
void RemoveCheckBox(TObject *obj)
Remove checkbox for this item.
TBrowserTimer * fTimer
Window system specific browser implementation.
void Refresh()
Refresh browser contents.
TBrowser(const TBrowser &)=delete
The last TObject selected by user.
void SetSelected(TObject *clickedObject)
Assign the last selected object.
Bool_t fNeedRefresh
Context menu pointer.
void ExecuteDefaultAction(TObject *obj)
Execute default action for selected object (action is specified in the $HOME/.root....
virtual void RecursiveRemove(TObject *obj)
Recursively remove obj from browser.
void AddCheckBox(TObject *obj, Bool_t check=kFALSE)
Add checkbox for this item.
TClass instances represent classes, structs and namespaces in the ROOT type system.
void * DynamicCast(const TClass *base, void *obj, Bool_t up=kTRUE)
Cast obj of this class type up to baseclass cl if up is true.
static ENewType IsCallingNew()
Static method returning the defConstructor flag passed to TClass::New().
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
virtual TBrowserImp * CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt="")
Create a batch version of TBrowserImp.
The TNamed class is the base class for all named ROOT classes.
Mother of all ROOT objects.
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
Float_t GetScreenFactor() const
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
Handles synchronous and a-synchronous timer events.
virtual Bool_t Notify()
Notify when timer times out.