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;
649 if (!item) item = fRootDir;
655 if (obj && !obj->
TestBit(kNotDeleted)) {
658 if (CheckFiltered(curr))
659 fFilteredItems.erase(curr);
660 fListTree->DeleteItem(curr);
664 else if (obj && obj->
TestBit(kNotDeleted) &&
666 fListTree->GetPathnameFromItem(curr->
GetParent(), path);
667 if (strlen(path) > 1) {
671 if ((res == 0) && (flags & 2)) {
672 TString fullpath = FullPathName(curr);
676 if (CheckFiltered(curr))
677 fFilteredItems.erase(curr);
678 fListTree->DeleteItem(curr);
688 if (selected && selected->InheritsFrom(
"TBranch"))
691 TString actpath = FullPathName(item);
692 flags =
id = size = modtime = 0;
700 fListTree->GetPathnameFromItem(itm, path);
701 if (strlen(path) > 1) {
702 TString recpath = FullPathName(itm);
708 if (CheckFiltered(del))
709 fFilteredItems.erase(del);
710 fListTree->DeleteItem(del);
721 DoubleClicked(item, 1);
723 CheckFiltered(fListLevel,
kTRUE);
745 if ((opt == 0) || (!opt[0])) {
746 if (fRootDir == 0 && !fListTree->FindChildByName(0,
rootdir))
747 item = fRootDir = fListTree->AddItem(0,
rootdir);
750 if (strstr(opt,
"SetRootDir")) {
751 if (!fListTree->FindChildByName(0, entry))
752 item = fRootDir = fListTree->AddItem(0, entry);
754 else if (strstr(opt,
"Add")) {
759 if (!fListTree->FindChildByName(0, entry))
760 item = fListTree->AddItem(0, entry);
790 if (itm == 0)
return;
792 if ((fCnt == 0) || (olditem != itm)) {
793 olditem = item = itm;
795 if (!name) name = obj->
GetName();
796 if (fNKeys > fGroupSize) {
799 if (fListTree->FindItemByObj(where, obj))
804 if ((fNKeys > fGroupSize) && (fCnt % fGroupSize == 0)) {
809 item = fListTree->AddItem(itm, name);
812 if ((fCnt > fGroupSize) && (fCnt >= fNKeys-1)) {
816 GetObjPicture(&pic, obj);
817 if (!fListTree->FindChildByName(item, name)) {
818 TGListTreeItem *it = fListTree->AddItem(item, name, obj, pic, pic);
819 if (pic && (pic != fFileIcon) && (pic != fCachedPic))
820 fClient->FreePicture(pic);
835 if (fFilter)
delete fFilter;
837 if ((
id > 1) && (
id < 5))
839 else if ((
id < 0) || (
id > 4)) {
850 fListTree->DeleteChildren(item);
851 DoubleClicked(item, 1);
853 fListTree->ClearViewPort();
901 else if (!strcmp(item->
GetText(),
"ROOT Files")) {
915 if (topobj && topobj->
InheritsFrom(
"TApplicationRemote")) {
929 Getlinem(kInit,
"\nroot [0]");
936 Getlinem(kInit,
"\nroot [0]");
950 if (fFilteredItems.empty())
953 if (it != fFilteredItems.end()) {
955 filter = (
const char *)(*it).second;
965 filter.
Prepend(
"Showing only \'");
967 fFilterButton->SetToolTipText(filter.
Data());
971 fFilterButton->SetToolTipText(
"Filter Content...");
989 for (
sLTI_i p=fSortedItems.begin(); p!=fSortedItems.end(); ++p) {
1007 Long_t id = 0, flags = 0, modtime = 0;
1010 CheckSorted(item,
kTRUE);
1011 CheckFiltered(item,
kTRUE);
1014 TString fullpath = FullPathName(item);
1020 const char *clname = ((
TKey *)obj)->GetClassName();
1021 if (clname && strcmp(clname,
"TGeoManager")) {
1025 name += ((
TKey *)obj)->GetCycle();
1043 fContextMenu->Popup(x, y, obj, fBrowser);
1047 fListTree->GetPathnameFromItem(item, path);
1048 if (strlen(path) > 3) {
1053 if (fDir)
delete fDir;
1055 fContextMenu->Popup(x, y, fDir, fBrowser);
1061 if (fFile)
delete fFile;
1063 fContextMenu->Popup(x, y, fFile, fBrowser);
1069 fListTree->ClearViewPort();
1072 if (selected && selected->InheritsFrom(
"TBranch"))
1074 if (selected && selected->InheritsFrom(
"TTree")) {
1125 TString fullpath = FullPathName(item);
1132 _splitpath(fullpath.
Data(), winDrive, winDir, winName, winExt);
1150 Int_t weirdcount = 0;
1158 infile = fopen(candidate,
"r");
1161 nchars = fread(buffer, 1, 512, infile);
1164 for (i = 0; i < nchars; i++) {
1165 if (buffer[i] & 128)
1167 if (buffer[i] ==
'\0')
1171 if ((nchars > 0) && ((weirdcount * 100 / nchars) > 30))
1190 if (img1 == 0)
return pic;
1194 if (img2) img1->
Merge(img2);
1197 merged =
gClient->GetPicturePool()->GetPicture(lnk_name.
Data(),
1199 if (img2)
delete img2;
1212 TString dirname = DirName(item);
1213 TString fullpath = FullPathName(item);
1227 fNewBrowser->SetActBrowser(
this);
1228 TCursorSwitcher switcher(
this, fListTree);
1230 CheckSorted(item,
kTRUE);
1231 CheckFiltered(item,
kTRUE);
1245 const char *clname = ((
TKey *)obj)->GetClassName();
1250 name += ((
TKey *)obj)->GetCycle();
1274 while ( probj && strcmp(probj->
GetClassName(),
"TFile")) {
1278 if (probj && !strcmp(probj->
GetClassName(),
"TFile")) {
1282 TString::Format(
"((TApplicationServer *)gApplication)->BrowseFile(\"%s\");",
1287 if (
gClient->GetMimeTypeList()->GetAction(obj->
GetName(), action)) {
1290 if ((act[0] !=
'!') && (strcmp(pitem->
GetText(),
"ROOT Files"))) {
1296 if ((ext.
EndsWith(
".root")) && (strcmp(pitem->
GetText(),
"ROOT Files"))) {
1303 if (fBrowser) fBrowser->SetDrawOption(GetDrawOption());
1305 if (
gClient->GetMimeTypeList()->GetAction(obj->IsA()->
GetName(), action)) {
1308 else if (fBrowser && act.
Contains(
"->Browse()")) obj->
Browse(fBrowser);
1309 else if (act.
Contains(
"->Draw()")) obj->
Draw(GetDrawOption());
1313 if (act[0] ==
'!') {
1324 else if (obj->
InheritsFrom(
"TCanvas") && fNewBrowser &&
1325 fNewBrowser->GetTabRight() &&
1326 fNewBrowser->GetTabRight()->GetTabTab(obj->
GetName())) {
1336 fListTree->ClearViewPort();
1341 flags =
id = size = modtime = 0;
1351 TList *files = dir.GetListOfFiles();
1364 if ((fname!=
"..") && (fname!=
".")) {
1365 if (!fListTree->FindChildByName(item, fname)) {
1366 itm = fListTree->AddItem(item, fname);
1371 const TGPicture *opened = 0, *l_opened = 0;
1372 const TGPicture *closed = 0, *l_closed = 0;
1373 opened = fClient->
GetPicture(
"ofolder_t.xpm");
1375 closed = fClient->
GetPicture(
"folder_t.xpm");
1377 if (l_opened && l_closed)
1379 if (opened) fClient->FreePicture(opened);
1380 if (closed) fClient->FreePicture(closed);
1381 if (l_opened) fClient->FreePicture(l_opened);
1382 if (l_closed) fClient->FreePicture(l_closed);
1395 fname = pname = file->
GetName();
1397 (fFilter && fname.
Index(*fFilter) !=
kNPOS))) {
1407 pic =
gClient->GetMimeTypeList()->GetIcon(pname,
kTRUE);
1412 if (!fListTree->FindChildByName(item, fname)) {
1413 itm = fListTree->AddItem(item, fname, pic, pic);
1414 if (pic != fFileIcon)
1415 fClient->FreePicture(pic);
1424 if (size && modtime) {
1425 char *tiptext = FormatFileInfo(fname.
Data(), size, modtime);
1438 if (is_link && lnkname.
EndsWith(
".lnk"))
1443 if (fname.EndsWith(
".root")) {
1458 if (ostr)
delete ostr;
1463 if (fBrowser) rfile->
Browse(fBrowser);
1468 else if (fname.EndsWith(
".png")) {
1470 XXExecuteDefaultAction(&
f);
1477 TGTab *tabRight = fNewBrowser->GetTabRight();
1484 fullname.ReplaceAll(
"\\",
"\\\\");
1487 (
ULong_t)embed, fullname.Data()));
1491 (
ULong_t)embed, fullname.Data()));
1494 XXExecuteDefaultAction(&
f);
1498 XXExecuteDefaultAction(&
f);
1505 XXExecuteDefaultAction(&
f);
1510 fListTree->ClearViewPort();
1522 if (fBrowser) fBrowser->SetDrawOption(GetDrawOption());
1524 if (
gClient->GetMimeTypeList()->GetAction(obj->
GetName(), action)) {
1529 if (act[0] ==
'!') {
1559 fsize = bsize = size;
1564 infos +=
TString::Format(
"Size: %lld.%lldM", fsize/1024, (fsize%1024)/103);
1566 infos +=
TString::Format(
"Size: %lld.%lldK", bsize/1024, (bsize%1024)/103);
1572 time_t loctime = (time_t) modtime;
1573 newtime = localtime(&loctime);
1577 newtime->tm_year + 1900,
1578 newtime->tm_mon+1, newtime->tm_mday,
1579 newtime->tm_hour, newtime->tm_min);
1590 const char *clname = 0;
1598 objClass = obj->IsA();
1603 clname = ((
TKey *)obj)->GetClassName();
1617 objClass = obj->IsA();
1626 Bool_t xpm = xpm_magic ==
"/* ";
1627 const char *iconname = xpm ? obj->
GetName() :
name;
1633 if (fCachedPicName == iconname) {
1637 *pic =
gClient->GetMimeTypeList()->GetIcon(iconname,
kTRUE);
1638 if (!(*pic) && xpm) {
1644 gClient->GetMimeTypeList()->AddType(
"[thumbnail]", iconname, iconname, iconname,
"->Browse()");
1647 if (fCachedPic && (fCachedPic != fFileIcon))
1648 fClient->FreePicture(fCachedPic);
1654 fCachedPicName = iconname;
1666 if (item == 0)
return;
1667 fListTree->OpenItem(item);
1668 TObjArray *tokens = sPath.Tokenize(
"/");
1670 fListTree->HighlightItem(item);
1671 DoubleClicked(item, 1);
1673 fListTree->ClearViewPort();
1674 fListTree->AdjustPosition(item);
1690 if (first == drive->
GetName()) {
1702 itm = fListTree->FindChildByName(0, token);
1705 fListTree->OpenItem(item);
1707 DoubleClicked(item, 1);
1711 itm = fListTree->FindChildByName(item, token);
1714 fListTree->OpenItem(item);
1716 DoubleClicked(item, 1);
1719 itm = fListTree->AddItem(item, token);
1721 fListTree->OpenItem(item);
1723 DoubleClicked(item, 1);
1726 fListTree->HighlightItem(item);
1727 DoubleClicked(item, 1);
1729 fListTree->ClearViewPort();
1730 fListTree->AdjustPosition(item);
1740 if (fDblClick && fNewBrowser) {
1742 TGTab *tabRight = fNewBrowser->GetTabRight();
1775 snprintf(filter,
sizeof(filter),
"%s", fFilterStr.Data());
1777 "Enter filter expression:\n(empty string \"\" or \"*\" to remove filter)",
1781 if ((filter[0] == 0) && (filter[1] == 0)) {
1782 CheckFiltered(fListLevel,
kTRUE);
1785 else if (((filter[0] == 0) && (filter[1] == 1)) || !strcmp(filter,
"*")) {
1789 fFilteredItems.erase(fListLevel);
1794 fFilterStr = filter;
1797 if (CheckFiltered(fListLevel))
1798 fFilteredItems.erase(fListLevel);
1800 fFilteredItems.insert(std::make_pair(fListLevel,
StrDup(filter)));
1803 fListTree->DeleteChildren(fListLevel);
1804 DoubleClicked(fListLevel, 1);
1805 fListTree->ClearViewPort();
1806 fListTree->AdjustPosition(fListLevel);
1816 fListTree->ClearHighlighted();
1818 fListTree->HighlightItem(fListLevel);
1819 fListTree->OpenItem(fListLevel);
1820 BrowseObj(
gROOT->GetListOfFiles());
1821 fListTree->ClearViewPort();
1822 fListTree->AdjustPosition(fListLevel);
1831 if (!fListLevel)
return;
1834 if (!fListLevel->GetFirstChild()) {
1836 itemname =
StrDup(fListLevel->GetText());
1843 Bool_t is_sorted = CheckSorted(item);
1846 fListTree->SortChildren(item);
1847 fSortedItems.push_back(item);
1851 fListTree->DeleteChildren(item);
1852 DoubleClicked(item, 1);
1853 fSortedItems.remove(item);
1858 TGListTreeItem *itm = fListTree->FindChildByName(item, itemname);
1860 fListTree->ClearHighlighted();
1861 Clicked(itm, 1, 0, 0);
1863 fListTree->SetSelected(itm);
1870 fListTree->ClearViewPort();
1871 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 pad.
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.
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event)
Activate object editors according to the selected object.
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.
void Add(THist< DIMENSIONS, PRECISION_TO, STAT_TO... > &to, THist< DIMENSIONS, PRECISION_FROM, STAT_FROM... > &from)
Add two histograms.
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.
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 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.
if(line.BeginsWith("/*"))
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