53 #include "RConfigure.h" 78 class TCursorSwitcher {
109 if (p && p !=
gClient->GetDefaultRoot())
112 fNewBrowser->SetActBrowser(
this);
115 if (fBrowser) Show();
128 TGTextEntry *dropt_entry = fDrawOption->GetTextEntry();
130 fDrawOption->Resize(80, 20);
131 TGListBox *lb = fDrawOption->GetListBox();
134 fDrawOption->AddEntry(
"", dropt++);
135 fDrawOption->AddEntry(
"box", dropt++);
136 fDrawOption->AddEntry(
"colz", dropt++);
137 fDrawOption->AddEntry(
"lego", dropt++);
138 fDrawOption->AddEntry(
"lego1", dropt++);
139 fDrawOption->AddEntry(
"lego2", dropt++);
140 fDrawOption->AddEntry(
"same", dropt++);
141 fDrawOption->AddEntry(
"surf", dropt++);
142 fDrawOption->AddEntry(
"surf1", dropt++);
143 fDrawOption->AddEntry(
"surf2", dropt++);
144 fDrawOption->AddEntry(
"surf3", dropt++);
145 fDrawOption->AddEntry(
"surf4", dropt++);
146 fDrawOption->AddEntry(
"surf5", dropt++);
147 fDrawOption->AddEntry(
"text", dropt++);
150 fTopFrame->AddFrame(
new TGLabel(fTopFrame,
"Draw Option:"),
155 fSortButton->SetStyle(
gClient->GetStyle());
156 fSortButton->SetToolTipText(
"Sort Alphabetically\n(Current folder only)");
159 fSortButton->Connect(
"Clicked()",
"TGFileBrowser",
this,
"ToggleSort()");
162 fFilterButton->SetStyle(
gClient->GetStyle());
163 fFilterButton->SetToolTipText(
"Filter Content");
166 fFilterButton->Connect(
"Clicked()",
"TGFileBrowser",
this,
"RequestFilter()");
169 fRefreshButton->SetStyle(
gClient->GetStyle());
170 fRefreshButton->SetToolTipText(
"Refresh Current Folder");
173 fRefreshButton->Connect(
"Clicked()",
"TGFileBrowser",
this,
"Refresh()");
177 fCanvas =
new TGCanvas(
this, 100, 100);
181 fListTree->Connect(
"DoubleClicked(TGListTreeItem *, Int_t)",
182 "TGFileBrowser",
this,
"DoubleClicked(TGListTreeItem *, Int_t)");
183 fListTree->Connect(
"Clicked(TGListTreeItem *, Int_t, Int_t, Int_t)",
184 "TGFileBrowser",
this,
"Clicked(TGListTreeItem *, Int_t, Int_t, Int_t)");
185 fListTree->Connect(
"Checked(TObject*, Bool_t)",
"TGFileBrowser",
186 this,
"Checked(TObject*, Bool_t)");
188 fRootIcon =
gClient->GetPicture(
"rootdb_t.xpm");
189 fFileIcon =
gClient->GetPicture(
"doc_t.xpm");
192 fBotFrame->AddFrame(
new TGLabel(fBotFrame,
"Filter: "),
195 fFileType =
new TGComboBox(fBotFrame,
" All Files (*.*)");
197 fFileType->AddEntry(
" All Files (*.*)", ftype++);
198 fFileType->AddEntry(
" C/C++ Files (*.c;*.cxx;*.h;...)", ftype++);
199 fFileType->AddEntry(
" ROOT Files (*.root)", ftype++);
200 fFileType->AddEntry(
" Text Files (*.txt)", ftype++);
201 fFileType->Resize(200, 20);
204 fFileType->Connect(
"Selected(Int_t)",
"TGFileBrowser",
this,
205 "ApplyFilter(Int_t)");
206 fFileType->GetTextEntry()->Connect(
"ReturnPressed()",
"TGFileBrowser",
207 this,
"ApplyFilter(Int_t = -1)");
211 fContextMenu =
new TContextMenu(
"FileBrowserContextMenu");
236 "TGFileBrowser",
this,
"Selected(char*)");
239 "TGFileBrowser",
this,
"PadModified()");
243 Resize(GetDefaultSize());
257 if (fRootIcon) fClient->FreePicture(fRootIcon);
258 if (fCachedPic && (fCachedPic != fFileIcon))
259 fClient->FreePicture(fCachedPic);
260 if (fFileIcon) fClient->FreePicture(fFileIcon);
297 if (maxlen > 0 && infos.
Length() > maxlen) {
304 objsize = objinfo.
Atoll();
307 bsize = fsize = objsize;
338 if (fListLevel && !strcmp(fListLevel->GetText(),
"Classes") &&
339 fListLevel->GetParent() &&
340 !strcmp(fListLevel->GetParent()->GetText(),
"root")) {
351 if (name) oname =
name;
352 else if (obj) oname = obj->
GetName();
355 if (it != fFilteredItems.end()) {
357 const char *filter = (
const char *)(*it).second;
365 AddKey(fListLevel, obj, name);
367 GetObjPicture(&pic, obj);
368 if (!name) name = obj->
GetName();
370 if (!fListTree->FindChildByName(fListLevel, name)) {
373 if ((pic != fFileIcon) && (pic != fCachedPic))
374 fClient->FreePicture(pic);
384 else if (fListLevel) {
400 AddKey(fListLevel, obj, name);
411 if (!fListTree->FindChildByName(fListLevel, name)) {
412 TGListTreeItem *item = fListTree->AddItem(fListLevel, name, obj, pic, pic);
413 if ((pic != fFileIcon) && (pic != fCachedPic))
414 fClient->FreePicture(pic);
446 if (
R_ISDIR(type) || fFilter == 0 ||
447 (fFilter && filename.
Index(*fFilter) !=
kNPOS)) {
449 GetFilePictures(&spic, type, is_link, filename);
453 if ((!fListTree->FindChildByName(fListLevel, filename)) &&
454 (!fListTree->FindChildByData(fListLevel, obj)))
455 fListTree->AddItem(fListLevel, filename, obj, pic, pic);
467 fNewBrowser->SetActBrowser(
this);
469 if (!fListTree->FindItemByObj(fListTree->GetFirstItem(), obj)) {
472 fListLevel = fListTree->FindItemByObj(fListTree->GetFirstItem(), obj);
473 fListTree->HighlightItem(fListLevel);
475 fListTree->OpenItem(fListLevel);
476 fListTree->ClearViewPort();
477 fListTree->AdjustPosition(fListLevel);
480 if (fBrowser) obj->
Browse(fBrowser);
484 if (volumes && curvol) {
485 const char *curdrive;
493 while ((drive = (
TNamed *)next())) {
495 (strcmp(drive->
GetName(), curdrive) == 0) ?
496 "SetRootDir" :
"Add");
505 if (
gROOT->GetListOfFiles() && !
gROOT->GetListOfFiles()->IsEmpty())
516 fNewBrowser->Checked(obj, checked);
524 return fDrawOption->GetTextEntry()->GetText();
535 const char *ext = name ? strrchr(name,
'.') : 0;
539 if (ext && cached_spic && (cached_ext == ext)) {
545 *pic =
gClient->GetMimeTypeList()->GetIcon(name,
kTRUE);
559 *pic =
gClient->GetPicture(
"doc_t.xpm");
562 *pic =
gClient->GetPicture(
"app_t.xpm");
565 *pic =
gClient->GetPicture(
"folder_t.xpm");
568 *pic =
gClient->GetPicture(
"rootdb_t.xpm");
573 *pic =
gClient->GetPicture(
"slink_t.xpm");
587 itm = fListTree->FindChildByData(0,
gROOT->GetListOfFiles());
589 item = fListTree->FindChildByData(itm, obj);
593 if (CheckFiltered(item))
594 fFilteredItems.erase(item);
595 fListTree->DeleteItem(item);
599 item = fListTree->FindItemByObj(itm, obj);
601 fListTree->DeleteChildren(item);
608 item = fListTree->FindItemByObj(fRootDir, obj);
610 if (item && CheckFiltered(item))
611 fFilteredItems.erase(item);
612 fListTree->RecursiveDeleteItem(fRootDir, obj);
625 TCursorSwitcher cursorSwitcher(
this, fListTree);
627 UInt_t curr =
gROOT->GetListOfBrowsables()->GetSize();
628 if (!prev) prev = curr;
645 Long_t id = 0, flags = 0, modtime = 0;
648 if (!item) item = fRootDir;
654 if (obj && !obj->
TestBit(kNotDeleted)) {
657 if (CheckFiltered(curr))
658 fFilteredItems.erase(curr);
659 fListTree->DeleteItem(curr);
663 else if (obj && obj->
TestBit(kNotDeleted) &&
665 fListTree->GetPathnameFromItem(curr->
GetParent(), path);
666 if (strlen(path) > 1) {
670 if ((res == 0) && (flags & 2)) {
671 TString fullpath = FullPathName(curr);
675 if (CheckFiltered(curr))
676 fFilteredItems.erase(curr);
677 fListTree->DeleteItem(curr);
685 TString actpath = FullPathName(item);
686 flags =
id = size = modtime = 0;
694 fListTree->GetPathnameFromItem(itm, path);
695 if (strlen(path) > 1) {
696 TString recpath = FullPathName(itm);
702 if (CheckFiltered(del))
703 fFilteredItems.erase(del);
704 fListTree->DeleteItem(del);
715 DoubleClicked(item, 1);
717 CheckFiltered(fListLevel,
kTRUE);
731 if ((opt == 0) || (!opt[0])) {
732 if (fRootDir == 0 && !fListTree->FindChildByName(0,
rootdir))
733 item = fRootDir = fListTree->AddItem(0,
rootdir);
736 if (strstr(opt,
"SetRootDir")) {
737 if (!fListTree->FindChildByName(0, entry))
738 item = fRootDir = fListTree->AddItem(0, entry);
740 else if (strstr(opt,
"Add")) {
745 if (!fListTree->FindChildByName(0, entry))
746 item = fListTree->AddItem(0, entry);
776 if (itm == 0)
return;
778 if ((fCnt == 0) || (olditem != itm)) {
779 olditem = item = itm;
781 if (!name) name = obj->
GetName();
782 if (fNKeys > fGroupSize) {
785 if (fListTree->FindItemByObj(where, obj))
790 if ((fNKeys > fGroupSize) && (fCnt % fGroupSize == 0)) {
795 item = fListTree->AddItem(itm, name);
798 if ((fCnt > fGroupSize) && (fCnt >= fNKeys-1)) {
802 GetObjPicture(&pic, obj);
803 if (!fListTree->FindChildByName(item, name)) {
804 TGListTreeItem *it = fListTree->AddItem(item, name, obj, pic, pic);
805 if (pic && (pic != fFileIcon) && (pic != fCachedPic))
806 fClient->FreePicture(pic);
821 if (fFilter)
delete fFilter;
823 if ((
id > 1) && (
id < 5))
825 else if ((
id < 0) || (
id > 4)) {
836 fListTree->DeleteChildren(item);
837 DoubleClicked(item, 1);
839 fListTree->ClearViewPort();
887 else if (!strcmp(item->
GetText(),
"ROOT Files")) {
901 if (topobj && topobj->
InheritsFrom(
"TApplicationRemote")) {
915 Getlinem(kInit,
"\nroot [0]");
922 Getlinem(kInit,
"\nroot [0]");
936 if (fFilteredItems.empty())
939 if (it != fFilteredItems.end()) {
941 filter = (
const char *)(*it).second;
951 filter.
Prepend(
"Showing only \'");
953 fFilterButton->SetToolTipText(filter.
Data());
957 fFilterButton->SetToolTipText(
"Filter Content...");
975 for (
sLTI_i p=fSortedItems.begin(); p!=fSortedItems.end(); ++p) {
993 Long_t id = 0, flags = 0, modtime = 0;
996 CheckSorted(item,
kTRUE);
997 CheckFiltered(item,
kTRUE);
1000 TString fullpath = FullPathName(item);
1006 const char *clname = ((
TKey *)obj)->GetClassName();
1007 if (clname && strcmp(clname,
"TGeoManager")) {
1011 name += ((
TKey *)obj)->GetCycle();
1029 fContextMenu->Popup(x, y, obj, fBrowser);
1033 fListTree->GetPathnameFromItem(item, path);
1034 if (strlen(path) > 3) {
1039 if (fDir)
delete fDir;
1041 fContextMenu->Popup(x, y, fDir, fBrowser);
1047 if (fFile)
delete fFile;
1049 fContextMenu->Popup(x, y, fFile, fBrowser);
1055 fListTree->ClearViewPort();
1059 if (selected->InheritsFrom(
"TBranch"))
1061 if (selected->InheritsFrom(
"TTree")) {
1113 TString fullpath = FullPathName(item);
1120 _splitpath(fullpath.
Data(), winDrive, winDir, winName, winExt);
1138 Int_t weirdcount = 0;
1146 infile = fopen(candidate,
"r");
1149 nchars = fread(buffer, 1, 512, infile);
1152 for (i = 0; i < nchars; i++) {
1153 if (buffer[i] & 128)
1155 if (buffer[i] ==
'\0')
1159 if ((nchars > 0) && ((weirdcount * 100 / nchars) > 30))
1178 if (img1 == 0)
return pic;
1182 if (img2) img1->
Merge(img2);
1185 merged =
gClient->GetPicturePool()->GetPicture(lnk_name.
Data(),
1187 if (img2)
delete img2;
1200 TString dirname = DirName(item);
1201 TString fullpath = FullPathName(item);
1205 Long_t id, flags, modtime;
1215 fNewBrowser->SetActBrowser(
this);
1216 TCursorSwitcher switcher(
this, fListTree);
1218 CheckSorted(item,
kTRUE);
1219 CheckFiltered(item,
kTRUE);
1233 const char *clname = ((
TKey *)obj)->GetClassName();
1238 name += ((
TKey *)obj)->GetCycle();
1261 while ( probj && strcmp(probj->
GetClassName(),
"TFile")) {
1265 if (probj && !strcmp(probj->
GetClassName(),
"TFile")) {
1269 TString::Format(
"((TApplicationServer *)gApplication)->BrowseFile(\"%s\");",
1274 if (
gClient->GetMimeTypeList()->GetAction(obj->
GetName(), action)) {
1277 if ((act[0] !=
'!') && (strcmp(pitem->
GetText(),
"ROOT Files"))) {
1283 if ((ext.
EndsWith(
".root")) && (strcmp(pitem->
GetText(),
"ROOT Files"))) {
1290 if (fBrowser) fBrowser->SetDrawOption(GetDrawOption());
1292 if (
gClient->GetMimeTypeList()->GetAction(obj->IsA()->
GetName(), action)) {
1294 if (fBrowser && act.
Contains(
"->Browse()")) obj->
Browse(fBrowser);
1295 else if (act.
Contains(
"->Draw()")) obj->
Draw(GetDrawOption());
1300 if (act[0] ==
'!') {
1311 else if (obj->
InheritsFrom(
"TCanvas") && fNewBrowser &&
1312 fNewBrowser->GetTabRight() &&
1313 fNewBrowser->GetTabRight()->GetTabTab(obj->
GetName())) {
1323 fListTree->ClearViewPort();
1328 flags =
id = size = modtime = 0;
1338 TList *files = dir.GetListOfFiles();
1351 if ((fname!=
"..") && (fname!=
".")) {
1352 if (!fListTree->FindChildByName(item, fname)) {
1353 itm = fListTree->AddItem(item, fname);
1358 const TGPicture *opened = 0, *l_opened = 0;
1359 const TGPicture *closed = 0, *l_closed = 0;
1360 opened = fClient->
GetPicture(
"ofolder_t.xpm");
1362 closed = fClient->
GetPicture(
"folder_t.xpm");
1364 if (l_opened && l_closed)
1366 if (opened) fClient->FreePicture(opened);
1367 if (closed) fClient->FreePicture(closed);
1368 if (l_opened) fClient->FreePicture(l_opened);
1369 if (l_closed) fClient->FreePicture(l_closed);
1382 fname = pname = file->
GetName();
1384 (fFilter && fname.
Index(*fFilter) !=
kNPOS))) {
1394 pic =
gClient->GetMimeTypeList()->GetIcon(pname,
kTRUE);
1399 if (!fListTree->FindChildByName(item, fname)) {
1400 itm = fListTree->AddItem(item, fname, pic, pic);
1401 if (pic != fFileIcon)
1402 fClient->FreePicture(pic);
1411 if (size && modtime) {
1412 char *tiptext = FormatFileInfo(fname.
Data(), size, modtime);
1425 if (is_link && lnkname.
EndsWith(
".lnk"))
1430 if (fname.EndsWith(
".root")) {
1445 if (ostr)
delete ostr;
1450 if (fBrowser) rfile->
Browse(fBrowser);
1455 else if (fname.EndsWith(
".png")) {
1457 XXExecuteDefaultAction(&
f);
1464 TGTab *tabRight = fNewBrowser->GetTabRight();
1471 fullname.ReplaceAll(
"\\",
"\\\\");
1474 (
ULong_t)embed, fullname.Data()));
1478 (
ULong_t)embed, fullname.Data()));
1481 XXExecuteDefaultAction(&
f);
1485 XXExecuteDefaultAction(&
f);
1492 XXExecuteDefaultAction(&
f);
1497 fListTree->ClearViewPort();
1509 if (fBrowser) fBrowser->SetDrawOption(GetDrawOption());
1511 if (
gClient->GetMimeTypeList()->GetAction(obj->
GetName(), action)) {
1516 if (act[0] ==
'!') {
1546 fsize = bsize = size;
1551 infos +=
TString::Format(
"Size: %lld.%lldM", fsize/1024, (fsize%1024)/103);
1553 infos +=
TString::Format(
"Size: %lld.%lldK", bsize/1024, (bsize%1024)/103);
1559 time_t loctime = (time_t) modtime;
1560 newtime = localtime(&loctime);
1564 newtime->tm_year + 1900,
1565 newtime->tm_mon+1, newtime->tm_mday,
1566 newtime->tm_hour, newtime->tm_min);
1577 const char *clname = 0;
1585 objClass = obj->IsA();
1590 clname = ((
TKey *)obj)->GetClassName();
1604 objClass = obj->IsA();
1613 Bool_t xpm = xpm_magic ==
"/* ";
1614 const char *iconname = xpm ? obj->
GetName() :
name;
1620 if (fCachedPicName == iconname) {
1624 *pic =
gClient->GetMimeTypeList()->GetIcon(iconname,
kTRUE);
1625 if (!(*pic) && xpm) {
1631 gClient->GetMimeTypeList()->AddType(
"[thumbnail]", iconname, iconname, iconname,
"->Browse()");
1634 if (fCachedPic && (fCachedPic != fFileIcon))
1635 fClient->FreePicture(fCachedPic);
1641 fCachedPicName = iconname;
1653 if (item == 0)
return;
1654 fListTree->OpenItem(item);
1655 TObjArray *tokens = sPath.Tokenize(
"/");
1657 fListTree->HighlightItem(item);
1658 DoubleClicked(item, 1);
1660 fListTree->ClearViewPort();
1661 fListTree->AdjustPosition(item);
1677 if (first == drive->
GetName()) {
1689 itm = fListTree->FindChildByName(0, token);
1692 fListTree->OpenItem(item);
1694 DoubleClicked(item, 1);
1698 itm = fListTree->FindChildByName(item, token);
1701 fListTree->OpenItem(item);
1703 DoubleClicked(item, 1);
1706 itm = fListTree->AddItem(item, token);
1708 fListTree->OpenItem(item);
1710 DoubleClicked(item, 1);
1713 fListTree->HighlightItem(item);
1714 DoubleClicked(item, 1);
1716 fListTree->ClearViewPort();
1717 fListTree->AdjustPosition(item);
1727 if (fDblClick && fNewBrowser) {
1729 TGTab *tabRight = fNewBrowser->GetTabRight();
1762 snprintf(filter,
sizeof(filter),
"%s", fFilterStr.Data());
1764 "Enter filter expression:\n(empty string \"\" or \"*\" to remove filter)",
1768 if ((filter[0] == 0) && (filter[1] == 0)) {
1769 CheckFiltered(fListLevel,
kTRUE);
1772 else if (((filter[0] == 0) && (filter[1] == 1)) || !strcmp(filter,
"*")) {
1776 fFilteredItems.erase(fListLevel);
1781 fFilterStr = filter;
1784 if (CheckFiltered(fListLevel))
1785 fFilteredItems.erase(fListLevel);
1787 fFilteredItems.insert(std::make_pair(fListLevel,
StrDup(filter)));
1790 fListTree->DeleteChildren(fListLevel);
1791 DoubleClicked(fListLevel, 1);
1792 fListTree->ClearViewPort();
1793 fListTree->AdjustPosition(fListLevel);
1803 fListTree->ClearHighlighted();
1805 fListTree->HighlightItem(fListLevel);
1806 fListTree->OpenItem(fListLevel);
1807 BrowseObj(
gROOT->GetListOfFiles());
1808 fListTree->ClearViewPort();
1809 fListTree->AdjustPosition(fListLevel);
1818 if (!fListLevel)
return;
1821 if (!fListLevel->GetFirstChild()) {
1823 itemname =
StrDup(fListLevel->GetText());
1830 Bool_t is_sorted = CheckSorted(item);
1833 fListTree->SortChildren(item);
1834 fSortedItems.push_back(item);
1838 fListTree->DeleteChildren(item);
1839 DoubleClicked(item, 1);
1840 fSortedItems.remove(item);
1845 TGListTreeItem *itm = fListTree->FindChildByName(item, itemname);
1847 fListTree->ClearHighlighted();
1848 Clicked(itm, 1, 0, 0);
1850 fListTree->SetSelected(itm);
1857 fListTree->ClearViewPort();
1858 fListTree->AdjustPosition(fListLevel);
TGCompositeFrame * GetCurrentContainer() const
virtual const char * GetName() const
Returns name of object.
void RequestFilter()
Open a dialog box asking for a string to be used as filter (regexp), and add an entry in the map of f...
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)
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 "...
TList * GetListOfBases()
Return list containing the TBaseClass(es) of a class.
static const TGPicture * MakeLinkPic(const TGPicture *pic)
Create a symlink (shortcut on Windows) icon by merging the picture passed as argument and the slink_t...
void AddKey(TGListTreeItem *itm, TObject *obj, const char *name=0)
display content of ROOT file
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
virtual TList * GetListOfKeys() const
const char * GetClassName() const
Bool_t CheckFiltered(TGListTreeItem *item, Bool_t but=kFALSE)
Check if there is a filter active on the children of the list tree item.
virtual void * GetUserData() const =0
Utility class for browsing TMapFile objects.
virtual UInt_t GetHeight() const
virtual const char * WorkingDirectory()
Return working directory.
TGCompositeFrame * GetTabContainer(Int_t tabIndex) const
Return container of tab with index tabIndex.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad...
Collectable string class.
virtual UInt_t GetWidth() const
virtual const char * GetIconName() const
Returns mime type name of object.
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
TClass * GetClassPointer(Bool_t load=kTRUE)
Get pointer to the base class TClass.
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
Bool_t TestBit(UInt_t f) const
virtual Int_t GetEntries() const
void ApplyFilter(Int_t id)
Apply filter selected in combo box to the file tree view.
Regular expression class.
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
virtual const char * GetTitle() const
Returns title of object.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
UInt_t GetListOfKeys(TList &keys, TString inherits, TDirectory *dir=0)
virtual void Browse(TBrowser *b)
Browse object. May be overridden for another default action.
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
void ToLower()
Change string to lower-case.
virtual const char * DirName(const char *pathname)
Return the directory name in pathname.
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
An abstract interface to image processing library.
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
Bool_t CheckSorted(TGListTreeItem *item, Bool_t but=kFALSE)
Check if the list tree item children are alphabetically sorted.
TString & Prepend(const char *cs)
R__EXTERN TApplication * gApplication
TObject * At(Int_t idx) const
virtual Bool_t IsDirectory(const char *dir=0) const
Check if object is a directory.
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
void AddFSDirectory(const char *entry, const char *path=0, Option_t *opt="")
Add file system directory in the list tree.
void DoubleClicked(TGListTreeItem *item, Int_t btn)
Process double clicks in TGListTree.
virtual void SetImage(const Double_t *, UInt_t, UInt_t, TImagePalette *=0)
Bool_t R_ISREG(Int_t mode)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Pixmap_t GetPixmap()
virtual const char * UnixPathName(const char *unixpathname)
Convert from a Unix pathname to a local pathname.
virtual void Scale(UInt_t, UInt_t)
virtual void Sort(Bool_t order=kSortAscending)
Sort linked list.
virtual void CheckItem(Bool_t=kTRUE)=0
The TRemoteObject class provides protocol for browsing ROOT objects from a remote ROOT session...
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
void ToggleSort()
Toggle the sort mode and set the "sort button" state accordingly.
virtual void SetActive(Bool_t)
The TNamed class is the base class for all named ROOT classes.
virtual void SetUserData(void *, Bool_t=kFALSE)
void AddRemoteFile(TObject *obj)
Add remote file in list tree.
const char * GetKeyClassName() const
void Clear()
Clear string without changing its capacity.
TString & Append(const char *cs)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
void PadModified()
Slot used to switch to the tab containing the current pad/canvas (gPad) used e.g. ...
virtual TList * GetList() const
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Long64_t Atoll() const
Return long long value of string.
static Bool_t IsTextFile(const char *candidate)
Returns true if given a text file Uses the specification given on p86 of the Camel book...
TString FullPathName(TGListTreeItem *item)
returns an absolute path
char * FormatFileInfo(const char *fname, Long64_t size, Long_t modtime)
Format file information to be displayed in the tooltip.
TApplication * GetAppRemote() const
void Chdir(TGListTreeItem *item)
Make object associated with item the current directory.
Describes an Operating System directory for the browser.
Pixmap_t GetPicture() const
virtual void SetTipText(const char *)
virtual void BrowseObj(TObject *obj)
Browse object.
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...
virtual void Browse(TBrowser *b)
Browse the content of the directory.
virtual const char * ApplicationName() const
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
virtual TGMainFrame * GetMainFrame() const
void CreateBrowser()
Create the actual file browser.
R__EXTERN TSystem * gSystem
TGListTreeItem * GetNextSibling() const
void GetFilePictures(const TGPicture **pic, Int_t file_type, Bool_t is_link, const char *name)
Determine the file picture for the given file type.
virtual Int_t GetValue(const char *name, Int_t dflt)
Returns the integer value for a resource.
virtual void Refresh(Bool_t force=kFALSE)
Refresh content of the 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 Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
virtual const char * GetText() const =0
Int_t GetEntriesFast() const
char * Form(const char *fmt,...)
virtual void RecursiveRemove(TObject *obj)
Recursively remove object.
void Clicked(TGListTreeItem *item, Int_t btn, Int_t x, Int_t y)
Process mouse clicks in TGListTree.
TString DirName(TGListTreeItem *item)
returns the directory path
The ROOT global object gROOT contains a list of all defined classes.
virtual Int_t Exec(const char *shellcmd)
Execute a command.
virtual TObject * At(Int_t idx) const
Returns the object at position idx. Returns 0 if idx is out of range.
Option_t * GetDrawOption() const
returns drawing option
mFiltered_t::iterator mFiltered_i
void Rename(const char *new_name)
Each class (see TClass) has a linked list of its base class(es).
void Selected(char *)
A ROOT File has been selected in TGHtmlBrowser.
static const char * FormatToolTip(TObject *obj, Int_t maxlen=0)
Format the tooltip information, based on the object passed in argument.
char * StrDup(const char *str)
Duplicate the string str.
TString & Remove(Ssiz_t pos)
TGListTreeItem * GetParent() const
Long_t XXExecuteDefaultAction(TObject *obj)
Execute default action for selected object (action is specified in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file.
void Add(THist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, const THist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
virtual Pixmap_t GetMask()
Describe directory structure in memory.
TGListTreeItem * GetFirstChild() const
void GotoDir(const char *path)
Go to the directory "path" and open all the parent list tree items.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
Abstract base class used by ROOT graphics editor.
virtual ~TGFileBrowser()
Destructor.
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 SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE)
Activate object editors according to the selected object.
virtual void SetPictures(const TGPicture *, const TGPicture *)
Mother of all ROOT objects.
void CheckRemote(TGListTreeItem *item)
Check if the current list tree item points to a remote object.
virtual void Add(TObject *obj, const char *name=0, Int_t check=-1)
Add items to the browser.
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.
Bool_t R_ISDIR(Int_t mode)
static Bool_t IsObjectEditable(TClass *cl)
Helper function checking if a class has a graphic properties editor.
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 SetDNDSource(Bool_t onoff)
virtual TList * GetVolumes(Option_t *) const
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
void Checked(TObject *obj, Bool_t check)
Emits signal when double clicking on icon.
virtual Bool_t ExpandPathName(TString &path)
Expand a pathname getting rid of special shell characters like ~.
static TImage * Create()
Create an image.
Bool_t GetFileStat(FileStat_t *sbuf)
Get remote file status.
virtual const char * GetName() const
Returns name of object.
Int_t GetNumberOfTabs() const
Return number of tabs.
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
virtual Bool_t SetImageBuffer(char **, EImageFileTypes=TImage::kPng)
void Update()
Update content of the list tree.
virtual const char * GetTitle() const
Returns title of object.
ABC describing GUI independent browser implementation protocol.
void GetObjPicture(const TGPicture **pic, TObject *obj)
Retrieve icons associated with class "name".
const char * Data() const