40 class TBrowserTimer :
public TTimer {
57 class TBrowserObject :
public TNamed 62 TBrowserObject(
void *obj,
TClass *cl,
const char *brname);
67 TClass *IsA()
const {
return fClass; }
86 :
TNamed(name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0),
87 fContextMenu(0), fNeedRefresh(
kFALSE)
108 :
TNamed(name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0), fContextMenu(0),
186 const char *objname,
const char *title,
Option_t *opt)
199 Create(
new TBrowserObject(obj,cl,objname));
206 const char *objname,
const char *title,
215 Create(
new TBrowserObject(obj,cl,objname));
222 const char *objname,
const char *title,
232 Create(
new TBrowserObject(obj,cl,objname));
250 gROOT->GetListOfBrowsers()->Remove(
this);
282 if (!obj || !cl)
return;
285 else to =
new TBrowserObject(obj,cl,name);
328 fTimer =
new TBrowserTimer(
this);
332 gROOT->GetListOfBrowsers()->Add(
this);
396 Bool_t TBrowserTimer::Notify()
399 if (fBrowser->GetRefreshFlag()) {
400 fBrowser->SetRefreshFlag(
kFALSE);
402 }
else if (fActivate) {
420 TBrowserObject::TBrowserObject(
void *obj,
TClass *cl,
const char *brname)
421 :
TNamed(brname, cl ? cl->
GetName() :
""), fObj(obj), fClass(cl)
423 if (cl==0)
Fatal(
"Constructor",
"Class parameter should not be null");
430 Bool_t TBrowserObject::IsFolder()
const 432 return fClass->IsFolder(fObj);
440 fClass->Browse(fObj, b);
void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add object with name to browser.
virtual void CheckObjectItem(TObject *, Bool_t=kFALSE)
virtual const char * GetName() const
Returns name of object.
virtual TBrowserImp * CreateBrowserImp(TBrowser *b, const char *title, UInt_t width, UInt_t height, Option_t *opt="")
Create a batch version of TBrowserImp.
virtual ~TBrowser()
Delete the browser.
TBrowserTimer * fTimer
Window system specific browser implementation.
virtual void BrowseObj(TObject *)
TObject * fLastSelectedObject
TBrowser(const TBrowser &)
The last TObject selected by user.
virtual void ExecuteDefaultAction(TObject *)
R__EXTERN TStyle * gStyle
void ExecuteDefaultAction(TObject *obj)
Execute default action for selected object (action is specified in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file).
R__EXTERN TVirtualMutex * gROOTMutex
void CheckObjectItem(TObject *obj, Bool_t check=kFALSE)
Change status of checkbox for this item.
R__EXTERN TApplication * gApplication
Float_t GetScreenFactor() const
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
if object in a list can be deleted
void SetSelected(TObject *clickedObject)
Assign the last selected object.
void AddCheckBox(TObject *obj, Bool_t check=kFALSE)
Add checkbox for this item.
virtual void Create(TObject *obj=0)
Create the browser, called by the ctors.
The TNamed class is the base class for all named ROOT classes.
virtual void RecursiveRemove(TObject *)
static ENewType IsCallingNew()
Static method returning the defConstructor flag passed to TClass::New().
R__EXTERN TGuiFactory * gGuiFactory
virtual Bool_t Notify()
Notify when timer times out.
Using a TBrowser one can browse all ROOT objects.
static void NeedGraphicsLibs()
Static method.
Bool_t fNeedRefresh
Context menu pointer.
R__EXTERN TSystem * gSystem
Handles synchronous and a-synchronous timer events.
The ROOT global object gROOT contains a list of all defined classes.
void Reset(Detail::TBranchProxy *x)
virtual void Refresh(Bool_t=kFALSE)
void RemoveCheckBox(TObject *obj)
Remove checkbox for this item.
if object destructor must call RecursiveRemove()
#define R__LOCKGUARD2(mutex)
void InitializeGraphics()
Initialize the graphics environment.
virtual void Add(TObject *, const char *, Int_t)
Mother of all ROOT objects.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
virtual void Destructor()
Actual browser destructor.
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
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
virtual void AddCheckBox(TObject *, Bool_t=kFALSE)
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.
TContextMenu * fContextMenu
Browser's timer.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
void Refresh()
Refresh browser contents.
virtual void RemoveCheckBox(TObject *)
virtual void RecursiveRemove(TObject *obj)
Recursively remove obj from browser.
ABC describing GUI independent browser implementation protocol.