21 #include "RConfigure.h" 133 struct DefaultIcon_t {
134 const char *fPicnamePrefix;
139 static DefaultIcon_t gDefaultIcon[] = {
140 {
"folder", { 0, 0 } },
143 {
"slink", { 0, 0 } },
144 {
"histo", { 0, 0 } },
145 {
"object", { 0, 0 } }
154 {
"",
"",
kFALSE, -1, 0 },
159 {
"",
"",
kFALSE, -1, 0 },
163 {
"",
"",
kFALSE, -1, 0 },
165 {
"",
"",
kFALSE, -1, 0 },
180 class TRootBrowserHistoryCursor :
public TObject {
190 class TRootBrowserHistory :
public TList {
192 void RecursiveRemove(
TObject *obj) {
193 TRootBrowserHistoryCursor *cur;
196 while ((cur = (TRootBrowserHistoryCursor*)next())) {
197 if (cur->fItem->GetUserData() == obj) {
205 TRootBrowserHistoryCursor *cur;
208 while ((cur = (TRootBrowserHistoryCursor*)next())) {
209 if (cur->fItem == item) {
219 class TRootBrowserCursorSwitcher {
228 ~TRootBrowserCursorSwitcher() {
235 class TIconBoxThumb :
public TObject {
247 const char *
GetName()
const {
return fName.
Data(); }
264 object = ((
TKey *)fObj)->ReadObj();
269 fBuf->WriteObject(
object);
270 fDNDData.fData = fBuf->Buffer();
271 fDNDData.fDataLength = fBuf->Length();
273 fDNDData.fDataType =
gVirtualX->InternAtom(
"application/root",
kFALSE);
277 virtual Bool_t HandleDNDFinished() {
279 return ((
TGFrame *)GetParent())->HandleDNDFinished();
294 TGFileItem(p, bpic, 0, spic, 0, name, 0, 0, 0, 0, 0, viewMode)
298 fDNDData.fDataLength = 0;
301 for (
Int_t i = 0; fSubnames[i] != 0; ++i)
delete fSubnames[i];
310 if (obj->IsA()->HasDefaultConstructor()) {
319 for (i = 0; fSubnames[i] != 0; ++i)
322 for (i = 0; fSubnames[i] != 0; ++i)
329 class TRootIconList :
public TList {
332 TRootIconBox *fIconBox;
336 TRootIconList(TRootIconBox*
box = 0);
337 virtual ~TRootIconList();
339 const char *GetTitle()
const {
return "ListView Container"; }
342 const TGPicture *GetPicture()
const {
return fPic; }
348 TRootIconList::TRootIconList(TRootIconBox*
box)
350 fPic =
gClient->GetPicture(
"listview.xpm");
358 TRootIconList::~TRootIconList()
366 void TRootIconList::UpdateName()
368 if (!First())
return;
371 fName = First()->GetName();
375 fName = First()->GetName();
377 fName += Last()->GetName();
384 friend class TRootIconList;
389 TRootIconList *fCurrentList;
390 TRootObjItem *fCurrentItem;
405 void *FindItem(
const TString& name,
409 void RemoveGarbage();
420 TObject *obj,
const char *name);
421 void SetObjHeaders();
424 void SetGroupSize(
Int_t siz) { fGroupSize = siz; }
425 Int_t GetGroupSize()
const {
return fGroupSize; }
427 Bool_t WasGrouped()
const {
return fWasGrouped; }
439 fCheckHeaders =
kTRUE;
441 fGarbage =
new TList();
457 fAutoThumbnail =
kTRUE;
463 TRootIconBox::~TRootIconBox()
476 TObject *obj,
const char *name)
484 Bool_t xpm = xpm_magic ==
"/* ";
485 const char *iconname = xpm ? obj->
GetName() :
name;
491 if (fCachedPicName == iconname) {
492 *pic = fLargeCachedPic;
493 *spic = fSmallCachedPic;
499 if (!(*pic) && xpm) {
519 fLargeCachedPic = *pic;
529 fSmallCachedPic = *spic;
530 fCachedPicName = iconname;
536 void TRootIconBox::RemoveGarbage()
538 TIter next(fGarbage);
541 while ((li=(
TList *)next())) {
542 li->
Clear(
"nodelete");
551 void TRootIconBox::AddObjItem(
const char *name,
TObject *obj,
TClass *cl)
566 isSystemFile =
kTRUE;
589 TIconBoxThumb *thumb = 0;
596 spic = thumb->fSmall;
602 fi = AddRemoteFile(obj, spic, pic);
604 fi = AddFile(name, spic, pic);
626 fCurrentList =
new TRootIconList(
this);
627 fGarbage->Add(fCurrentList);
630 fCurrentList->Add(obj);
631 fCurrentList->UpdateName();
643 if (fGrouped && fCurrentItem && (fCurrentList->GetSize()>1)) {
644 fCurrentName->SetString(fCurrentList->GetName());
649 if ((fCurrentList->GetSize() < fGroupSize) && !fGrouped) {
650 GetObjPictures(&pic, &spic, obj, obj->
GetIconName() ?
660 fi =
new TRootObjItem(
this, pic, spic,
new TGString(name), obj, cl, view);
667 if (fGrouped && (fCurrentList->GetSize()==1)) {
668 fCurrentName =
new TGString(fCurrentList->GetName());
669 fCurrentItem =
new TRootObjItem(
this, fCurrentList->GetPicture(), fCurrentList->GetPicture(),
671 fCurrentItem->SetUserData(fCurrentList);
672 AddItem(fCurrentItem);
677 if ((fCurrentList->GetSize()==fGroupSize) && !fGrouped) {
691 fCurrentName =
new TGString(fCurrentList->GetName());
692 fi =
new TRootObjItem(
this, fCurrentList->GetPicture(), fCurrentList->GetPicture(),
694 fi->SetUserData(fCurrentList);
697 fCurrentList =
new TRootIconList(
this);
698 fGarbage->Add(fCurrentList);
703 if ((fCurrentList->GetSize()==fGroupSize) && fGrouped) {
704 fCurrentList =
new TRootIconList(
this);
705 fGarbage->Add(fCurrentList);
713 void TRootIconList::Browse(
TBrowser *)
758 fIconBox->AddItem(fi);
761 if (obj==fIconBox->fActiveObject) {
779 void *TRootIconBox::FindItem(
const TString& name,
Bool_t direction,
786 if (name.
IsNull())
return 0;
793 fLastDir = direction;
794 fLastCase = caseSensitive;
820 while ((obj=next())) {
822 idx = str.
Index(name,0,cmp);
850 void TRootIconBox::SetObjHeaders()
861 void TRootIconBox::Refresh()
876 void TRootIconBox::RemoveAll()
878 if (fIsEmpty)
return;
880 fCheckHeaders =
kTRUE;
1090 for (
int i = 0; gToolBarData[i].
fPixmap; i++) {
1091 if (strlen(gToolBarData[i].fPixmap) == 0) {
1183 fIconBox->fAutoThumbnail = (str ==
"yes") || atoi(str.
Data());
1202 int parts[] = { 26, 74 };
1236 printf(
"\n You are using the old ROOT browser! A new version is available. To use it:\n");
1237 printf(
" Select the \"New Browser\" entry from the \"File\" menu in the browser, or change\n");
1238 printf(
" \"Browser.Name:\" from \"TRootBrowserLite\" to \"TRootBrowser\" in system.rootrc\n\n");
1240 Connect(
fLt,
"Checked(TObject*, Bool_t)",
"TRootBrowserLite",
1241 this,
"Checked(TObject *,Bool_t)");
1252 gVirtualX->LookupString(event, input,
sizeof(input), keysym);
1263 switch ((
EKeySym)keysym & ~0x20) {
1290 if (!name) name = obj->
GetName();
1307 if (name[0] ==
'.' && ((name[1] ==
'\0') || (name[1] ==
'.' && name[2] ==
'\0')))
1411 objClass = obj->IsA();
1413 fIconBox->AddObjItem(name, obj, objClass);
1427 if (!name) name = obj->
GetName();
1428 if (name[0] ==
'.' && name[1] ==
'.')
1429 Info(
"AddToTree",
"up one level %s", name);
1459 Long64_t bsize, fsize, objsize = 0;
1465 objsize = objinfo.
Atoll();
1468 bsize = fsize = objsize;
1507 if (obj->IsFolder())
1514 if (obj->IsFolder())
fIconBox->RemoveAll();
1588 fmt =
"%d Object%s, %d selected.";
1590 fmt =
"%d Object%s.";
1592 snprintf(tmp, 64, fmt, total, (total == 1) ?
"" :
"s", selected);
1601 char *p, path[1024];
1605 while (*p && *(p+1) ==
'/') ++p;
1615 while (*p && *(p+1) ==
'/') ++p;
1625 disableUp = (strlen(dirname) == 1) && (*dirname ==
'/');
1629 disableUp = strlen(p) == 1;
1643 TRootBrowserCursorSwitcher cursorSwitcher(
fIconBox,
fLt);
1660 if (act[0] ==
'!') {
1669 Emit(
"ExecuteDefaultAction(TObject*)", (
Long_t)obj);
1674 TRootBrowserCursorSwitcher cursorSwitcher2(
fIconBox,
fLt);
1702 if (
fIconBox->fAutoThumbnail && nowp && (nowp != wasp)) {
1706 TIconBoxThumb *thumb = 0;
1710 thumb = (TIconBoxThumb*)
fIconBox->fThumbnails->FindObject(path);
1713 spic = thumb->fSmall;
1714 pic = thumb->fLarge;
1725 static const UInt_t sz = 72;
1735 w = w < 54 ? 54 : w;
1736 h = h < 54 ? 54 :
h;
1739 img->
Merge(img,
"tint");
1740 img->
DrawBox(0, 0, w, h,
"#ffff00", 1);
1743 img->
Scale(w/3, h/3);
1746 thumb =
new TIconBoxThumb(path.
Data(), spic, pic);
1764 TRootBrowserCursorSwitcher *cursorSwitcher = 0;
1769 cursorSwitcher =
new TRootBrowserCursorSwitcher(
fIconBox,
fLt);
1790 new TBrowser(
"Browser",
"ROOT Object Browser");
1798 gROOT->MakeDefCanvas();
1893 printf(
"Currently the browser always shows all cycles\n");
1969 sprintf(str,
"About ROOT %s...",
gROOT->GetVersion());
1988 hd =
new TRootHelpDialog(
this,
"Help on Graphics Editor...", 600, 400);
2114 if (
fIconBox->NumSelected() == 1) {
2144 if (
fIconBox->NumSelected() == 1) {
2159 void *add =
gDirectory->FindObjectAny((
char *) name.Data());
2164 Error(
"ProcessMessage",
"do not support non TObject (like %s) yet",
2189 if (
fIconBox->NumSelected() == 1) {
2198 delete cursorSwitcher;
2217 delete cursorSwitcher;
2243 if (strcmp(((
TKey*)obj)->GetClassName(),
"TDirectoryFile") == 0) {
2275 (item == ((TRootBrowserHistoryCursor*)
fHistoryCursor)->fItem)))
return;
2277 TRootBrowserHistoryCursor *cur = (TRootBrowserHistoryCursor*)fHistoryCursor;
2279 while ((cur = (TRootBrowserHistoryCursor*)
fHistory->
After(fHistoryCursor))) {
2284 cur =
new TRootBrowserHistoryCursor(item);
2286 fHistoryCursor = cur;
2379 ((TRootBrowserHistory*)
fHistory)->DeleteItem(item);
2426 while ( probj && strcmp(probj->
GetClassName(),
"TFile")) {
2434 TString::Format(
"((TApplicationServer *)gApplication)->BrowseFile(\"%s\");",
2449 else if (!strcmp(item->
GetText(),
"ROOT Files")) {
2463 if (topobj && topobj->
InheritsFrom(
"TApplicationRemote")) {
2477 Getlinem(kInit,
"\nroot [0]");
2510 gROOT->GetListOfBrowsables()->Remove(old);
2512 gROOT->GetListOfBrowsables()->Add(obj);
2548 Emit(
"DoubleClicked(TObject*)", (
Long_t)obj);
2561 Emit(
"Checked(TObject*,Bool_t)", args);
2570 const char *dirname = 0;
2573 TRootBrowserCursorSwitcher cursorSwitcher(
fIconBox,
fLt);
2577 if (obj->IsA()->GetMethodWithPrototype(
"Browse",
"TBrowser*"))
2596 TKey *key =
dynamic_cast<TKey*
>(obj);
2605 if (t ==
".")
goto out;
2685 kobj =
gDirectory->FindObjectAny(kobj->GetName());
2766 if ( (refresh || force) && !
fIconBox->WasGrouped()
2769 TRootBrowserCursorSwitcher cursorSwitcher(
fIconBox,
fLt);
2771 UInt_t curr =
gROOT->GetListOfBrowsables()->GetSize();
2772 if (!prev) prev = curr;
2837 if (!strcasecmp(opt,
"big"))
2839 else if (!strcasecmp(opt,
"small"))
2841 else if (!strcasecmp(opt,
"list"))
2843 else if (!strcasecmp(opt,
"details"))
2853 if (!strcasecmp(opt,
"name"))
2855 else if (!strcasecmp(opt,
"type"))
2857 else if (!strcasecmp(opt,
"size"))
2859 else if (!strcasecmp(opt,
"date"))
2905 for (i = 2; i <= 5; ++i)
2912 buttons[0]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2914 buttons[1]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2916 buttons[2]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2918 buttons[5]->
Connect(
"Clicked()",
"TRootBrowserLite",
this,
2974 for (
int i = 0; i < len; i++) {
2976 if (((c < 32) || (c > 126)) && (c !=
'\t') && (c !=
'\r') && (c !=
'\n')) {
3018 const int bufferSize = 1024;
3019 char buffer[bufferSize];
3021 FILE *fd = fopen(file,
"rb");
3028 int sz = fread(buffer, 1, bufferSize, fd);
3031 if ((sz > 0) &&
isBinary(buffer, sz)) {
3046 fTextEdit,
"Search(char *,Bool_t,Bool_t)");
3050 savbtn->
Connect(
"Released()",
"TGTextEdit",
fTextEdit,
"SaveFile(=0,kTRUE)");
3094 gROOT->Macro(tmpfile);
3129 bt1->
Connect(
"Pressed()",
"TRootBrowserLite",
this,
"ExecMacro()");
3130 bt2->
Connect(
"Pressed()",
"TRootBrowserLite",
this,
"InterruptMacro()");
void SetBrowserImp(TBrowserImp *i)
virtual void HideFrame(TGFrame *f)
Hide sub frame.
const TGString * GetPath() const
virtual void AddToTree(TObject *obj, const char *name, Int_t check=-1)
Add items to the current TGListTree of the browser.
virtual const char * GetName() const
Returns name of object.
void AddType(const char *type, const char *pat, const char *icon, const char *sicon, const char *action)
Add a mime type to the list of mime types.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
std::string GetName(const std::string &scope_name)
TGFSComboBox * fFSComboBox
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
virtual TGTextEntry * GetTextEntry() const
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
virtual Long_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
Process a single command line, either a C++ statement or an interpreter command starting with a "...
TGLayoutHints * fMenuBarItemLayout
TGCompositeFrame * fListHdr
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
const char * GetClassName() const
void SetViewMode(Int_t new_mode, Bool_t force=kFALSE)
Set iconbox's view mode and update menu and toolbar buttons accordingly.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket...
virtual void * GetUserData() const =0
TGListTreeItem * FindChildByData(TGListTreeItem *item, void *userData)
Find child of item by userData.
UInt_t Hash(const TString &s)
Utility class for browsing TMapFile objects.
virtual void RemoveAll()
Remove all items from the container.
TGListTreeItem * FindItemByObj(TGListTreeItem *item, void *ptr)
Find item with fUserData == ptr.
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
R__EXTERN const char gHelpPostscript[]
virtual UInt_t GetHeight() const
virtual void AdjustHeaders()
virtual const char * WorkingDirectory()
Return working directory.
Int_t DeleteItem(TGListTreeItem *item)
Delete item from list tree.
virtual void DrawBox(Int_t, Int_t, Int_t, Int_t, const char *="#000000", UInt_t=1, Int_t=0)
virtual TGFrame * GetContainer() const
Collectable string class.
TGLayoutHints * fComboLayout
void SetDrawOption(Option_t *option="")
sets drawing option
const TGPicture * GetIcon(const char *filename, Bool_t small_icon)
Return icon belonging to mime type of filename.
virtual void SetStatusText(const char *txt, Int_t col)
Set text in column col in status bar.
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
const Mask_t kKeyMod1Mask
virtual UInt_t GetWidth() const
virtual const char * GetIconName() const
Returns mime type name of object.
virtual Bool_t IsValid() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t HistoryForward()
go to the future
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
void Search()
starts serach dialog
virtual const char * GetClassName() const
virtual void DoubleClicked(TObject *obj)
Emits signal when double clicking on icon.
TGFileContainer * GetIconBox() const
returns pointer to fIconBox object
TGStatusBar * GetStatusBar() const
virtual void SetFrame(TGFrame *frame, Bool_t left)
Set frame to be resized.
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
R__EXTERN const char gHelpPullDownMenus[]
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Associate(const TGWindow *w)
static Pixel_t fgWhitePixel
virtual void ShowStatusBar(Bool_t show=kTRUE)
Show or hide statusbar.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other command generated by the user.
void ToLower()
Change string to lower-case.
virtual void RemoveAll()
Remove all frames from composite frame.
virtual void CheckObjectItem(TObject *obj, Bool_t check=kFALSE)
Check / uncheck the TGListTreeItem corresponding to this object and add a checkmark on TGLVEntry if c...
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual UInt_t GetDefaultHeight() const
An abstract interface to image processing library.
virtual void Terminate(Int_t status=0)
Terminate the application by call TSystem::Exit() unless application has been told to return from Run...
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
void AddToHistory(TGListTreeItem *item)
helper method to track history
TString & Prepend(const char *cs)
R__EXTERN TApplication * gApplication
virtual void LayoutHeader(TGFrame *head)
Layout list view components (container and contents of container).
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
static TGSearchDialog *& SearchDialog()
Return global search dialog.
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Option_t * GetDrawOption() const
returns drawing option
virtual void Layout()
Layout list view components (container and contents of container).
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
Bool_t IsDragging() const
TGLayoutHints * fMenuBarLayout
virtual void Layout()
Layout the elements of the composite frame.
TGListTreeItem * GetSelected() const
R__EXTERN const char gHelpAbout[]
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Pixmap_t GetPixmap()
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
R__EXTERN TGDNDManager * gDNDManager
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=0)
Set the value of a resource or create a new resource.
virtual void Scale(UInt_t, UInt_t)
static TBrowserImp * NewBrowser(TBrowser *b=0, const char *title="ROOT Browser", UInt_t width=800, UInt_t height=500, Option_t *opt="")
Interface method to the old browser.
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
virtual TGFrameElement * FindFrame(Int_t x, Int_t y, Bool_t exclude=kTRUE)
Find frame located int container at position x,y.
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
virtual int Unlink(const char *name)
Unlink, i.e. remove, a file.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
TGLayoutHints * fExpandLayout
THashTable implements a hash table to store TObject's.
R__EXTERN const char gHelpBrowserLite[]
The TRemoteObject class provides protocol for browsing ROOT objects from a remote ROOT session...
void ShowMacroButtons(Bool_t show=kTRUE)
show/hide macro buttons
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
TGPicturePool * GetPicturePool() const
TGCompositeFrame * fTreeHdr
virtual void SetDefaultHeaders()
Default headers are: Name, Attributes, Size, Owner, Group, Modified.
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
void AdjustPosition(TGListTreeItem *item)
Move content to position of item.
virtual void SetIncrements(Int_t hInc, Int_t vInc)
Set horizontal and vertical scrollbar increments.
virtual void SetText(TGString *newText)
Set new text in label.
virtual void SetUserData(void *, Bool_t=kFALSE)
Bool_t EndDrag()
End dragging.
void SetWMSizeHints(UInt_t wmin, UInt_t hmin, UInt_t wmax, UInt_t hmax, UInt_t winc, UInt_t hinc)
Give the window manager minimum and maximum size hints.
virtual void SetCheckedEntry(Bool_t check=kTRUE)
void SetToolTipItem(TGListTreeItem *item, const char *string)
Set tooltip text for this item.
TGTextButton ** GetHeaderButtons()
virtual Bool_t IsActive() const =0
const char * GetKeyClassName() const
TGListTreeItem * fListLevel
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
TGCompositeFrame(const TGCompositeFrame &)
virtual void AddToBox(TObject *obj, const char *name)
Add items to the iconbox of the browser.
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
void Sort(Index n, const Element *a, Index *index, Bool_t down=kTRUE)
void SetSortMode(Int_t new_mode)
Set iconbox's sort mode and update menu radio buttons accordingly.
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
EListViewMode GetViewMode() const
virtual void BrowseObj(TObject *obj)
Browse object.
virtual TList * GetList() const
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
virtual void ShowToolBar(Bool_t show=kTRUE)
Show or hide toolbar.
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
Book space in a file, create I/O buffers, to fill them, (un)compress them.
virtual void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add items to the browser.
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
Long64_t Atoll() const
Return long long value of string.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
virtual void * FindItem(const TString &name, Bool_t direction=kTRUE, Bool_t caseSensitive=kTRUE, Bool_t subString=kFALSE)
void IconBoxAction(TObject *obj)
Default action when double clicking on icon.
TApplication * GetAppRemote() const
TGMimeTypes * GetMimeTypeList() const
void UpdateDrawOption()
add new draw option to the "history"
Describes an Operating System directory for the browser.
virtual const char * GetHeader(Int_t idx) const
Returns name of header idx.
virtual TGListBox * GetListBox() const
void CloseWindow()
In case window is closed via WM we get here.
void CreateBrowser(const char *name)
Create the actual browser.
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
virtual void SetTipText(const char *)
Using a TBrowser one can browse all ROOT objects.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot...
TGLayoutHints * fBarLayout
void SetUserData(void *userData)
const TString & GetString() const
void SetDNDSource(Bool_t onoff)
void DisplayTotal(Int_t total, Int_t selected)
Display in statusbar total number of objects and number of selected objects in IconBox.
void SetDNDData(TDNDData *data)
virtual void SendCloseMessage()
Send close message to self.
virtual const char * ApplicationName() const
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual UInt_t GetDefaultWidth() const
R__EXTERN TSystem * gSystem
TGHorizontal3DLine * fToolBarSep
void Popup()
Show help dialog.
Bool_t fMultipleSelection
R__EXTERN const char gHelpCanvas[]
void * GetUserData() const
TGListTreeItem * GetNextSibling() const
virtual TObject * Remove(TObject *obj)
Remove object from the list.
void GetPathnameFromItem(TGListTreeItem *item, char *path, Int_t depth=0)
Get pathname from item.
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
void SetRefreshFlag(Bool_t flag)
virtual void RecursiveRemove(TObject *obj)
Recursively remove object from browser.
virtual const char * GetText() const =0
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
char * Form(const char *fmt,...)
void ClearHighlighted()
Un highlight items.
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
void ExecMacro()
executed browsed text macro
The ROOT global object gROOT contains a list of all defined classes.
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual void Update(const char *path)
Update file system combo box.
Bool_t GetRefreshFlag() const
Bool_t HistoryBackward()
go to the past
virtual void ExecuteDefaultAction(TObject *obj)
Execute default action for selected object (action is specified in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file.
void Chdir(TGListTreeItem *item)
Make object associated with item the current directory.
void Rename(const char *new_name)
R__EXTERN const char gHelpObjects[]
virtual void SetBackgroundColor(Pixel_t)
Set background color of the canvas frame.
virtual void ClearViewPort()
Clear view port and redraw full content.
char * StrDup(const char *str)
Duplicate the string str.
const char * GetString() const
void ClearHistory()
clear navigation history
Bool_t GetAction(const char *filename, char *action)
Return in action the mime action string belonging to filename.
static unsigned int total
const char * GetText() const
TString & Remove(Ssiz_t pos)
virtual void Modified(Bool_t flag=1)=0
TGListTreeItem * GetParent() const
void ReallyDelete()
Really delete the browser and the this GUI.
virtual Bool_t Search(const char *string, Bool_t direction=kTRUE, Bool_t caseSensitive=kFALSE)
Search for string in the specified direction.
virtual void SetReadOnly(Bool_t on=kTRUE)
virtual void SetDefaults(const char *iconStyle=0, const char *sortBy=0)
Set defaults depending on settings in the user's .rootrc.
void Print(std::ostream &os, const OptionType &opt)
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
const TGString * GetText() const
virtual Pixmap_t GetMask()
virtual void AddEntry(TGString *s, Int_t id)
virtual void RemoveCheckBox(TObject *obj)
Remove checkbox from TGListTree and checkmark from TGListView.
Describe directory structure in memory.
virtual void FromPad(TVirtualPad *, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
TGListTreeItem * GetFirstChild() const
Wrapper around a TObject so it can be stored in a TList.
TRootBrowserLite(TBrowser *b=0, const char *title="ROOT Browser", UInt_t width=800, UInt_t height=500)
Create browser with a specified width and height.
virtual void AddCheckBox(TObject *obj, Bool_t check=kFALSE)
Add a checkbox in the TGListTreeItem corresponding to obj and a checkmark on TGLVEntry if check = kTR...
R__EXTERN const char gHelpGraphicsEditor[]
static const char * gOpenTypes[]
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t e
void HideTextEdit()
hide text edit
The color creation and management class.
void InterruptMacro()
interrupt browsed macro execution
void BrowseTextFile(const char *file)
browse text file
void HighlightListLevel()
helper method to track history
void DeleteListTreeItem(TGListTreeItem *item)
delete list tree item, remove it from history
void ListTreeHighlight(TGListTreeItem *item)
Open tree item and list in iconbox its contents.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name.
virtual void Clear(Option_t *option="")
Remove all objects from the list.
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
virtual Int_t GetNumberOfEntries() const
void SetCheckBox(TGListTreeItem *item, Bool_t on=kTRUE)
Set check button state for the node 'item'.
virtual Bool_t IsOpen() const
Mother of all ROOT objects.
virtual void SetHeaders(Int_t ncolumns)
Set number of headers, i.e.
TObject * GetObject() const
virtual const char * GetTitle() const
Returns title of object.
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
A TSystemFile describes an operating system file.
virtual void UnmapWindow()
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
TGLayoutHints * fMenuBarHelpLayout
TGListTreeItem * FindItemByPathname(const char *path)
Find item by pathname.
virtual ~TRootBrowserLite()
Browser destructor.
virtual void Add(TObject *obj)
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
static Bool_t isBinary(const char *str, int len)
test
void SetAutoTips(Bool_t on=kTRUE)
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
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
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
virtual void SetHeader(const char *s, Int_t hmode, Int_t cmode, Int_t idx)
Set header button idx [0-fNColumns>, hmode is the x text alignmode (ETextJustification) for the heade...
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
R__EXTERN const char gHelpRemote[]
virtual void Refresh(Bool_t force=kFALSE)
Refresh the browser contents.
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
void CheckItem(TGListTreeItem *item, Bool_t check=kTRUE)
Set check button state for the node 'item'.
virtual void Checked(TObject *obj, Bool_t check)
Emits signal when double clicking on icon.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line...
static TImage * Create()
Create an image.
virtual Bool_t HandleKey(Event_t *event)
handle keys
Short_t GetCycle() const
Return cycle number associated to this key.
virtual const char * GetName() const
Returns name of object.
virtual Int_t GetSize() const
void HighlightItem(TGListTreeItem *item)
Highlight item.
virtual Bool_t SaveFile(const char *fname, Bool_t saveas=kFALSE)
Save file.
TGListTreeItem * GetFirstItem() const
virtual void DeleteWindow()
Delete window.
friend class TRootIconBox
void DisplayDirectory()
Display current directory in second label, fLbl2.
static ToolBarData_t gToolBarData[]
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
TContextMenu * GetContextMenu() const
virtual Bool_t SetImageBuffer(char **, EImageFileTypes=TImage::kPng)
void ToSystemDirectory(const char *dirname)
display directory
void SetDrawOption(Option_t *option="")
Set drawing option for object.
virtual void DestroyWindow()
Int_t RecursiveDeleteItem(TGListTreeItem *item, void *userData)
Delete item with fUserData == ptr.
TGPopupMenu * fOptionMenu
ABC describing GUI independent browser implementation protocol.
virtual TGLBEntry * GetSelectedEntry() const
const TGPicture * fIconPic
const char * Data() const