38 class TBrowserTimer :
public TTimer {
55 class TBrowserObject :
public TNamed
60 TBrowserObject(
void *obj,
TClass *cl,
const char *brname);
84 :
TNamed(name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0),
85 fContextMenu(0), fNeedRefresh(
kFALSE)
106 :
TNamed(name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0), fContextMenu(0),
121 :
TNamed(name, title), fLastSelectedObject(0), fImp(extimp), fTimer(0), fContextMenu(0),
135 :
TNamed(name, title), fLastSelectedObject(0), fImp(0), fTimer(0), fContextMenu(0),
154 :
TNamed(name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
170 :
TNamed(name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
185 :
TNamed(name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
197 Create(
new TBrowserObject(obj,cl,objname));
204 const char *objname,
const char *
title,
206 :
TNamed(name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
213 Create(
new TBrowserObject(obj,cl,objname));
220 const char *objname,
const char *
title,
223 :
TNamed(name, title), fLastSelectedObject(0), fTimer(0), fContextMenu(0),
230 Create(
new TBrowserObject(obj,cl,objname));
248 gROOT->GetListOfBrowsers()->Remove(
this);
280 if (!obj || !cl)
return;
283 else to =
new TBrowserObject(obj,cl,name);
326 fTimer =
new TBrowserTimer(
this);
330 gROOT->GetListOfBrowsers()->Add(
this);
397 if (fBrowser->GetRefreshFlag()) {
398 fBrowser->SetRefreshFlag(
kFALSE);
400 }
else if (fActivate) {
418 TBrowserObject::TBrowserObject(
void *obj,
TClass *cl,
const char *brname)
421 if (cl==0)
Fatal(
"Constructor",
"Class parameter should not be null");
428 Bool_t TBrowserObject::IsFolder()
const
436 void TBrowserObject::Browse(
TBrowser* 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 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
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
void ExecuteDefaultAction(TObject *obj)
Execute default action for selected object (action is specified in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file).
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
R__EXTERN TVirtualMutex * gROOTMutex
void CheckObjectItem(TObject *obj, Bool_t check=kFALSE)
Change status of checkbox for this item.
R__EXTERN TApplication * gApplication
ClassImp(TBrowser) TBrowser
Create a new browser with a name, title.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
void SetSelected(TObject *clickedObject)
Assign the last selected object.
void AddCheckBox(TObject *obj, Bool_t check=kFALSE)
Add checkbox for this item.
virtual void Fatal(const char *method, const char *msgfmt,...) const
Issue fatal error message.
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.
UChar_t mod R__LOCKGUARD2(gSrvAuthenticateMutex)
virtual void RecursiveRemove(TObject *)
TClass * fClass
pointer to the foreign object
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
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
Handles synchronous and a-synchronous timer events.
virtual void Browse(TBrowser *b)
This method is called by a browser to get the class information.
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.
void InitializeGraphics()
Initialize the graphics environment.
virtual void Add(TObject *, const char *, Int_t)
Mother of all ROOT objects.
virtual void Destructor()
Actual browser destructor.
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
virtual void AddTimer(TTimer *t)
Add timer to list of system timers.
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.
Float_t GetScreenFactor() const
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.