Logo ROOT  
Reference Guide
TRootBrowserLite.cxx
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Fons Rademakers 27/02/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 /** \class TRootBrowserLite
14  \ingroup guiwidgets
15 
16 This class creates a ROOT object browser (looking like Windows
17 Explorer). The widgets used are the new native ROOT GUI widgets.
18 
19 */
20 
21 
22 #include "RConfigure.h"
23 
24 #include "TRootBrowserLite.h"
25 #include "TRootApplication.h"
26 #include "TGCanvas.h"
27 #include "TGMenu.h"
28 #include "TGFileDialog.h"
29 #include "TGStatusBar.h"
30 #include "TGFSComboBox.h"
31 #include "TGLabel.h"
32 #include "TGButton.h"
33 #include "TGListView.h"
34 #include "TGListTree.h"
35 #include "TGToolBar.h"
36 #include "TGSplitter.h"
37 #include "TG3DLine.h"
38 #include "TGFSContainer.h"
39 #include "TGMimeTypes.h"
40 #include "TRootHelpDialog.h"
41 #include "TGTextEntry.h"
42 #include "TGTextEdit.h"
43 #include "TGTextEditDialogs.h"
44 
45 #include "TROOT.h"
46 #include "TEnv.h"
47 #include "TBrowser.h"
48 #include "TApplication.h"
49 #include "TFile.h"
50 #include "TKey.h"
51 #include "TKeyMapFile.h"
52 #include "TClass.h"
53 #include "TContextMenu.h"
54 #include "TSystem.h"
55 #include "TSystemDirectory.h"
56 #include "TSystemFile.h"
57 #include "TRemoteObject.h"
58 #include "TInterpreter.h"
59 #include "TGuiBuilder.h"
60 #include "TImage.h"
61 #include "TVirtualPad.h"
62 #include "KeySymbols.h"
63 #include "THashTable.h"
64 #include "TColor.h"
65 #include "TObjString.h"
66 #include "TGDNDManager.h"
67 #include "TBufferFile.h"
68 #include "TFolder.h"
69 #include "Getline.h"
70 #include "snprintf.h"
71 #include "TVirtualX.h"
72 
73 #include "HelpText.h"
74 
75 #ifdef WIN32
76 #include "TWin32SplashThread.h"
77 #endif
78 
79 // Browser menu command ids
91 
105 
106  kViewArrangeByName, // Arrange submenu
112 
115 
118 
119  kOneLevelUp, // One level up toolbar button
120  kFSComboBox, // File system combobox in toolbar
121 
130 };
131 
132 
133 //----- Struct for default icons
134 
136  const char *fPicnamePrefix;
137  const TGPicture *fIcon[2];
138 };
139 
140 #if 0
141 static DefaultIcon_t gDefaultIcon[] = {
142  { "folder", { 0, 0 } },
143  { "app", { 0, 0 } },
144  { "doc", { 0, 0 } },
145  { "slink", { 0, 0 } },
146  { "histo", { 0, 0 } },
147  { "object", { 0, 0 } }
148 };
149 #endif
150 
151 
152 //----- Toolbar stuff...
153 
155  { "tb_uplevel.xpm", "Up One Level", kFALSE, kOneLevelUp, 0 },
156  { "", "", kFALSE, -1, 0 },
157  { "tb_bigicons.xpm", "Large Icons", kTRUE, kViewLargeIcons, 0 },
158  { "tb_smicons.xpm", "Small Icons", kTRUE, kViewSmallIcons, 0 },
159  { "tb_list.xpm", "List", kTRUE, kViewList, 0 },
160  { "tb_details.xpm", "Details", kTRUE, kViewDetails, 0 },
161  { "", "", kFALSE, -1, 0 },
162  { "tb_back.xpm", "Back", kFALSE, kHistoryBack, 0 },
163  { "tb_forw.xpm", "Forward", kFALSE, kHistoryForw, 0 },
164  { "tb_refresh.xpm", "Refresh (F5)", kFALSE, kViewRefresh, 0 },
165  { "", "", kFALSE, -1, 0 },
166  { "tb_find.xpm", "Find (Ctrl-F)", kFALSE, kViewFind, 0 },
167  { "", "", kFALSE, -1, 0 },
168  { "macro_t.xpm", "Execute Macro", kFALSE, kViewExec, 0 },
169  { "interrupt.xpm", "Interrupt Macro",kFALSE, kViewInterrupt, 0 },
170  { "filesaveas.xpm", "Save Macro", kFALSE, kViewSave, 0 },
171  { 0, 0, kFALSE, 0, 0 }
172 };
173 
174 
175 //----- TGFileDialog file types
176 
177 static const char *gOpenTypes[] = { "ROOT files", "*.root",
178  "All files", "*",
179  0, 0 };
180 
181 ////////////////////////////////////////////////////////////////////////////////////
183 public:
185 
187  void Print(Option_t *) const { if (fItem) printf("%s\n", fItem->GetText()); }
188 };
189 
190 
191 ////////////////////////////////////////////////////////////////////////////////////
192 class TRootBrowserHistory : public TList {
193 public:
196  TIter next(this);
197 
198  while ((cur = (TRootBrowserHistoryCursor*)next())) {
199  if (cur->fItem->GetUserData() == obj) {
200  Remove(cur);
201  delete cur;
202  }
203  }
204  }
205 
208  TIter next(this);
209 
210  while ((cur = (TRootBrowserHistoryCursor*)next())) {
211  if (cur->fItem == item) {
212  Remove(cur);
213  delete cur;
214  }
215  }
216  }
217 };
218 
219 
220 ////////////////////////////////////////////////////////////////////////////////////
222 private:
225 public:
227  if (w1) gVirtualX->SetCursor(w1->GetId(), gVirtualX->CreateCursor(kWatch));
228  if (w2) gVirtualX->SetCursor(w2->GetId(), gVirtualX->CreateCursor(kWatch));
229  }
231  if (fW1) gVirtualX->SetCursor(fW1->GetId(), gVirtualX->CreateCursor(kPointer));
232  if (fW2) gVirtualX->SetCursor(fW2->GetId(), gVirtualX->CreateCursor(kPointer));
233  }
234 };
235 
236 ////////////////////////////////////////////////////////////////////////////////////
237 class TIconBoxThumb : public TObject {
238 public:
242 
243  TIconBoxThumb(const char *name, const TGPicture *spic, const TGPicture *pic) {
244  fName = name;
245  fSmall = spic;
246  fLarge = pic;
247  }
248  ULong_t Hash() const { return fName.Hash(); }
249  const char *GetName() const { return fName.Data(); }
250 };
251 
252 
253 
254 //----- Special ROOT object item (this are items in the icon box, see
255 //----- TRootIconBox)
256 ////////////////////////////////////////////////////////////////////////////////////
257 class TRootObjItem : public TGFileItem {
258 public:
259  TRootObjItem(const TGWindow *p, const TGPicture *bpic,
260  const TGPicture *spic, TGString *name,
261  TObject *obj, TClass *cl, EListViewMode viewMode = kLVSmallIcons);
262 
264  TObject *object = 0;
265  if (fObj->IsA() == TKey::Class())
266  object = ((TKey *)fObj)->ReadObj();
267  else
268  object = fObj;
269  if (object) {
270  if (!fBuf) fBuf = new TBufferFile(TBuffer::kWrite);
271  fBuf->WriteObject(object);
272  fDNDData.fData = fBuf->Buffer();
274  }
275  fDNDData.fDataType = gVirtualX->InternAtom("application/root", kFALSE);
276  return &fDNDData;
277  }
278 
280  if (GetParent())
281  return ((TGFrame *)GetParent())->HandleDNDFinished();
282  return kFALSE;
283  }
284 
285 protected:
288 };
289 
290 ////////////////////////////////////////////////////////////////////////////////
291 /// Create an icon box item.
292 
294  const TGPicture *spic, TGString *name,
295  TObject *obj, TClass *, EListViewMode viewMode) :
296  TGFileItem(p, bpic, 0, spic, 0, name, 0, 0, 0, 0, 0, viewMode)
297 {
298  fObj = obj;
299  fDNDData.fData = 0;
300  fDNDData.fDataLength = 0;
301 
302  if (fSubnames) {
303  for (Int_t i = 0; fSubnames[i] != 0; ++i) delete fSubnames[i];
304  }
305  delete [] fSubnames;
306  fSubnames = new TGString* [2];
307 
308  fSubnames[0] = new TGString(obj->GetTitle());
309 
310  fSubnames[1] = 0;
311 
312  if (obj->IsA()->HasDefaultConstructor()) {
314  }
315  if ((obj->IsA() == TFolder::Class()) ||
316  (obj->IsA() == TClass::Class())) {
318  }
319 
320  int i;
321  for (i = 0; fSubnames[i] != 0; ++i)
322  ;
323  fCtw = new int[i];
324  for (i = 0; fSubnames[i] != 0; ++i)
325  fCtw[i] = gVirtualX->TextWidth(fFontStruct, fSubnames[i]->GetString(),
326  fSubnames[i]->GetLength());
327 }
328 
329 class TRootIconBox;
330 ////////////////////////////////////////////////////////////////////////////////////
331 class TRootIconList : public TList {
332 
333 private:
334  TRootIconBox *fIconBox; // iconbox to which list belongs
335  const TGPicture *fPic; // list view icon
336 
337 public:
339  virtual ~TRootIconList();
340  void UpdateName();
341  const char *GetTitle() const { return "ListView Container"; }
342  Bool_t IsFolder() const { return kFALSE; }
343  void Browse(TBrowser *b);
344  const TGPicture *GetPicture() const { return fPic; }
345 };
346 
347 ////////////////////////////////////////////////////////////////////////////////
348 /// constructor
349 
351 {
352  fPic = gClient->GetPicture("listview.xpm");
353  fIconBox = box;
354  fName = "empty";
355 }
356 
357 ////////////////////////////////////////////////////////////////////////////////
358 /// destructor
359 
361 {
362  gClient->FreePicture(fPic);
363 }
364 
365 ////////////////////////////////////////////////////////////////////////////////
366 /// composite name
367 
369 {
370  if (!First()) return;
371 
372  if (fSize==1) {
373  fName = First()->GetName();
374  return;
375  }
376 
377  fName = First()->GetName();
378  fName += "-";
379  fName += Last()->GetName();
380 }
381 
382 //----- Special ROOT object container (this is the icon box on the
383 //----- right side of the browser)
384 ////////////////////////////////////////////////////////////////////////////////////
386 friend class TRootIconList;
387 friend class TRootBrowserLite;
388 
389 private:
390  Bool_t fCheckHeaders; // if true check headers
395  TList *fGarbage; // garbage for TRootIconList's
396  Int_t fGroupSize; // the total number of items when icon box switched to "global view" mode
403  THashTable *fThumbnails; // hash table with thumbnailed pictures
406 
407  void *FindItem(const TString& name,
408  Bool_t direction = kTRUE,
409  Bool_t caseSensitive = kTRUE,
410  Bool_t beginWith = kFALSE);
411  void RemoveGarbage();
412 
413 public:
415  UInt_t options = kSunkenFrame,
417 
418  virtual ~TRootIconBox();
419 
420  void AddObjItem(const char *name, TObject *obj, TClass *cl);
421  void GetObjPictures(const TGPicture **pic, const TGPicture **spic,
422  TObject *obj, const char *name);
423  void SetObjHeaders();
424  void Refresh();
425  void RemoveAll();
426  void SetGroupSize(Int_t siz) { fGroupSize = siz; }
427  Int_t GetGroupSize() const { return fGroupSize; }
429  Bool_t WasGrouped() const { return fWasGrouped; }
430 };
431 
432 ////////////////////////////////////////////////////////////////////////////////
433 /// Create iconbox containing ROOT objects in browser.
434 
436  ULong_t back) : TGFileContainer(lv, options, back)
437 {
438  fListView = lv;
439  fBrowser = browser;
440 
442  fTotal = 0;
443  fGarbage = new TList();
444  fCurrentList = 0;
445  fCurrentItem = 0;
446  fGrouped = kFALSE;
447  fGroupSize = 1000;
448  fCurrentName = 0;
450  fActiveObject = 0;
451  fIsEmpty = kTRUE;
452  fLargeCachedPic = 0;
453  fSmallCachedPic = 0;
454 
455  // Don't use timer HERE (timer is set in TBrowser).
457  fRefresh = 0;
458  fThumbnails = new THashTable(50);
460 }
461 
462 ////////////////////////////////////////////////////////////////////////////////
463 /// destructor
464 
466 {
467  RemoveAll();
468  RemoveGarbage();
469  delete fGarbage;
470  delete fThumbnails;
471 }
472 
473 ////////////////////////////////////////////////////////////////////////////////
474 /// Retrieve icons associated with class "name". Association is made
475 /// via the user's ~/.root.mimes file or via $ROOTSYS/etc/root.mimes.
476 
477 void TRootIconBox::GetObjPictures(const TGPicture **pic, const TGPicture **spic,
478  TObject *obj, const char *name)
479 {
480  static TImage *im = 0;
481  if (!im) {
482  im = TImage::Create();
483  }
484 
485  TString xpm_magic(name, 3);
486  Bool_t xpm = xpm_magic == "/* ";
487  const char *iconname = xpm ? obj->GetName() : name;
488 
489  if (obj->IsA()->InheritsFrom("TGeoVolume")) {
490  iconname = obj->GetIconName() ? obj->GetIconName() : obj->IsA()->GetName();
491  }
492 
493  if (fCachedPicName == iconname) {
494  *pic = fLargeCachedPic;
495  *spic = fSmallCachedPic;
496  return;
497  }
498 
499  *pic = fClient->GetMimeTypeList()->GetIcon(iconname, kFALSE);
500 
501  if (!(*pic) && xpm) {
502  if (im && im->SetImageBuffer((char**)&name, TImage::kXpm)) {
503  *pic = fClient->GetPicturePool()->GetPicture(iconname, im->GetPixmap(),
504  im->GetMask());
505  im->Scale(im->GetWidth()/2, im->GetHeight()/2);
506  *spic = fClient->GetPicturePool()->GetPicture(iconname, im->GetPixmap(),
507  im->GetMask());
508  }
509 
510  fClient->GetMimeTypeList()->AddType("[thumbnail]", iconname, iconname, iconname, "->Browse()");
511  return;
512  }
513 
514  if (*pic == 0) {
515  if (obj->IsFolder()) {
516  *pic = fFolder_s;
517  } else {
518  *pic = fDoc_s;
519  }
520  }
521  fLargeCachedPic = *pic;
522 
523  *spic = fClient->GetMimeTypeList()->GetIcon(iconname, kTRUE);
524 
525  if (*spic == 0) {
526  if (obj->IsFolder())
527  *spic = fFolder_t;
528  else
529  *spic = fDoc_t;
530  }
531  fSmallCachedPic = *spic;
532  fCachedPicName = iconname;
533 }
534 
535 ////////////////////////////////////////////////////////////////////////////////
536 /// delete all TRootIconLists from garbage
537 
539 {
540  TIter next(fGarbage);
541  TList *li;
542 
543  while ((li=(TList *)next())) {
544  li->Clear("nodelete");
545  }
546  fGarbage->Delete();
547 }
548 
549 ////////////////////////////////////////////////////////////////////////////////
550 /// Add object to iconbox. Class is used to get the associated icons
551 /// via the mime file (see GetObjPictures()).
552 
553 void TRootIconBox::AddObjItem(const char *name, TObject *obj, TClass *cl)
554 {
555  if (!cl) return;
556 
557  Bool_t isSystemFile = kFALSE;
558  TGFileItem *fi;
560  const TGPicture *pic = 0;
561  const TGPicture *spic = 0;
562 
563  if (obj->InheritsFrom("TRemoteObject")) {
564  // check if the real remote object is a system file or directory
565  TRemoteObject *robj = (TRemoteObject *)obj;
566  if ((TString(robj->GetClassName()) == "TSystemFile") ||
567  (TString(robj->GetClassName()) == "TSystemDirectory"))
568  isSystemFile = kTRUE;
569  }
570 
571  if (isSystemFile || obj->IsA() == TSystemFile::Class() ||
572  obj->IsA() == TSystemDirectory::Class()) {
573  if (fCheckHeaders) {
574  if (strcmp(fListView->GetHeader(1), "Attributes")) {
576  TGTextButton** buttons = fListView->GetHeaderButtons();
577  if (buttons) {
578  buttons[0]->Connect("Clicked()", "TRootBrowserLite", fBrowser,
579  TString::Format("SetSortMode(=%d)", kViewArrangeByName));
580  buttons[1]->Connect("Clicked()", "TRootBrowserLite", fBrowser,
581  TString::Format("SetSortMode(=%d)", kViewArrangeByType));
582  buttons[2]->Connect("Clicked()", "TRootBrowserLite", fBrowser,
583  TString::Format("SetSortMode(=%d)", kViewArrangeBySize));
584  buttons[5]->Connect("Clicked()", "TRootBrowserLite", fBrowser,
585  TString::Format("SetSortMode(=%d)", kViewArrangeByDate));
586  }
587  }
589  }
590 
591  TIconBoxThumb *thumb = 0;
592  char *thumbname = gSystem->ConcatFileName(gSystem->WorkingDirectory(), name);
594  thumbname);
595  delete []thumbname;
596 
597  if (thumb) {
598  spic = thumb->fSmall;
599  pic = thumb->fLarge;
600  }
601 
602  if (obj->InheritsFrom("TRemoteObject"))
603  // special case for remote object
604  fi = AddRemoteFile(obj, spic, pic);
605  else
606  fi = AddFile(name, spic, pic);
607  if (fi) {
608  fi->SetUserData(obj);
609  if (obj->IsA() == TSystemFile::Class()) {
610  TString str;
611  TDNDData data;
612  str = TString::Format("file://%s/%s\r\n",
613  gSystem->UnixPathName(obj->GetTitle()),
614  obj->GetName());
615  data.fData = (void *)str.Data();
616  data.fDataLength = str.Length()+1;
617  data.fDataType = gVirtualX->InternAtom("text/uri-list", kFALSE);
618  fi->SetDNDData(&data);
619  fi->SetDNDSource(kTRUE);
620  }
621  }
622 
623  fIsEmpty = kFALSE;
624  return;
625  }
626 
627  if (!fCurrentList) {
628  fCurrentList = new TRootIconList(this);
630  }
631 
632  fCurrentList->Add(obj);
634  fIsEmpty = kFALSE;
635 
636  TGFrameElement *el;
637  TIter next(fList);
638  while ((el = (TGFrameElement *) next())) {
639  TGLVEntry *f = (TGLVEntry *) el->fFrame;
640  if (f->GetUserData() == obj) {
641  return;
642  }
643  }
644 
645  if (fGrouped && fCurrentItem && (fCurrentList->GetSize()>1)) {
647  }
648 
650 
651  if ((fCurrentList->GetSize() < fGroupSize) && !fGrouped) {
652  GetObjPictures(&pic, &spic, obj, obj->GetIconName() ?
653  obj->GetIconName() : cl->GetName());
654 
655  if (fCheckHeaders) {
656  if (strcmp(fListView->GetHeader(1), "Title")) {
657  SetObjHeaders();
658  }
660  }
661 
662  fi = new TRootObjItem(this, pic, spic, new TGString(name), obj, cl, view);
663 
664  fi->SetUserData(obj);
665  AddItem(fi);
666  return;
667  }
668 
669  if (fGrouped && (fCurrentList->GetSize()==1)) {
675  fTotal = fList->GetSize();
676  return;
677  }
678 
679  if ((fCurrentList->GetSize()==fGroupSize) && !fGrouped) {
680  fGrouped = kTRUE;
681 
682  // clear fList
683  TGFrameElement *el2;
684  TIter nextl(fList);
685 
686  while ((el2 = (TGFrameElement *) nextl())) {
687  el2->fFrame->DestroyWindow();
688  delete el2->fFrame;
689  fList->Remove(el2);
690  delete el2;
691  }
692 
697  AddItem(fi);
698 
699  fCurrentList = new TRootIconList(this);
701  fTotal = 1;
702  return;
703  }
704 
705  if ((fCurrentList->GetSize()==fGroupSize) && fGrouped) {
706  fCurrentList = new TRootIconList(this);
708  return;
709  }
710 }
711 
712 ////////////////////////////////////////////////////////////////////////////////
713 /// browse icon list
714 
716 {
717  if (!fIconBox) return;
718 
719  TObject *obj;
720  TGFileItem *fi;
721  const TGPicture *pic = 0;
722  const TGPicture *spic = 0;
723  TClass *cl;
724  TString name;
725  TKey *key = 0;
726 
727  fIconBox->RemoveAll();
728  TObjLink *lnk = FirstLink();
729 
730  while (lnk) {
731  obj = lnk->GetObject();
732  lnk = lnk->Next();
733 
734  if (obj->IsA() == TKey::Class()) {
735  cl = TClass::GetClass(((TKey *)obj)->GetClassName());
736  key = (TKey *)obj;
737  } else if (obj->IsA() == TKeyMapFile::Class()) {
738  cl = TClass::GetClass(((TKeyMapFile *)obj)->GetTitle());
739  } else if (obj->InheritsFrom("TRemoteObject")) {
740  // special case for remote object: get real object class
741  TRemoteObject *robj = (TRemoteObject *)obj;
742  cl = TClass::GetClass(robj->GetClassName());
743  } else {
744  cl = obj->IsA();
745  }
746 
747  name = obj->GetName();
748 
749  if (key && obj->IsA() == TKey::Class()) {
750  name += ";";
751  name += key->GetCycle();
752  }
753 
754  fIconBox->GetObjPictures(&pic, &spic, obj, obj->GetIconName() ?
755  obj->GetIconName() : cl->GetName());
756 
757  fi = new TRootObjItem((const TGWindow*)fIconBox, pic, spic, new TGString(name.Data()),
758  obj, cl, (EListViewMode)fIconBox->GetViewMode());
759  fi->SetUserData(obj);
760  fIconBox->AddItem(fi);
761  fIconBox->fTotal++;
762 
763  if (obj==fIconBox->fActiveObject) {
765  }
766  }
767 
768  fIconBox->fGarbage->Remove(this);
770  fIconBox->fGarbage->Add(this); // delete this later
771 
772  fIconBox->Refresh();
774 
776 }
777 
778 ////////////////////////////////////////////////////////////////////////////////
779 /// Find a frame which assosiated object has a name containing a "name" string.
780 
781 void *TRootIconBox::FindItem(const TString& name, Bool_t direction,
782  Bool_t caseSensitive,Bool_t beginWith)
783 {
784  if (!fGrouped) {
785  return TGContainer::FindItem(name, direction, caseSensitive, beginWith);
786  }
787 
788  if (name.IsNull()) return 0;
789  int idx = kNPOS;
790 
791  TGFrameElement* el = 0;
792  TString str;
794 
795  fLastDir = direction;
796  fLastCase = caseSensitive;
797  fLastName = name;
798 
799  if (fLastActiveEl) {
800  el = fLastActiveEl;
801 
802  if (direction) {
803  el = (TGFrameElement *)fList->After(el);
804  } else {
805  el = (TGFrameElement *)fList->Before(el);
806  }
807  } else {
808  if (direction) el = (TGFrameElement *)fList->First();
809  else el = (TGFrameElement *)fList->Last();
810  }
811 
812  TGLVEntry* lv = 0;
813  TObject* obj = 0;
814  TList* li = 0;
815 
816  while (el) {
817  lv = (TGLVEntry*)el->fFrame;
818  li = (TList*)lv->GetUserData();
819 
820  TIter next(li);
821 
822  while ((obj=next())) {
823  str = obj->GetName();
824  idx = str.Index(name,0,cmp);
825 
826  if (idx!=kNPOS) {
827  if (beginWith) {
828  if (idx==0) {
829  fActiveObject = obj;
830  return el;
831  }
832  } else {
833  fActiveObject = obj;
834  return el;
835  }
836  }
837  }
838  if (direction) {
839  el = (TGFrameElement *)fList->After(el);
840  } else {
841  el = (TGFrameElement *)fList->Before(el);
842  }
843  }
844  fActiveObject = 0;
845  return 0;
846 }
847 
848 ////////////////////////////////////////////////////////////////////////////////
849 /// Set list box headers used to display detailed object iformation.
850 /// Currently this is only "Name" and "Title".
851 
853 {
854  fListView->SetHeaders(2);
855  fListView->SetHeader("Name", kTextLeft, kTextLeft, 0);
856  fListView->SetHeader("Title", kTextLeft, kTextLeft, 1);
857 }
858 
859 ////////////////////////////////////////////////////////////////////////////////
860 /// Sort icons, and send message to browser with number of objects
861 /// in box.
862 
864 {
865  // This automatically calls layout
866  Sort(fSortType);
867 
868  // Make TRootBrowserLite display total objects in status bar
870 
871  MapSubwindows();
873 }
874 
875 ////////////////////////////////////////////////////////////////////////////////
876 /// Remove all items from icon box
877 
879 {
880  if (fIsEmpty) return;
881 
884  fGrouped = kFALSE;
885  fCurrentItem = 0;
886  fCurrentList = 0;
887  fIsEmpty = kTRUE;
888 }
889 
890 
891 //_____________________________________________________________________________
892 //
893 // TRootBrowserLite
894 //
895 // ROOT object browser (looking like Windows Explorer).
896 //_____________________________________________________________________________
897 
899 
900 ////////////////////////////////////////////////////////////////////////////////
901 /// Create browser with a specified width and height.
902 
904  : TGMainFrame(gClient->GetDefaultRoot(), width, height), TBrowserImp(b)
905 {
907 
908  Resize(width, height);
909  if (b) Show();
910 }
911 
912 ////////////////////////////////////////////////////////////////////////////////
913 /// Create browser with a specified width and height and at position x, y.
914 
916  UInt_t width, UInt_t height)
917  : TGMainFrame(gClient->GetDefaultRoot(), width, height), TBrowserImp(b)
918 {
920 
921  MoveResize(x, y, width, height);
922  SetWMPosition(x, y);
923  if (b) Show();
924 }
925 
926 ////////////////////////////////////////////////////////////////////////////////
927 /// Browser destructor.
928 
930 {
931  if (fIconPic) gClient->FreePicture(fIconPic);
932 
933  delete fToolBarSep;
934 
935  fToolBar->Cleanup();
936  delete fToolBar;
937  delete fStatusBar;
938  delete fV1;
939  delete fV2;
940  delete fLbl1;
941  delete fLbl2;
942  delete fHf;
943  delete fTreeHdr;
944  delete fListHdr;
945  delete fIconBox;
946  delete fListView;
947  delete fLt;
948  delete fTreeView;
949 
950  delete fMenuBar;
951  delete fFileMenu;
952  delete fViewMenu;
953  delete fOptionMenu;
954  delete fHelpMenu;
955  delete fSortMenu;
956 
957  delete fMenuBarLayout;
958  delete fMenuBarItemLayout;
959  delete fMenuBarHelpLayout;
960  delete fBarLayout;
961 
962  delete fTextEdit;
963 
964  if (fWidgets) fWidgets->Delete();
965  delete fWidgets;
966 
967  fHistory->Delete();
968  delete fHistory;
969 }
970 
971 ////////////////////////////////////////////////////////////////////////////////
972 /// Create the actual browser.
973 
975 {
976  fWidgets = new TList;
978  fHistoryCursor = 0;
980 
981  // Create menus
983  fFileMenu->AddEntry("&New Browser", kFileNewBrowser);
984  fFileMenu->AddEntry("New Browser &Lite", kFileNewBrowserLite);
985  fFileMenu->AddEntry("New Canvas", kFileNewCanvas);
986  fFileMenu->AddEntry("&Gui Builder", kFileNewBuilder);
987  fFileMenu->AddEntry("&Open...", kFileOpen);
989  fFileMenu->AddEntry("&Save", kFileSave);
990  fFileMenu->AddEntry("Save &As...", kFileSaveAs);
992  fFileMenu->AddEntry("&Print...", kFilePrint);
994  fFileMenu->AddEntry("&Close Browser", kFileCloseBrowser);
996  fFileMenu->AddEntry("&Quit ROOT", kFileQuit);
997 
998  //fFileMenu->DefaultEntry(kFileNewCanvas);
1002 
1004  fSortMenu->AddEntry("By &Name", kViewArrangeByName);
1005  fSortMenu->AddEntry("By &Type", kViewArrangeByType);
1006  fSortMenu->AddEntry("By &Size", kViewArrangeBySize);
1007  fSortMenu->AddEntry("By &Date", kViewArrangeByDate);
1009  fSortMenu->AddEntry("&Auto Arrange", kViewArrangeAuto);
1010 
1012 
1014  fViewMenu->AddEntry("&Toolbar", kViewToolBar);
1015  fViewMenu->AddEntry("Status &Bar", kViewStatusBar);
1017  fViewMenu->AddEntry("Lar&ge Icons", kViewLargeIcons);
1018  fViewMenu->AddEntry("S&mall Icons", kViewSmallIcons);
1019  fViewMenu->AddEntry("&List", kViewList);
1020  fViewMenu->AddEntry("&Details", kViewDetails);
1022  fViewMenu->AddEntry("Show &Hidden", kViewHidden);
1023  fViewMenu->AddPopup("Arrange &Icons", fSortMenu);
1024  fViewMenu->AddEntry("Lin&e up Icons", kViewLineUp);
1025  fViewMenu->AddEntry("&Group Icons", kViewGroupLV);
1026 
1028  fViewMenu->AddEntry("&Refresh (F5)", kViewRefresh);
1029 
1032 
1033  if (fBrowser) {
1034  if (gEnv->GetValue("Browser.ShowHidden", 0)) {
1037  } else {
1040  }
1041  }
1042 
1044  fOptionMenu->AddEntry("&Show Cycles", kOptionShowCycles);
1045  fOptionMenu->AddEntry("&AutoThumbnail", kOptionAutoThumbnail);
1046 
1048  fHelpMenu->AddEntry("&About ROOT...", kHelpAbout);
1050  fHelpMenu->AddEntry("Help On Browser...", kHelpOnBrowser);
1051  fHelpMenu->AddEntry("Help On Canvas...", kHelpOnCanvas);
1052  fHelpMenu->AddEntry("Help On Menus...", kHelpOnMenus);
1053  fHelpMenu->AddEntry("Help On Graphics Editor...", kHelpOnGraphicsEd);
1054  fHelpMenu->AddEntry("Help On Objects...", kHelpOnObjects);
1055  fHelpMenu->AddEntry("Help On PostScript...", kHelpOnPS);
1056  fHelpMenu->AddEntry("Help On Remote Session...", kHelpOnRemote);
1057 
1058  // This main frame will process the menu commands
1059  fFileMenu->Associate(this);
1060  fViewMenu->Associate(this);
1061  fSortMenu->Associate(this);
1062  fOptionMenu->Associate(this);
1063  fHelpMenu->Associate(this);
1064 
1065  // Create menubar layout hints
1069 
1070  // Create menubar
1071  fMenuBar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
1076 
1078 
1079  // Create toolbar and separator
1080 
1081  fToolBarSep = new TGHorizontal3DLine(this);
1082  fToolBar = new TGToolBar(this, 60, 20, kHorizontalFrame);
1084 
1088  fFSComboBox->Associate(this);
1089 
1090  int spacing = 8;
1091 
1092  for (int i = 0; gToolBarData[i].fPixmap; i++) {
1093  if (strlen(gToolBarData[i].fPixmap) == 0) {
1094  spacing = 8;
1095  continue;
1096  }
1097  fToolBar->AddButton(this, &gToolBarData[i], spacing);
1098  spacing = 0;
1099  }
1100 
1101  fDrawOption = new TGComboBox(fToolBar, "");
1102  TGTextEntry *dropt_entry = fDrawOption->GetTextEntry();
1103  dropt_entry->SetToolTipText("Object Draw Option", 300);
1104  fDrawOption->Resize(80, 10);
1105  TGListBox *lb = fDrawOption->GetListBox();
1106  lb->Resize(lb->GetWidth(), 120);
1107  Int_t dropt = 1;
1108  fDrawOption->AddEntry("", dropt++);
1109  fDrawOption->AddEntry("same", dropt++);
1110  fDrawOption->AddEntry("box", dropt++);
1111  fDrawOption->AddEntry("lego", dropt++);
1112  fDrawOption->AddEntry("colz", dropt++);
1113  fDrawOption->AddEntry("alp", dropt++);
1114  fDrawOption->AddEntry("text", dropt++);
1115 
1117  fToolBar->AddFrame(new TGLabel(fToolBar,"Option"),
1118  new TGLayoutHints(kLHintsCenterY | kLHintsRight, 2,2,2,0));
1119 
1123 
1124  // Create panes
1125 
1126  fHf = new TGHorizontalFrame(this, 10, 10);
1127 
1128  fV1 = new TGVerticalFrame(fHf, 10, 10, kFixedWidth);
1129  fV2 = new TGVerticalFrame(fHf, 10, 10);
1130  fTreeHdr = new TGCompositeFrame(fV1, 10, 10, kSunkenFrame);
1131  fListHdr = new TGCompositeFrame(fV2, 10, 10, kSunkenFrame);
1132 
1133  fLbl1 = new TGLabel(fTreeHdr, "All Folders");
1134  fLbl2 = new TGLabel(fListHdr, "Contents of \".\"");
1135 
1136  TGLayoutHints *lo;
1137 
1138  lo = new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 3, 0, 0, 0);
1139  fWidgets->Add(lo);
1140  fTreeHdr->AddFrame(fLbl1, lo);
1141  fListHdr->AddFrame(fLbl2, lo);
1142 
1143  lo = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 1, 2);
1144  fWidgets->Add(lo);
1145  fV1->AddFrame(fTreeHdr, lo);
1146  fV2->AddFrame(fListHdr, lo);
1147 
1149 
1151  fWidgets->Add(lo);
1152  fHf->AddFrame(fV1, lo);
1153 
1155  splitter->SetFrame(fV1, kTRUE);
1157  fWidgets->Add(splitter);
1158  fWidgets->Add(lo);
1159  fHf->AddFrame(splitter, lo);
1160 
1162  fWidgets->Add(lo);
1163  fHf->AddFrame(fV2, lo);
1164 
1165  // Create tree
1166  fTreeView = new TGCanvas(fV1, 10, 10, kSunkenFrame | kDoubleBorder); // canvas
1167  fLt = new TGListTree(fTreeView, kHorizontalFrame,fgWhitePixel); // container
1168  fLt->Associate(this);
1169  fLt->SetAutoTips();
1170 
1174 
1175  // Create list view (icon box)
1176  fListView = new TGListView(fV2, 520, 250); // canvas
1177  // container
1179  fIconBox->Associate(this);
1180  fListView->SetIncrements(1, 19); // set vertical scroll one line height at a time
1182 
1183  TString str = gEnv->GetValue("Browser.AutoThumbnail", "yes");
1184  str.ToLower();
1185  fIconBox->fAutoThumbnail = (str == "yes") || atoi(str.Data());
1188 
1189  str = gEnv->GetValue("Browser.GroupView", "10000");
1190  Int_t igv = atoi(str.Data());
1191 
1192  if (igv>10) {
1194  fIconBox->SetGroupSize(igv);
1195  }
1196 
1197  // reuse lo from "create tree"
1199 
1200  AddFrame(fHf, lo);
1201 
1202  // Statusbar
1203 
1204  int parts[] = { 26, 74 };
1205  fStatusBar = new TGStatusBar(this, 60, 10);
1206  fStatusBar->SetParts(parts, 2);
1207  lo = new TGLayoutHints(kLHintsBottom | kLHintsExpandX, 0, 0, 3, 0);
1208  AddFrame(fStatusBar, lo);
1209 
1210  fTextEdit = 0;
1211 
1212  // Misc
1213  TString bname(name);
1214  bname.Prepend("Old ");
1215  SetWindowName(bname.Data());
1216  SetIconName(bname.Data());
1217  fIconPic = SetIconPixmap("rootdb_s.xpm");
1218  SetClassHints("ROOT", "Browser");
1219 
1220  SetWMSizeHints(600, 350, 10000, 10000, 2, 2);
1221 
1222  fListLevel = 0;
1223  fTreeLock = kFALSE;
1224 
1225  gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Escape), 0, kTRUE);
1226  gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_F5), 0, kTRUE);
1227  gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Right), kKeyMod1Mask, kTRUE);
1228  gVirtualX->GrabKey(fId, gVirtualX->KeysymToKeycode(kKey_Left), kKeyMod1Mask, kTRUE);
1229  ClearHistory();
1231 
1232  gVirtualX->SetDNDAware(fId, fDNDTypeList);
1233  MapSubwindows();
1234  SetDefaults();
1235  Resize();
1237 
1238  printf("\n You are using the old ROOT browser! A new version is available. To use it:\n");
1239  printf(" Select the \"New Browser\" entry from the \"File\" menu in the browser, or change\n");
1240  printf(" \"Browser.Name:\" from \"TRootBrowserLite\" to \"TRootBrowser\" in system.rootrc\n\n");
1241 
1242  Connect(fLt, "Checked(TObject*, Bool_t)", "TRootBrowserLite",
1243  this, "Checked(TObject *,Bool_t)");
1244 }
1245 
1246 ////////////////////////////////////////////////////////////////////////////////
1247 /// handle keys
1248 
1250 {
1251  if (event->fType == kGKeyPress) {
1252  UInt_t keysym;
1253  char input[10];
1254  gVirtualX->LookupString(event, input, sizeof(input), keysym);
1255 
1256  if (!event->fState && (EKeySym)keysym == kKey_F5) {
1257  Refresh(kTRUE);
1258  return kTRUE;
1259  }
1260  if (!event->fState && (EKeySym)keysym == kKey_Escape) {
1262  }
1263 
1264  if (event->fState & kKeyMod1Mask) {
1265  switch ((EKeySym)keysym & ~0x20) {
1266  case kKey_Right:
1267  HistoryForward();
1268  return kTRUE;
1269  case kKey_Left:
1270  HistoryBackward();
1271  return kTRUE;
1272  default:
1273  break;
1274  }
1275  }
1276  }
1277  return TGMainFrame::HandleKey(event);
1278 }
1279 
1280 ////////////////////////////////////////////////////////////////////////////////
1281 /// Add items to the browser. This function has to be called
1282 /// by the Browse() member function of objects when they are
1283 /// called by a browser. If check < 0 (default) no check box is drawn,
1284 /// if 0 then unchecked checkbox is added, if 1 checked checkbox is added.
1285 
1286 void TRootBrowserLite::Add(TObject *obj, const char *name, Int_t check)
1287 {
1288  if (!obj)
1289  return;
1290  if (obj->InheritsFrom("TObjectSpy"))
1291  return;
1292  if (!name) name = obj->GetName();
1293 
1294  AddToBox(obj, name);
1295  if (check > -1) {
1296  TGFrameElement *el;
1297  TIter next(fIconBox->fList);
1298  if (!obj->IsFolder()) {
1299  while ((el = (TGFrameElement *) next())) {
1300  TGLVEntry *f = (TGLVEntry *) el->fFrame;
1301  if (f->GetUserData() == obj) {
1302  f->SetCheckedEntry(check);
1303  }
1304  }
1305  }
1306  }
1307 
1308  // Don't show current dir and up dir links in the tree
1309  if (name[0] == '.' && ((name[1] == '\0') || (name[1] == '.' && name[2] == '\0')))
1310  return;
1311 
1312  if (obj->IsFolder())
1313  AddToTree(obj, name, check);
1314 }
1315 
1316 ////////////////////////////////////////////////////////////////////////////////
1317 /// Add a checkbox in the TGListTreeItem corresponding to obj
1318 /// and a checkmark on TGLVEntry if check = kTRUE.
1319 
1321 {
1322  if (obj) {
1323  TGListTreeItem *item = fLt->FindItemByObj(fLt->GetFirstItem(), obj);
1324  while (item) {
1325  fLt->SetCheckBox(item, kTRUE);
1326  fLt->CheckItem(item, check);
1327  item = fLt->FindItemByObj(item->GetNextSibling(), obj);
1328  }
1329  TGFrameElement *el;
1330  TIter next(fIconBox->fList);
1331  while ((el = (TGFrameElement *) next())) {
1332  TGLVEntry *f = (TGLVEntry *) el->fFrame;
1333  if (f->GetUserData() == obj) {
1334  f->SetCheckedEntry(check);
1335  }
1336  }
1337  }
1338 }
1339 
1340 ////////////////////////////////////////////////////////////////////////////////
1341 /// Check / uncheck the TGListTreeItem corresponding to this
1342 /// object and add a checkmark on TGLVEntry if check = kTRUE.
1343 
1345 {
1346  if (obj) {
1347  TGListTreeItem *item = fLt->FindItemByObj(fLt->GetFirstItem(), obj);
1348  while (item) {
1349  fLt->CheckItem(item, check);
1350  item = fLt->FindItemByObj(item->GetNextSibling(), obj);
1351  TGFrameElement *el;
1352  TIter next(fIconBox->fList);
1353  if (!obj->IsFolder()) {
1354  while ((el = (TGFrameElement *) next())) {
1355  TGLVEntry *f = (TGLVEntry *) el->fFrame;
1356  if (f->GetUserData() == obj) {
1357  f->SetCheckedEntry(check);
1358  }
1359  }
1360  }
1361  }
1362  }
1363 }
1364 
1365 ////////////////////////////////////////////////////////////////////////////////
1366 /// Remove checkbox from TGListTree and checkmark from TGListView.
1367 
1369 {
1370  if (obj) {
1371  TGListTreeItem *item = fLt->FindItemByObj(fLt->GetFirstItem(), obj);
1372  while (item) {
1373  fLt->SetCheckBox(item, kFALSE);
1374  item = fLt->FindItemByObj(item->GetNextSibling(), obj);
1375  TGFrameElement *el;
1376  TIter next(fIconBox->fList);
1377  if (!obj->IsFolder()) {
1378  while ((el = (TGFrameElement *) next())) {
1379  TGLVEntry *f = (TGLVEntry *) el->fFrame;
1380  if (f->GetUserData() == obj) {
1381  f->SetCheckedEntry(kFALSE);
1382  }
1383  }
1384  }
1385  }
1386  }
1387 }
1388 
1389 ////////////////////////////////////////////////////////////////////////////////
1390 /// Add items to the iconbox of the browser.
1391 
1392 void TRootBrowserLite::AddToBox(TObject *obj, const char *name)
1393 {
1394  if (obj) {
1395  if (!name) name = obj->GetName() ? obj->GetName() : "NoName";
1396  //const char *titlePtr = obj->GetTitle() ? obj->GetTitle() : " ";
1397 
1398  TClass *objClass = 0;
1399 
1400  if (obj->IsA() == TKey::Class())
1401  objClass = TClass::GetClass(((TKey *)obj)->GetClassName());
1402  else if (obj->IsA() == TKeyMapFile::Class())
1403  objClass = TClass::GetClass(((TKeyMapFile *)obj)->GetTitle());
1404  else if (obj->InheritsFrom("TRemoteObject")) {
1405  // special case for remote object: get real object class
1406  TRemoteObject *robj = (TRemoteObject *)obj;
1407  if (!strcmp(robj->GetClassName(), "TKey"))
1408  objClass = TClass::GetClass(robj->GetKeyClassName());
1409  else
1410  objClass = TClass::GetClass(robj->GetClassName());
1411  }
1412  else
1413  objClass = obj->IsA();
1414 
1415  fIconBox->AddObjItem(name, obj, objClass);
1416  }
1417 }
1418 
1419 ////////////////////////////////////////////////////////////////////////////////
1420 /// Add items to the current TGListTree of the browser.
1421 
1422 void TRootBrowserLite::AddToTree(TObject *obj, const char *name, Int_t check)
1423 {
1424  if (!obj)
1425  return;
1426  if (obj->InheritsFrom("TApplication"))
1427  fListLevel = 0;
1428  if (!fTreeLock) {
1429  if (!name) name = obj->GetName();
1430  if (name[0] == '.' && name[1] == '.')
1431  Info("AddToTree", "up one level %s", name);
1432  if(check > -1) {
1433  TGListTreeItem *item = fLt->AddItem(fListLevel, name, obj, 0, 0, kTRUE);
1434  if (item) fLt->CheckItem(item, (Bool_t)check);
1435  TString tip(obj->ClassName());
1436  if (obj->GetTitle()) {
1437  tip += " ";
1438  tip += obj->GetTitle();
1439  }
1440  fLt->SetToolTipItem(item, tip.Data());
1441  } else {
1442  // special case for remote object
1443  if (obj->InheritsFrom("TRemoteObject")) {
1444  // Nothing to do
1445  } else if (fListLevel) {
1446  // check also if one of its parents is a remote object
1447  TGListTreeItem *top = fListLevel;
1448  while (top->GetParent()) {
1449  TObject *tobj = (TObject *) top->GetUserData();
1450  if (tobj && (tobj->InheritsFrom("TRemoteObject") ||
1451  tobj->InheritsFrom("TApplicationRemote"))) {
1452  break;
1453  }
1454  top = top->GetParent();
1455  }
1456  }
1457  // add the object only if not already in the list
1458  if ((!fLt->FindChildByName(fListLevel, name)) &&
1459  (!fLt->FindChildByData(fListLevel, obj))) {
1460  TGListTreeItem *it = fLt->AddItem(fListLevel, name, obj);
1461  Long64_t bsize, fsize, objsize = 0;
1462  TString objinfo = obj->GetObjectInfo(1, 1);
1463  TString infos = obj->GetName();
1464  infos += "\n";
1465  infos += obj->GetTitle();
1466  if (!objinfo.IsNull() && !objinfo.BeginsWith("x=")) {
1467  objsize = objinfo.Atoll();
1468  if (objsize > 0) {
1469  infos += "\n";
1470  bsize = fsize = objsize;
1471  if (fsize > 1024) {
1472  fsize /= 1024;
1473  if (fsize > 1024) {
1474  // 3.7MB is more informative than just 3MB
1475  infos += TString::Format("Size: %lld.%lldM", fsize/1024,
1476  (fsize%1024)/103);
1477  } else {
1478  infos += TString::Format("Size: %lld.%lldK", bsize/1024,
1479  (bsize%1024)/103);
1480  }
1481  } else {
1482  infos += TString::Format("Size: %lld bytes", bsize);
1483  }
1484  }
1485  }
1486  if (it)
1487  it->SetTipText(infos.Data());
1488  }
1489  }
1490  }
1491 }
1492 
1493 ////////////////////////////////////////////////////////////////////////////////
1494 /// Browse object. This, in turn, will trigger the calling of
1495 /// TRootBrowserLite::Add() which will fill the IconBox and the tree.
1496 /// Emits signal "BrowseObj(TObject*)".
1497 
1499 {
1501  Emit("BrowseObj(TObject*)", (Long_t)obj);
1502 
1503  if (obj != gROOT) {
1504  if (!fLt->FindItemByObj(fLt->GetFirstItem(), obj)) {
1505  fListLevel = 0;
1506  Add(obj);
1509  if (obj->IsFolder())
1511  fLt->ClearViewPort();
1513  }
1514  }
1515 
1516  if (obj->IsFolder()) fIconBox->RemoveAll();
1517  obj->Browse(fBrowser);
1518  if ((fListLevel && obj->IsFolder()) || (!fListLevel && (obj == gROOT))) {
1519  fIconBox->Refresh();
1520  }
1521 
1522  if (fBrowser) {
1524  }
1525  UpdateDrawOption();
1526 
1527  fIconBox->SetHsbPosition(pos.fX);
1528  fIconBox->SetVsbPosition(pos.fY);
1529 }
1530 
1531 ////////////////////////////////////////////////////////////////////////////////
1532 /// add new draw option to the "history"
1533 
1535 {
1536  TString opt = GetDrawOption();
1537  TGListBox *lb = fDrawOption->GetListBox();
1538  TGLBContainer *lbc = (TGLBContainer *)lb->GetContainer();
1539 
1540  TIter next(lbc->GetList());
1541  TGFrameElement *el;
1542 
1543  while ((el = (TGFrameElement *)next())) {
1544  TGTextLBEntry *lbe = (TGTextLBEntry *)el->fFrame;
1545  if (lbe->GetText()->GetString() == opt) {
1546  return;
1547  }
1548  }
1549 
1550  Int_t nn = fDrawOption->GetNumberOfEntries() + 1;
1551  fDrawOption->AddEntry(opt.Data(), nn);
1552  fDrawOption->Select(nn);
1553 }
1554 
1555 ////////////////////////////////////////////////////////////////////////////////
1556 /// returns pointer to fIconBox object
1557 
1559 {
1560  return (TGFileContainer*)fIconBox;
1561 }
1562 
1563 ////////////////////////////////////////////////////////////////////////////////
1564 /// Really delete the browser and the this GUI.
1565 
1567 {
1568  fBrowser->SetBrowserImp(0);
1569  delete this;
1570 }
1571 
1572 ////////////////////////////////////////////////////////////////////////////////
1573 /// In case window is closed via WM we get here.
1574 
1576 {
1577  DeleteWindow();
1578 }
1579 
1580 ////////////////////////////////////////////////////////////////////////////////
1581 /// Display in statusbar total number of objects and number of
1582 /// selected objects in IconBox.
1583 
1585 {
1586  char tmp[64];
1587  const char *fmt;
1588 
1589  if (selected)
1590  fmt = "%d Object%s, %d selected.";
1591  else
1592  fmt = "%d Object%s.";
1593 
1594  snprintf(tmp, 64, fmt, total, (total == 1) ? "" : "s", selected);
1595  fStatusBar->SetText(tmp, 0);
1596 }
1597 
1598 ////////////////////////////////////////////////////////////////////////////////
1599 /// Display current directory in second label, fLbl2.
1600 
1602 {
1603  char *p, path[1024];
1604 
1605  fLt->GetPathnameFromItem(fListLevel, path, 12);
1606  p = path;
1607  while (*p && *(p+1) == '/') ++p;
1608  if (!p[0])
1609  fLbl2->SetText(new TGString("Contents of \".\""));
1610  else
1611  fLbl2->SetText(new TGString(Form("Contents of \"%s\"", p)));
1612  fListHdr->Layout();
1613 
1614  // Get full pathname for FS combobox (previously truncated to 12 levels deep)
1616  p = path;
1617  while (*p && *(p+1) == '/') ++p;
1618  fFSComboBox->Update(p);
1619 
1620  if (fListLevel) {
1621  // disable/enable up level navigation
1623  TString dirname = gSystem->GetDirName(p);
1624 
1625  TObject *obj = (TObject*)fListLevel->GetUserData();
1626  Bool_t disableUp = dirname == "/";
1627 
1628  // normal file directory
1629  if (disableUp && (obj) && (obj->IsA() == TSystemDirectory::Class())) {
1630  disableUp = strlen(p) == 1;
1631  }
1632  btn->SetState(disableUp ? kButtonDisabled : kButtonUp);
1634  }
1635 }
1636 
1637 ////////////////////////////////////////////////////////////////////////////////
1638 /// Execute default action for selected object (action is specified
1639 /// in the $HOME/.root.mimes or $ROOTSYS/etc/root.mimes file.
1640 /// Emits signal "ExecuteDefaultAction(TObject*)".
1641 
1643 {
1644  TRootBrowserCursorSwitcher cursorSwitcher(fIconBox, fLt);
1645  char action[512];
1647  TVirtualPad *wasp = gPad ? (TVirtualPad*)gPad->GetCanvas() : 0;
1648  TFile *wasf = gFile;
1649 
1650  // Special case for file system objects...
1651  if (obj->IsA() == TSystemFile::Class() ||
1652  obj->InheritsFrom("TRemoteObject")) {
1653  TString act;
1654  TString ext = obj->GetName();
1655 
1656  if (fClient->GetMimeTypeList()->GetAction(obj->GetName(), action)) {
1657  act = action;
1658  act.ReplaceAll("%s", obj->GetName());
1659  gInterpreter->SaveGlobalsContext();
1660 
1661  if (act[0] == '!') {
1662  act.Remove(0, 1);
1663  gSystem->Exec(act.Data());
1664  } else {
1665  // special case for remote object: remote process
1666  if (obj->InheritsFrom("TRemoteObject"))
1668  gApplication->ProcessLine(act.Data());
1669  }
1670  Emit("ExecuteDefaultAction(TObject*)", (Long_t)obj);
1671  }
1672 
1673  // special case for remote object: browse real object
1674  if (obj->InheritsFrom("TRemoteObject") && ext.EndsWith(".root")) {
1675  TRootBrowserCursorSwitcher cursorSwitcher2(fIconBox, fLt);
1677  gApplication->ProcessLine("((TApplicationServer *)gApplication)->BrowseFile(0);");
1678  Refresh();
1679  }
1680  ////////// new TFile was opened. Add it to the browser /////
1681  if (gFile && (wasf != gFile) && ext.EndsWith(".root")) {
1682  TGListTreeItem *itm = fLt->FindChildByData(0, gROOT->GetListOfFiles());
1683 
1684  if (itm) {
1685  fLt->ClearHighlighted();
1686  fListLevel = itm;
1689  itm = fLt->AddItem(fListLevel, gFile->GetName());
1690  itm->SetUserData(gFile);
1692  return;
1693  }
1694  }
1695 
1696  // only valid for local text files
1697  if (!obj->InheritsFrom("TRemoteObject"))
1698  BrowseTextFile(obj->GetName());
1699 
1700  /////////////// cache and change file's icon ///////////////////////
1701  TVirtualPad *nowp = gPad ? (TVirtualPad*)gPad->GetCanvas() : 0;
1702 
1703  if (fIconBox->fAutoThumbnail && nowp && (nowp != wasp)) {
1704  TSystemFile *sf = (TSystemFile*)obj;
1705  const TGPicture *pic, *spic;
1706 
1707  TString path;
1708  if (gSystem->IsAbsoluteFileName(sf->GetName())) {
1709  path = sf->GetName();
1710  } else {
1711  char *buf = gSystem->ConcatFileName(gSystem->WorkingDirectory(), sf->GetName());
1712  path = buf;
1713  delete [] buf;
1714  }
1715 
1717 
1718  if (!thumb) {
1719  TImage *img = TImage::Create();
1720  nowp->Modified();
1721  nowp->Update();
1722  img->FromPad(nowp);
1723 
1724  if (!img->IsValid()) {
1725  return;
1726  }
1727 
1728  static const UInt_t sz = 72;
1729  UInt_t w = sz;
1730  UInt_t h = sz;
1731 
1732  auto imgw = img->GetWidth();
1733  auto imgh = img->GetHeight();
1734 
1735  if (imgw > imgh) {
1736  h = (imgh*sz) / (imgw > 0 ? imgw : 1);
1737  } else {
1738  w = (imgw*sz) / (imgh > 0 ? imgh : 1);
1739  }
1740 
1741  w = (w < 54) ? 54 : w;
1742  h = (h < 54) ? 54 : h;
1743 
1744  img->Scale(w, h);
1745  img->Merge(img, "tint"); // contrasting
1746  img->DrawBox(0, 0, w, h, "#ffff00", 1); // yellow frame
1747 
1748  pic = fClient->GetPicturePool()->GetPicture(path.Data(), img->GetPixmap(), 0);
1749  img->Scale(w/3, h/3);
1750  spic = fClient->GetPicturePool()->GetPicture(path.Data(), img->GetPixmap(), 0);
1751 
1752  thumb = new TIconBoxThumb(path.Data(), spic, pic);
1753  fIconBox->fThumbnails->Add(thumb);
1754  delete img;
1755  }
1756  }
1757  return;
1758  }
1759 
1760  // For other objects the default action is still hard coded in
1761  // their Browse() member function.
1762 }
1763 
1764 ////////////////////////////////////////////////////////////////////////////////
1765 /// Handle menu and other command generated by the user.
1766 
1768 {
1769  TRootHelpDialog *hd;
1770  TRootBrowserCursorSwitcher *cursorSwitcher = 0;
1771  TDirectory *tdir = 0;
1772  TString cmd;
1773 
1774  if (GET_SUBMSG(msg) != kCT_SELCHANGED) {
1775  cursorSwitcher = new TRootBrowserCursorSwitcher(fIconBox, fLt);
1776  }
1777 
1778  TObject *obj;
1779  TGListTreeItem *item = 0;
1780 
1781  gVirtualX->Update();
1782 
1783  switch (GET_MSG(msg)) {
1784 
1785  case kC_COMMAND:
1786 
1787  switch (GET_SUBMSG(msg)) {
1788 
1789  case kCM_BUTTON:
1790  // fallthrough
1791  case kCM_MENU:
1792 
1793  switch ((ERootBrowserCommands)parm1) {
1794  // Handle File menu items...
1795  case kFileNewBrowserLite:
1796  new TBrowser("Browser", "ROOT Object Browser");
1797  break;
1798  case kFileNewBrowser:
1799  gEnv->SetValue("Browser.Name", "TRootBrowser");
1800  new TBrowser();
1801  gEnv->SetValue("Browser.Name", "TRootBrowserLite");
1802  break;
1803  case kFileNewCanvas:
1804  gROOT->MakeDefCanvas();
1805  break;
1806  case kFileNewBuilder:
1808  break;
1809  case kFileOpen:
1810  {
1811  static TString dir(".");
1812  TGFileInfo fi;
1813  fi.fFileTypes = gOpenTypes;
1814  fi.SetIniDir(dir);
1815  new TGFileDialog(fClient->GetDefaultRoot(), this,
1816  kFDOpen,&fi);
1817  dir = fi.fIniDir;
1818  if (fi.fMultipleSelection && fi.fFileNamesList) {
1819  TObjString *el;
1820  TIter next(fi.fFileNamesList);
1821  while ((el = (TObjString *) next())) {
1822  new TFile(el->GetString(), "update");
1823  }
1824  }
1825  else if (fi.fFilename) {
1826  new TFile(fi.fFilename, "update");
1827  }
1828  }
1829  break;
1830  case kFileSave:
1831  case kFileSaveAs:
1832  break;
1833  case kFilePrint:
1834  break;
1835  case kFileCloseBrowser:
1836  SendCloseMessage();
1837  break;
1838  case kFileQuit:
1839  gApplication->Terminate(0);
1840  break;
1841 
1842  // Handle View menu items...
1843  case kViewToolBar:
1846  else
1847  ShowToolBar();
1848  break;
1849  case kViewStatusBar:
1852  else
1853  ShowStatusBar();
1854  break;
1855  case kViewLargeIcons:
1856  case kViewSmallIcons:
1857  case kViewList:
1858  case kViewDetails:
1859  SetViewMode((Int_t)parm1);
1860  break;
1861  case kViewHidden:
1865  } else {
1868  }
1869  Refresh(kTRUE);
1870  break;
1871  case kViewArrangeByName:
1872  case kViewArrangeByType:
1873  case kViewArrangeBySize:
1874  case kViewArrangeByDate:
1875  SetSortMode((Int_t)parm1);
1876  break;
1877  case kViewLineUp:
1878  break;
1879  case kViewRefresh:
1880  Refresh(kTRUE);
1881  break;
1882  case kViewGroupLV:
1885  TString gv = gEnv->GetValue("Browser.GroupView", "10000");
1886  Int_t igv = atoi(gv.Data());
1887 
1888  if (igv > 10) {
1889  fIconBox->SetGroupSize(igv);
1890  }
1891  } else {
1893  fIconBox->SetGroupSize(10000000); // very large value
1894  }
1895  break;
1896 
1897  // Handle Option menu items...
1898  case kOptionShowCycles:
1899  printf("Currently the browser always shows all cycles\n");
1900  break;
1901 
1902  case kOptionAutoThumbnail:
1907  Refresh(kTRUE);
1908  } else {
1911  }
1912  break;
1913 
1914  // Handle toolbar button...
1915  case kOneLevelUp:
1916  {
1917  if (fBrowseTextFile) {
1918  HideTextEdit();
1919  break;
1920  }
1921  if (!fListLevel || !fListLevel->IsActive()) break;
1922 
1923  if (fListLevel && fIconBox->WasGrouped()) {
1924  if (fListLevel) {
1925  item = fListLevel->GetParent();
1926  if (item) fListLevel = item;
1927  obj = (TObject *) fListLevel->GetUserData();
1929  if (obj) BrowseObj(obj);
1930  }
1931 
1933  break;
1934  }
1935  if (fListLevel) item = fListLevel->GetParent();
1936 
1937 
1938  if (item) {
1939  fListLevel = item;
1940  obj = (TObject *)fListLevel->GetUserData();
1942  DisplayDirectory();
1943  if (obj) BrowseObj(obj);
1945  } else {
1946  obj = (TObject *)fListLevel->GetUserData();
1947  if (obj) ToSystemDirectory(gSystem->GetDirName(obj->GetTitle()));
1948  }
1949  break;
1950  }
1951 
1952  // toolbar buttons
1953  case kHistoryBack:
1954  HistoryBackward();
1955  break;
1956  case kHistoryForw:
1957  HistoryForward();
1958  break;
1959 
1960  case kViewFind:
1961  Search();
1962  break;
1963 
1964  // Handle Help menu items...
1965  case kHelpAbout:
1966  {
1967 #ifdef R__UNIX
1968  TString rootx = TROOT::GetBinDir() + "/root -a &";
1969  gSystem->Exec(rootx);
1970 #else
1971 #ifdef WIN32
1973 #else
1974  char str[32];
1975  sprintf(str, "About ROOT %s...", gROOT->GetVersion());
1976  hd = new TRootHelpDialog(this, str, 600, 400);
1977  hd->SetText(gHelpAbout);
1978  hd->Popup();
1979 #endif
1980 #endif
1981  }
1982  break;
1983  case kHelpOnCanvas:
1984  hd = new TRootHelpDialog(this, "Help on Canvas...", 600, 400);
1985  hd->SetText(gHelpCanvas);
1986  hd->Popup();
1987  break;
1988  case kHelpOnMenus:
1989  hd = new TRootHelpDialog(this, "Help on Menus...", 600, 400);
1991  hd->Popup();
1992  break;
1993  case kHelpOnGraphicsEd:
1994  hd = new TRootHelpDialog(this, "Help on Graphics Editor...", 600, 400);
1996  hd->Popup();
1997  break;
1998  case kHelpOnBrowser:
1999  hd = new TRootHelpDialog(this, "Help on Browser...", 600, 400);
2001  hd->Popup();
2002  break;
2003  case kHelpOnObjects:
2004  hd = new TRootHelpDialog(this, "Help on Objects...", 600, 400);
2005  hd->SetText(gHelpObjects);
2006  hd->Popup();
2007  break;
2008  case kHelpOnPS:
2009  hd = new TRootHelpDialog(this, "Help on PostScript...", 600, 400);
2010  hd->SetText(gHelpPostscript);
2011  hd->Popup();
2012  break;
2013  case kHelpOnRemote:
2014  hd = new TRootHelpDialog(this, "Help on Browser...", 600, 400);
2015  hd->SetText(gHelpRemote);
2016  hd->Popup();
2017  break;
2018  default:
2019  break;
2020  }
2021  break;
2022  case kCM_COMBOBOX:
2023  if (parm1 == kFSComboBox) {
2025  if (e) {
2026  const char *dirname = e->GetPath()->GetString();
2027  item = fLt->FindItemByPathname(dirname);
2028  if (item) {
2029  fListLevel = item;
2031  DisplayDirectory();
2033  } else {
2034  ToSystemDirectory(dirname);
2035  }
2036  }
2037  }
2038  break;
2039  default:
2040  break;
2041  }
2042 
2043  break;
2044 
2045  case kC_LISTTREE:
2046  switch (GET_SUBMSG(msg)) {
2047 
2048  case kCT_ITEMCLICK:
2049  // tell coverity that parm1 is a Long_t, and not an enum (even
2050  // if we compare it with an enum value) and the meaning of
2051  // parm1 depends on GET_MSG(msg) and GET_SUBMSG(msg)
2052  // coverity[mixed_enums]
2053  if (((EMouseButton)parm1 == kButton1) ||
2054  ((EMouseButton)parm1 == kButton3)) {
2055  HideTextEdit();
2056  TGListTreeItem *item2;
2057  TObject *obj2 = 0;
2058  if ((item2 = fLt->GetSelected()) != 0 ) {
2059  ListTreeHighlight(item2);
2060  fStatusBar->SetText("", 1); // clear
2061  }
2062  if (item2 && parm1 == kButton3) {
2063  Int_t x = (Int_t)(parm2 & 0xffff);
2064  Int_t y = (Int_t)((parm2 >> 16) & 0xffff);
2065  obj2 = (TObject *) item2->GetUserData();
2066  if (obj2) {
2067  if (obj2->InheritsFrom("TTree")) {
2068  // if a tree not attached to any directory (e.g. in a TFolder)
2069  // then attach it to the current directory (gDirectory)
2070  cmd = TString::Format("((TTree *)0x%lx)->GetDirectory();",
2071  (ULong_t)obj2);
2072  tdir = (TDirectory *)gROOT->ProcessLine(cmd.Data());
2073  if (!tdir) {
2074  cmd = TString::Format("((TTree *)0x%lx)->SetDirectory(gDirectory);",
2075  (ULong_t)obj2);
2076  gROOT->ProcessLine(cmd.Data());
2077  }
2078  }
2079  fBrowser->GetContextMenu()->Popup(x, y, obj2, fBrowser);
2080  }
2081  }
2083  fListView->LayoutHeader(0);
2084  fListView->Layout();
2085  }
2086  break;
2087 
2088  case kCT_ITEMDBLCLICK:
2089  if (parm1 == kButton1) {
2090  if (fBrowseTextFile) {
2091  HideTextEdit();
2092  }
2093  if (fListLevel && fIconBox->WasGrouped()) {
2094  TObject *obj2;
2095  TGListTreeItem *item2;
2096 
2097  if (fListLevel) {
2098  item2 = fListLevel->GetParent();
2099  if (item2) fListLevel = item2;
2100 
2101  obj2 = (TObject *) fListLevel->GetUserData();
2103  if (obj2) {
2104  BrowseObj(obj2);
2105  }
2106  }
2107  break;
2108  }
2109  }
2110 
2111  default:
2112  break;
2113  }
2114  break;
2115 
2116  case kC_CONTAINER:
2117  switch (GET_SUBMSG(msg)) {
2118 
2119  case kCT_ITEMCLICK:
2120  if (fIconBox->NumSelected() == 1) {
2121  // display title of selected object
2122  TGFileItem *item2;
2123  void *p = 0;
2124  if ((item2 = (TGFileItem *)fIconBox->GetNextSelected(&p)) != 0) {
2125  TObject *obj2 = (TObject *)item2->GetUserData();
2126 
2127  TGListTreeItem *itm = 0;
2128  if (!fListLevel) itm = fLt->GetFirstItem();
2129  else itm = fListLevel->GetFirstChild();
2130  //Bool_t found = kFALSE;
2131 
2132  while (itm) {
2133  if (itm->GetUserData() == obj2) break;
2134  itm = itm->GetNextSibling();
2135  }
2136 
2137  if (itm) {
2138  if ((fListLevel && fListLevel->IsOpen()) || !fListLevel) {
2139  fLt->ClearHighlighted();
2140  fLt->HighlightItem(itm);
2142  }
2143  }
2144 
2145  if (obj2) fStatusBar->SetText(obj2->GetName(), 1);
2146  }
2147  }
2148  if (parm1 == kButton3) {
2149  // show context menu for selected object
2150  if (fIconBox->NumSelected() == 1) {
2151  void *p = 0;
2152  TGFileItem *item2;
2153  if ((item2 = (TGFileItem *) fIconBox->GetNextSelected(&p)) != 0) {
2154  Int_t x = (Int_t)(parm2 & 0xffff);
2155  Int_t y = (Int_t)((parm2 >> 16) & 0xffff);
2156  TObject *obj2 = (TObject *)item2->GetUserData();
2157  if (obj2) {
2158  if (obj2->IsA() == TKey::Class()) {
2159  TKey *key = (TKey*)obj2;
2160  TClass *cl = TClass::GetClass(key->GetClassName());
2161  TString name = key->GetName();
2162  name += ";";
2163  name += key->GetCycle();
2164  //void *add = gROOT->FindObject((char *) name.Data());//key->GetName());
2165  void *add = gDirectory->FindObjectAny((char *) name.Data());
2166  if (cl->IsTObject()) {
2167  obj2 = (TObject*)add; // cl->DynamicCast(TObject::Class(),startadd);
2168  item2->SetUserData(obj2);
2169  } else {
2170  Error("ProcessMessage","do not support non TObject (like %s) yet",
2171  cl->GetName());
2172  break;
2173  }
2174  }
2175  if (obj2 && obj2->InheritsFrom("TTree")) {
2176  // if a tree not attached to any directory (e.g. in a TFolder)
2177  // then attach it to the current directory (gDirectory)
2178  cmd = TString::Format("((TTree *)0x%lx)->GetDirectory();",
2179  (ULong_t)obj2);
2180  tdir = (TDirectory *)gROOT->ProcessLine(cmd.Data());
2181  if (!tdir) {
2182  cmd = TString::Format("((TTree *)0x%lx)->SetDirectory(gDirectory);",
2183  (ULong_t)obj2);
2184  gROOT->ProcessLine(cmd.Data());
2185  }
2186  }
2187  fBrowser->GetContextMenu()->Popup(x, y, obj2, fBrowser);
2188  }
2189  }
2190  }
2191  }
2192  break;
2193  case kCT_ITEMDBLCLICK:
2194  if (parm1 == kButton1) {
2195  if (fIconBox->NumSelected() == 1) {
2196  void *p = 0;
2197  TGFileItem *item2;
2198  if ((item2 = (TGFileItem *) fIconBox->GetNextSelected(&p)) != 0) {
2199  TObject *obj2 = (TObject *)item2->GetUserData();
2200  if (obj2) {
2201  DoubleClicked(obj2);
2202  IconBoxAction(obj2);
2203  }
2204  delete cursorSwitcher;
2205  return kTRUE; //
2206  }
2207  }
2208  }
2209  break;
2210  case kCT_SELCHANGED:
2211  DisplayTotal((Int_t)parm1, (Int_t)parm2);
2212  break;
2213  default:
2214  break;
2215  }
2216 
2217  break;
2218 
2219  default:
2220  break;
2221  }
2222 
2223  delete cursorSwitcher;
2224 
2226  return kTRUE;
2227 }
2228 
2229 ////////////////////////////////////////////////////////////////////////////////
2230 /// Make object associated with item the current directory.
2231 
2233 {
2234  if (item) {
2235  TGListTreeItem *i = item;
2236  TString dir;
2237  while (i) {
2238  TObject *obj = (TObject*) i->GetUserData();
2239  if (obj) {
2240  if (obj->IsA() == TDirectoryFile::Class()) {
2241  dir = "/" + dir;
2242  dir = obj->GetName() + dir;
2243  }
2244  if (obj->IsA() == TFile::Class()) {
2245  dir = ":/" + dir;
2246  dir = obj->GetName() + dir;
2247  }
2248  if (obj->IsA() == TKey::Class()) {
2249  if (strcmp(((TKey*)obj)->GetClassName(), "TDirectoryFile") == 0) {
2250  dir = "/" + dir;
2251  dir = obj->GetName() + dir;
2252  }
2253  }
2254  }
2255  i = i->GetParent();
2256  }
2257 
2258  if (gDirectory && dir.Length()) gDirectory->cd(dir.Data());
2259  }
2260 }
2261 
2262 ////////////////////////////////////////////////////////////////////////////////
2263 /// helper method to track history
2264 
2266 {
2267  if (!fListLevel) return;
2268 
2269  fLt->ClearHighlighted();
2271 }
2272 
2273 ////////////////////////////////////////////////////////////////////////////////
2274 /// helper method to track history
2275 
2277 {
2280 
2281  if (!item || (fHistoryCursor &&
2282  (item == ((TRootBrowserHistoryCursor*)fHistoryCursor)->fItem))) return;
2283 
2285  fHistory->Remove(cur);
2286  delete cur;
2287  }
2288 
2289  cur = new TRootBrowserHistoryCursor(item);
2290  fHistory->Add(cur);
2291  fHistoryCursor = cur;
2292  btn->SetState(kButtonUp);
2293 }
2294 
2295 ////////////////////////////////////////////////////////////////////////////////
2296 /// clear navigation history
2297 
2299 {
2300  fHistory->Delete();
2303  btn->SetState(kButtonDisabled);
2304  btn2->SetState(kButtonDisabled);
2305 }
2306 
2307 ////////////////////////////////////////////////////////////////////////////////
2308 /// go to the past
2309 
2311 {
2312  if (fBrowseTextFile) {
2313  HideTextEdit();
2314  return kFALSE;
2315  }
2319 
2320  if (!cur) {
2321  btn->SetState(kButtonDisabled);
2322  return kFALSE;
2323  }
2324 
2325  fLt->ClearHighlighted();
2326  fHistoryCursor = cur;
2327  fListLevel = cur->fItem;
2329  fLt->AdjustPosition();
2331 
2332  btn2->SetState(kButtonUp);
2334  if (!cur) {
2335  btn->SetState(kButtonDisabled);
2336  return kFALSE;
2337  }
2338 
2339  return kTRUE;
2340 }
2341 
2342 ////////////////////////////////////////////////////////////////////////////////
2343 /// go to the future
2344 
2346 {
2347  if (fBrowseTextFile) {
2348  HideTextEdit();
2349  return kFALSE;
2350  }
2351 
2355 
2356  if (!cur) {
2357  btn->SetState(kButtonDisabled);
2358  return kFALSE;
2359  }
2360 
2361  fLt->ClearHighlighted();
2362  fHistoryCursor = cur;
2363  fListLevel = cur->fItem;
2365  fLt->AdjustPosition();
2367 
2368  btn2->SetState(kButtonUp);
2369 
2371  if (!cur) {
2372  btn->SetState(kButtonDisabled);
2373  return kFALSE;
2374  }
2375 
2376  return kTRUE;
2377 }
2378 
2379 ////////////////////////////////////////////////////////////////////////////////
2380 /// delete list tree item, remove it from history
2381 
2383 {
2384  ((TRootBrowserHistory*)fHistory)->DeleteItem(item);
2385  fLt->DeleteItem(item);
2386 }
2387 
2388 ////////////////////////////////////////////////////////////////////////////////
2389 /// Open tree item and list in iconbox its contents.
2390 
2392 {
2393  if (item) {
2394  TObject *obj = (TObject *) item->GetUserData();
2395 
2396  if (obj) {
2397  if (obj->IsA() == TKey::Class()) {
2398 
2399  TKey *key = (TKey *)obj;
2400  TString name = obj->GetName();
2401  name += ";";
2402  name += key->GetCycle();
2403  Chdir(item->GetParent());
2404  //TObject *k_obj = gROOT->FindObject(name);
2405  TObject *k_obj = gDirectory->FindObjectAny(name);
2406 
2407  if (k_obj) {
2408  item->SetUserData(k_obj);
2409  obj = k_obj;
2410  }
2411  } else if (obj->InheritsFrom(TDirectoryFile::Class())) {
2412  Chdir(item->GetParent());
2413  }
2414  else if (obj->InheritsFrom("TApplicationRemote")) {
2415  if (!gApplication->GetAppRemote()) {
2416  gROOT->ProcessLine(Form(".R %s", item->GetText()));
2417  if (gApplication->GetAppRemote()) {
2418  Getlinem(kInit, TString::Format("\n%s:root [0]",
2420  }
2421  }
2422  }
2423  else if (obj->InheritsFrom("TRemoteObject")) {
2424  // special case for remote object
2425  TRemoteObject *robj = (TRemoteObject *)obj;
2426  // the real object is a TKey
2427  if (!strcmp(robj->GetClassName(), "TKey")) {
2428  TGListTreeItem *parent = item;
2429  TRemoteObject *probj = (TRemoteObject *)parent->GetUserData();
2430  // find the TFile remote object containing the TKey
2431  while ( probj && strcmp(probj->GetClassName(), "TFile")) {
2432  parent = parent->GetParent();
2433  probj = (TRemoteObject *)parent->GetUserData();
2434  }
2435  if (probj) {
2436  // remotely browse file (remotely call TFile::cd())
2439  TString::Format("((TApplicationServer *)gApplication)->BrowseFile(\"%s\");",
2440  probj->GetName()));
2441  }
2442  }
2443  }
2444  if (item->GetParent() && item->GetParent()->GetUserData() &&
2445  ((TObject *)item->GetParent()->GetUserData())->InheritsFrom("TApplicationRemote")) {
2446  // switch to remote session
2447  if (!gApplication->GetAppRemote()) {
2448  gROOT->ProcessLine(Form(".R %s", item->GetParent()->GetText()));
2449  if (gApplication->GetAppRemote()) {
2450  Getlinem(kInit, TString::Format("\n%s:root [0]",
2452  }
2453  }
2454  else if (!strcmp(item->GetText(), "ROOT Files")) {
2455  // update list of files opened in the remote session
2457  gApplication->ProcessLine("((TApplicationServer *)gApplication)->BrowseFile(0);");
2458  }
2459  }
2460  else {
2461  // check if the listtree item is from a local session or
2462  // from a remote session, then switch to the session it belongs to
2463  TGListTreeItem *top = item;
2464  while (top->GetParent()) {
2465  top = top->GetParent();
2466  }
2467  TObject *topobj = (TObject *) top->GetUserData();
2468  if (topobj && topobj->InheritsFrom("TApplicationRemote")) {
2469  // it belongs to a remote session
2470  if (!gApplication->GetAppRemote()) {
2471  // switch to remote session if not already in
2472  gROOT->ProcessLine(Form(".R %s", top->GetText()));
2473  if (gApplication->GetAppRemote()) {
2474  Getlinem(kInit, TString::Format("\n%s:root [0]",
2476  }
2477  }
2478  }
2479  else if (gApplication->GetAppRemote()) {
2480  // switch back to local session if not already in
2481  gApplication->ProcessLine(".R");
2482  Getlinem(kInit, "\nroot [0]");
2483  }
2484  }
2485 
2486  if (!fListLevel || !fListLevel->IsActive()) {
2487  fListLevel = item;
2488  BrowseObj(obj);
2490  }
2491  }
2492  DisplayDirectory();
2493  }
2494 }
2495 
2496 ////////////////////////////////////////////////////////////////////////////////
2497 /// display directory
2498 
2499 void TRootBrowserLite::ToSystemDirectory(const char *dirname)
2500 {
2501  TString dir = dirname;
2502 
2503  if (fListLevel) {
2504  TObject* obj = (TObject*)fListLevel->GetUserData();
2505 
2506  if (obj && (obj->IsA() == TSystemDirectory::Class())) {
2507  TObject* old = obj;
2508  fListLevel->Rename(dir.Data());
2509  obj = new TSystemDirectory(dir.Data(), dir.Data());
2510  while (fListLevel->GetFirstChild())
2513 
2514  fListLevel->SetUserData(obj);
2515  gROOT->GetListOfBrowsables()->Remove(old);
2516  delete old;
2517  gROOT->GetListOfBrowsables()->Add(obj);
2518  fTreeLock = kTRUE;
2519  BrowseObj(obj);
2520  fTreeLock = kFALSE;
2521 
2524  DisplayDirectory();
2525  //gSystem->ChangeDirectory(dir.Data());
2526  fStatusBar->SetText(dir.Data(), 1);
2527  ClearHistory(); // clear browsing history
2528  }
2529  }
2530  return;
2531 }
2532 
2533 ////////////////////////////////////////////////////////////////////////////////
2534 /// sets drawing option
2535 
2537 {
2538  fDrawOption->GetTextEntry()->SetText(option);
2539 }
2540 
2541 ////////////////////////////////////////////////////////////////////////////////
2542 /// returns drawing option
2543 
2545 {
2546  return fDrawOption->GetTextEntry()->GetText();
2547 }
2548 ////////////////////////////////////////////////////////////////////////////////
2549 /// Emits signal when double clicking on icon.
2550 
2552 {
2553  Emit("DoubleClicked(TObject*)", (Long_t)obj);
2554 }
2555 
2556 ////////////////////////////////////////////////////////////////////////////////
2557 /// Emits signal when double clicking on icon.
2558 
2560 {
2561  Long_t args[2];
2562 
2563  args[0] = (Long_t)obj;
2564  args[1] = checked;
2565 
2566  Emit("Checked(TObject*,Bool_t)", args);
2567 }
2568 
2569 ////////////////////////////////////////////////////////////////////////////////
2570 /// Default action when double clicking on icon.
2571 
2573 {
2574  Bool_t browsable = kFALSE;
2575  if (obj) {
2576 
2577  TRootBrowserCursorSwitcher cursorSwitcher(fIconBox, fLt);
2578 
2579  Bool_t useLock = kTRUE;
2580 
2581  if (obj->IsA()->GetMethodWithPrototype("Browse", "TBrowser*"))
2582  browsable = kTRUE;
2583 
2584  if (obj->InheritsFrom("TLeaf")) {
2585  TObject *dir = (TObject *)gROOT->ProcessLine(Form("((%s *)0x%lx)->GetBranch()->GetDirectory();",
2586  obj->ClassName(), (ULong_t)obj));
2587  if (!dir) {
2588  browsable = kFALSE;
2589  }
2590  }
2591  if (obj->InheritsFrom("TBranchElement")) {
2592  TObject *dir = (TObject *)gROOT->ProcessLine(Form("((%s *)0x%lx)->GetDirectory();",
2593  obj->ClassName(), (ULong_t)obj));
2594  if (!dir) {
2595  browsable = kFALSE;
2596  }
2597  }
2598 
2599  if (obj->InheritsFrom("TKey")) {
2600  TKey *key = dynamic_cast<TKey*>(obj);
2601  if (key && key->GetClassName() && (!strcmp(key->GetClassName(), "TFormula")))
2602  browsable = kFALSE;
2603  }
2604 
2605  if (obj->IsA() == TSystemDirectory::Class()) {
2606  useLock = kFALSE;
2607 
2608  TString t(obj->GetName());
2609  if (t == ".") goto out;
2610  if (t == "..") {
2611  if (fListLevel && fListLevel->GetParent()) {
2613  obj = (TObject*)fListLevel->GetUserData();
2614  if (fListLevel->GetParent()) {
2616  } else {
2617  obj = (TObject*)fListLevel->GetUserData();
2618  fListLevel = 0;
2619  }
2620  } else {
2621  TString dirname = gSystem->GetDirName(gSystem->pwd());
2622  ToSystemDirectory(dirname);
2623  return;
2624  }
2625  }
2626  }
2627 
2628  if (obj && obj->IsFolder()) {
2629  fIconBox->RemoveAll();
2630  TGListTreeItem *itm = nullptr;
2631 
2632  if (fListLevel) {
2634  itm = fListLevel->GetFirstChild();
2635  } else {
2636  itm = fLt->GetFirstItem();
2637  }
2638 
2639  while (itm && (itm->GetUserData() != obj)) {
2640  itm = itm->GetNextSibling();
2641  }
2642 
2643  if (!itm && fListLevel) {
2644  // special case for remote objects
2645  Bool_t isRemote = kFALSE;
2646  if (obj->InheritsFrom("TRemoteObject"))
2647  isRemote = kTRUE;
2648  else if (fListLevel) {
2649  // check also if one of its parents is a remote object
2650  TGListTreeItem *top = fListLevel;
2651  while (top->GetParent()) {
2652  TObject *tobj = (TObject *) top->GetUserData();
2653  if (tobj && (tobj->InheritsFrom("TRemoteObject") ||
2654  tobj->InheritsFrom("TApplicationRemote"))) {
2655  isRemote = kTRUE;
2656  break;
2657  }
2658  top = top->GetParent();
2659  }
2660  }
2661  if (isRemote) {
2662  // add the remote object only if not already in the list
2663  if ((!fLt->FindChildByName(fListLevel, obj->GetName())) &&
2664  (!fLt->FindChildByData(fListLevel, obj))) {
2665  itm = fLt->AddItem(fListLevel, obj->GetName());
2666  if (itm) itm->SetUserData(obj);
2667  }
2668  else {
2669  // set the current item to the one found in the list
2670  itm = fLt->FindChildByData(fListLevel, obj) ?
2671  fLt->FindChildByData(fListLevel, obj) :
2673  }
2674  }
2675  else {
2676  itm = fLt->AddItem(fListLevel, obj->GetName());
2677  if (itm) itm->SetUserData(obj);
2678  }
2679  }
2680 
2681  if (itm) {
2682  fListLevel = itm;
2683  DisplayDirectory();
2684  TObject *kobj = (TObject *)itm->GetUserData();
2685 
2686  if (kobj && kobj->IsA() == TKey::Class()) {
2688  //kobj = gROOT->FindObject(kobj->GetName());
2689  kobj = gDirectory->FindObjectAny(kobj->GetName());
2690 
2691  if (kobj) {
2692  TGListTreeItem *parent = fListLevel->GetParent();
2694  TGListTreeItem *kitem = fLt->AddItem(parent, kobj->GetName(), kobj);
2695  if (kitem) {
2696  obj = kobj;
2697  useLock = kFALSE;
2698  kitem->SetUserData(kobj);
2699  fListLevel = kitem;
2700  } else
2701  fListLevel = parent;
2702  }
2703  }
2705  }
2706  }
2707 
2708  if (browsable) {
2709  if (useLock) fTreeLock = kTRUE;
2710  Emit("BrowseObj(TObject*)", (Long_t)obj);
2711  if (obj) obj->Browse(fBrowser);
2712  if (useLock) fTreeLock = kFALSE;
2713  }
2714 
2715 out:
2716  if (obj && obj->IsA() != TSystemFile::Class()) {
2717  if (obj->IsFolder()) {
2718  fIconBox->Refresh();
2719  }
2720 
2721  if (fBrowser) {
2723  }
2724 
2727  }
2728  }
2729 }
2730 
2731 ////////////////////////////////////////////////////////////////////////////////
2732 /// Recursively remove object from browser.
2733 
2735 {
2736  // don't delete fIconBox items here (it's status will be updated
2737  // via TBrowser::Refresh() which should be called once all objects have
2738  // been removed.
2739 
2740  TGListTreeItem *item = fLt->FindItemByObj(fLt->GetFirstItem(), obj);
2741  if (item == 0)
2742  return;
2743  if (fListLevel && (item == fListLevel)) {
2744  TGListTreeItem *parent = item->GetParent();
2745  if (parent) {
2746  fListLevel = parent;
2747  fLt->ClearHighlighted();
2750  }
2751  else
2752  fListLevel = 0;
2753  }
2754  DeleteListTreeItem(item);
2755 }
2756 
2757 ////////////////////////////////////////////////////////////////////////////////
2758 /// Refresh the browser contents.
2759 
2761 {
2762  Bool_t refresh = fBrowser && fBrowser->GetRefreshFlag();
2763 
2764  if (fTextEdit && !gROOT->IsExecutingMacro() && force) {
2767  return;
2768  }
2769 
2770  if ( (refresh || force) && !fIconBox->WasGrouped()
2771  && fIconBox->NumItems()<fIconBox->GetGroupSize() ) {
2772 
2773  TRootBrowserCursorSwitcher cursorSwitcher(fIconBox, fLt);
2774  static UInt_t prev = 0;
2775  UInt_t curr = gROOT->GetListOfBrowsables()->GetSize();
2776  if (!prev) prev = curr;
2777 
2778  if (prev != curr) { // refresh gROOT
2779  TGListTreeItem *sav = fListLevel;
2780  fListLevel = 0;
2781  BrowseObj(gROOT);
2782  fListLevel = sav;
2783  prev = curr;
2784  }
2785 
2786  // Refresh the IconBox
2787  if (fListLevel) {
2788  TObject *obj = (TObject *)fListLevel->GetUserData();
2789  if (obj) {
2790  fTreeLock = kTRUE;
2791  BrowseObj(obj);
2792  fTreeLock = kFALSE;
2793  }
2794  }
2795  }
2797 }
2798 
2799 ////////////////////////////////////////////////////////////////////////////////
2800 /// Show or hide toolbar.
2801 
2803 {
2804  if (show) {
2808  } else {
2812  }
2813 }
2814 
2815 ////////////////////////////////////////////////////////////////////////////////
2816 /// Show or hide statusbar.
2817 
2819 {
2820  if (show) {
2823  } else {
2826  }
2827 }
2828 
2829 ////////////////////////////////////////////////////////////////////////////////
2830 /// Set defaults depending on settings in the user's .rootrc.
2831 
2832 void TRootBrowserLite::SetDefaults(const char *iconStyle, const char *sortBy)
2833 {
2834  const char *opt;
2835 
2836  // IconStyle: big, small, list, details
2837  if (iconStyle)
2838  opt = iconStyle;
2839  else
2840  opt = gEnv->GetValue("Browser.IconStyle", "small");
2841  if (!strcasecmp(opt, "big"))
2843  else if (!strcasecmp(opt, "small"))
2845  else if (!strcasecmp(opt, "list"))
2847  else if (!strcasecmp(opt, "details"))
2849  else
2851 
2852  // SortBy: name, type, size, date
2853  if (sortBy)
2854  opt = sortBy;
2855  else
2856  opt = gEnv->GetValue("Browser.SortBy", "name");
2857  if (!strcasecmp(opt, "name"))
2859  else if (!strcasecmp(opt, "type"))
2861  else if (!strcasecmp(opt, "size"))
2863  else if (!strcasecmp(opt, "date"))
2865  else
2867 
2868  fIconBox->Refresh();
2869 }
2870 
2871 ////////////////////////////////////////////////////////////////////////////////
2872 /// Set iconbox's view mode and update menu and toolbar buttons accordingly.
2873 
2875 {
2876  int i, bnum;
2877  EListViewMode lv;
2878 
2879  if (force || (fViewMode != new_mode)) {
2880 
2881  switch (new_mode) {
2882  default:
2883  if (!force)
2884  return;
2885  else
2886  new_mode = kViewLargeIcons;
2887  // intentionally no break
2888  case kViewLargeIcons:
2889  bnum = 2;
2890  lv = kLVLargeIcons;
2891  break;
2892  case kViewSmallIcons:
2893  bnum = 3;
2894  lv = kLVSmallIcons;
2895  break;
2896  case kViewList:
2897  bnum = 4;
2898  lv = kLVList;
2899  break;
2900  case kViewDetails:
2901  bnum = 5;
2902  lv = kLVDetails;
2903  break;
2904  }
2905 
2906  fViewMode = new_mode;
2908 
2909  for (i = 2; i <= 5; ++i)
2910  gToolBarData[i].fButton->SetState((i == bnum) ? kButtonEngaged : kButtonUp);
2911 
2913  TGTextButton** buttons = fListView->GetHeaderButtons();
2914  if ((lv == kLVDetails) && (buttons)) {
2915  if (!strcmp(fListView->GetHeader(1), "Attributes")) {
2916  buttons[0]->Connect("Clicked()", "TRootBrowserLite", this,
2917  TString::Format("SetSortMode(=%d)", kViewArrangeByName));
2918  buttons[1]->Connect("Clicked()", "TRootBrowserLite", this,
2919  TString::Format("SetSortMode(=%d)", kViewArrangeByType));
2920  buttons[2]->Connect("Clicked()", "TRootBrowserLite", this,
2921  TString::Format("SetSortMode(=%d)", kViewArrangeBySize));
2922  buttons[5]->Connect("Clicked()", "TRootBrowserLite", this,
2923  TString::Format("SetSortMode(=%d)", kViewArrangeByDate));
2924  }
2925  }
2927  }
2928 }
2929 
2930 ////////////////////////////////////////////////////////////////////////////////
2931 /// Set iconbox's sort mode and update menu radio buttons accordingly.
2932 
2934 {
2935  EFSSortMode smode;
2936 
2937  switch (new_mode) {
2938  default:
2939  new_mode = kViewArrangeByName;
2940  // intentionally no break
2941  case kViewArrangeByName:
2942  smode = kSortByName;
2943  break;
2944  case kViewArrangeByType:
2945  smode = kSortByType;
2946  break;
2947  case kViewArrangeBySize:
2948  smode = kSortBySize;
2949  break;
2950  case kViewArrangeByDate:
2951  smode = kSortByDate;
2952  break;
2953  }
2954 
2955  fSortMode = new_mode;
2957 
2958  fIconBox->Sort(smode);
2959 }
2960 
2961 ////////////////////////////////////////////////////////////////////////////////
2962 /// starts serach dialog
2963 
2965 {
2966  if (!fTextEdit) {
2968  } else {
2970  }
2971 }
2972 
2973 ////////////////////////////////////////////////////////////////////////////////
2974 /// test
2975 
2976 static Bool_t isBinary(const char *str, int len)
2977 {
2978  for (int i = 0; i < len; i++) {
2979  char c = str[i];
2980  if (((c < 32) || (c > 126)) && (c != '\t') && (c != '\r') && (c != '\n')) {
2981  return kTRUE;
2982  }
2983  }
2984  return kFALSE;
2985 }
2986 
2987 ////////////////////////////////////////////////////////////////////////////////
2988 /// hide text edit
2989 
2991 {
2992  if (!fTextEdit) return;
2993 
2998  TGButton *savbtn = fToolBar->GetButton(kViewSave);
2999  savbtn->Disconnect();
3001  delete fTextEdit;
3002  fTextEdit = 0;
3004  fV2->MapSubwindows();
3005  fV2->Layout();
3007  fTextFileName = "";
3008 }
3009 
3010 ////////////////////////////////////////////////////////////////////////////////
3011 /// browse text file
3012 
3014 {
3015  Bool_t loaded = (fTextEdit != 0);
3017  if (loaded) {
3018  HistoryBackward();
3019  }
3020  return;
3021  }
3022  const int bufferSize = 1024;
3023  char buffer[bufferSize];
3024 
3025  FILE *fd = fopen(file, "rb");
3026  if (fd == 0) {
3027  if (loaded) {
3028  HistoryBackward();
3029  }
3030  return;
3031  }
3032  int sz = fread(buffer, 1, bufferSize, fd);
3033  fclose(fd);
3034 
3035  if ((sz > 0) && isBinary(buffer, sz)) {
3036  if (loaded) {
3037  HistoryBackward();
3038  }
3039  return;
3040  }
3041 
3042  if (!fTextEdit) {
3045  TColor *col = gROOT->GetColor(19);
3046  if (col)
3049  TGSearchDialog::SearchDialog()->Connect("TextEntered(char *)", "TGTextEdit",
3050  fTextEdit, "Search(char *,Bool_t,Bool_t)");
3051  }
3053  TGButton *savbtn = fToolBar->GetButton(kViewSave);
3054  savbtn->Connect("Released()", "TGTextEdit", fTextEdit, "SaveFile(=0,kTRUE)");
3055  }
3056  fTextFileName = file;
3058  if (loaded) return;
3059 
3060  if (fTextFileName.EndsWith(".C")) {
3061  ShowMacroButtons();
3062  } else {
3064  }
3067  fTextEdit->MapWindow();
3068  fV2->MapSubwindows();
3069  fV2->Layout();
3071 
3072  if (fListLevel) {
3074  }
3076 
3077  if (btn) {
3078  btn->SetState(kButtonDisabled);
3079  }
3080 
3082 
3083  if (btn2) {
3084  btn2->SetState(kButtonUp);
3085  }
3086 }
3087 
3088 ////////////////////////////////////////////////////////////////////////////////
3089 /// executed browsed text macro
3090 
3092 {
3093  char *tmpfile = gSystem->ConcatFileName(gSystem->TempDirectory(),
3094  fTextFileName.Data());
3095 
3096  gROOT->SetExecutingMacro(kTRUE);
3097  fTextEdit->SaveFile(tmpfile, kFALSE);
3098  gROOT->Macro(tmpfile);
3099  gSystem->Unlink(tmpfile);
3100  delete [] tmpfile;
3101  gROOT->SetExecutingMacro(kFALSE);
3102 }
3103 
3104 ////////////////////////////////////////////////////////////////////////////////
3105 /// interrupt browsed macro execution
3106 
3108 {
3109  gROOT->SetInterrupt(kTRUE);
3110 }
3111 
3112 ////////////////////////////////////////////////////////////////////////////////
3113 /// show/hide macro buttons
3114 
3116 {
3120 
3121  static Bool_t connected = kFALSE;
3122 
3123  if (!show) {
3124  bt1->UnmapWindow();
3125  bt2->UnmapWindow();
3126  bt3->UnmapWindow();
3127  } else {
3128  bt1->MapWindow();
3129  bt2->MapWindow();
3130  bt3->MapWindow();
3131 
3132  if (!connected && fTextEdit) {
3133  bt1->Connect("Pressed()", "TRootBrowserLite", this, "ExecMacro()");
3134  bt2->Connect("Pressed()", "TRootBrowserLite", this, "InterruptMacro()");
3135  connected = kTRUE;
3136  }
3137  }
3138 }
3139 
3140 ////////////////////////////////////////////////////////////////////////////////
3141 /// Set text in column col in status bar.
3142 
3143 void TRootBrowserLite::SetStatusText(const char *txt, Int_t col)
3144 {
3146  TGStatusBar* status = GetStatusBar();
3147  if (status!=0) {
3148  status->SetText(txt, col);
3149  }
3150 }
3151 
3152 ////////////////////////////////////////////////////////////////////////////////
3153 /// Interface method to the old browser.
3154 
3156  UInt_t width, UInt_t height,
3157  Option_t * /*opt*/)
3158 {
3159  TRootBrowserLite *browser = new TRootBrowserLite(b, title, width, height);
3160  return (TBrowserImp *)browser;
3161 }
3162 
3163 ////////////////////////////////////////////////////////////////////////////////
3164 /// Interface method to the old browser.
3165 
3167  Int_t y, UInt_t width, UInt_t height,
3168  Option_t * /*opt*/)
3169 {
3170  TRootBrowserLite *browser = new TRootBrowserLite(b, title, x, y, width, height);
3171  return (TBrowserImp *)browser;
3172 }
TRootBrowserLite::DoubleClicked
virtual void DoubleClicked(TObject *obj)
Emits signal when double clicking on icon.
Definition: TRootBrowserLite.cxx:2551
TRootBrowserLite::Refresh
void Refresh(Bool_t force=kFALSE) override
Refresh the browser contents.
Definition: TRootBrowserLite.cxx:2760
TRootHelpDialog::Popup
void Popup()
Show help dialog.
Definition: TRootHelpDialog.cxx:69
c
#define c(i)
Definition: RSha256.hxx:101
EListViewMode
EListViewMode
Definition: TGListView.h:21
kViewSave
@ kViewSave
Definition: TRootBrowserLite.cxx:104
TRootIconList::TRootIconList
TRootIconList(TRootIconBox *box=0)
constructor
Definition: TRootBrowserLite.cxx:350
TRootIconList::Browse
void Browse(TBrowser *b)
browse icon list
Definition: TRootBrowserLite.cxx:715
TRootBrowserLite::SetStatusText
void SetStatusText(const char *txt, Int_t col) override
Set text in column col in status bar.
Definition: TRootBrowserLite.cxx:3143
TGContainer::fSelected
Int_t fSelected
number of selected items
Definition: TGCanvas.h:49
TGClient::GetDefaultRoot
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition: TGClient.cxx:236
TGListBox
A listbox is a box, possibly with scrollbar, containing entries.
Definition: TGListBox.h:221
TRootBrowserLite::fSortMode
Int_t fSortMode
current IconBox sort mode
Definition: TRootBrowserLite.h:111
TSystem::Unlink
virtual int Unlink(const char *name)
Unlink, i.e.
Definition: TSystem.cxx:1380
kViewToolBar
@ kViewToolBar
Definition: TRootBrowserLite.cxx:92
TRootIconBox::fThumbnails
THashTable * fThumbnails
Definition: TRootBrowserLite.cxx:403
TGListView::GetHeaderButtons
TGTextButton ** GetHeaderButtons()
Definition: TGListView.h:159
kViewList
@ kViewList
Definition: TRootBrowserLite.cxx:96
DefaultIcon_t
Definition: TRootBrowserLite.cxx:135
TGPopupMenu::IsEntryChecked
virtual Bool_t IsEntryChecked(Int_t id)
Return true if menu item is checked.
Definition: TGMenu.cxx:1845
gHelpCanvas
R__EXTERN const char gHelpCanvas[]
Definition: HelpText.h:25
TGComboBox::GetSelectedEntry
virtual TGLBEntry * GetSelectedEntry() const
Definition: TGComboBox.h:115
GET_MSG
Int_t GET_MSG(Long_t val)
Definition: WidgetMessageTypes.h:110
TGStatusBar::SetParts
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
Definition: TGStatusBar.cxx:293
TRootBrowserCursorSwitcher::~TRootBrowserCursorSwitcher
~TRootBrowserCursorSwitcher()
Definition: TRootBrowserLite.cxx:230
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:225
TApplication::ApplicationName
virtual const char * ApplicationName() const
Definition: TApplication.h:123
TQObject::Disconnect
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
Definition: TQObject.cxx:1027
TGContainer::Associate
virtual void Associate(const TGWindow *w)
Definition: TGCanvas.h:89
DefaultIcon_t::fPicnamePrefix
const char * fPicnamePrefix
Definition: TRootBrowserLite.cxx:136
TRootIconBox::AddObjItem
void AddObjItem(const char *name, TObject *obj, TClass *cl)
Add object to iconbox.
Definition: TRootBrowserLite.cxx:553
TRootBrowserLite::ExecuteDefaultAction
void ExecuteDefaultAction(TObject *obj) override
Execute default action for selected object (action is specified in the $HOME/.root....
Definition: TRootBrowserLite.cxx:1642
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
TGFSComboBox::Update
virtual void Update(const char *path)
Update file system combo box.
Definition: TGFSComboBox.cxx:332
TRootBrowserLite::HistoryForward
Bool_t HistoryForward()
go to the future
Definition: TRootBrowserLite.cxx:2345
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
TBufferIO::WriteObject
void WriteObject(const TObject *obj, Bool_t cacheReuse=kTRUE) override
Write object to I/O buffer.
Definition: TBufferIO.cxx:530
isBinary
static Bool_t isBinary(const char *str, int len)
test
Definition: TRootBrowserLite.cxx:2976
TRootBrowserLite::fStatusBar
TGStatusBar * fStatusBar
Definition: TRootBrowserLite.h:107
TGListTree::FindChildByName
TGListTreeItem * FindChildByName(TGListTreeItem *item, const char *name)
Find child of item by name.
Definition: TGListTree.cxx:2277
TRootBrowserLite::fTreeView
TGCanvas * fTreeView
Definition: TRootBrowserLite.h:103
TGPosition::fY
Int_t fY
y position
Definition: TGDimension.h:39
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGTextEntry::SetText
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.
Definition: TGTextEntry.cxx:611
TRootBrowserLite::Search
void Search()
starts serach dialog
Definition: TRootBrowserLite.cxx:2964
TGMimeTypes::AddType
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.
Definition: TGMimeTypes.cxx:315
e
#define e(i)
Definition: RSha256.hxx:103
TGComboBox::GetNumberOfEntries
virtual Int_t GetNumberOfEntries() const
Definition: TGComboBox.h:107
ToolBarData_t::fPixmap
const char * fPixmap
Definition: TGToolBar.h:24
kFixedWidth
@ kFixedWidth
Definition: GuiTypes.h:387
TEnv::SetValue
virtual void SetValue(const char *name, const char *value, EEnvLevel level=kEnvChange, const char *type=nullptr)
Set the value of a resource or create a new resource.
Definition: TEnv.cxx:736
TRootBrowserLite::fTextFileName
TString fTextFileName
Definition: TRootBrowserLite.h:64
TObject::TestBit
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
Definition: TObject.h:187
TGCompositeFrame::GetList
virtual TList * GetList() const
Definition: TGFrame.h:310
TGLVEntry::fFontStruct
FontStruct_t fFontStruct
text font
Definition: TGListView.h:59
TGMainFrame
Defines top level windows that interact with the system Window Manager.
Definition: TGFrame.h:398
kViewStatusBar
@ kViewStatusBar
Definition: TRootBrowserLite.cxx:93
snprintf
#define snprintf
Definition: civetweb.c:1540
TGFileContainer
Definition: TGFSContainer.h:115
TDNDData::fDataLength
Int_t fDataLength
Length of data.
Definition: TGDNDManager.h:77
TRootObjItem::fDNDData
TDNDData fDNDData
Definition: TRootBrowserLite.cxx:287
kC_LISTTREE
@ kC_LISTTREE
Definition: WidgetMessageTypes.h:65
TRootIconBox::TRootIconBox
TRootIconBox(TRootBrowserLite *browser, TGListView *lv, UInt_t options=kSunkenFrame, ULong_t back=GetDefaultFrameBackground())
Create iconbox containing ROOT objects in browser.
Definition: TRootBrowserLite.cxx:435
TRootBrowserLite::DisplayDirectory
void DisplayDirectory()
Display current directory in second label, fLbl2.
Definition: TRootBrowserLite.cxx:1601
TBrowser::SetBrowserImp
void SetBrowserImp(TBrowserImp *i)
Definition: TBrowser.h:95
TGPicture
The TGPicture class implements pictures and icons used in the different GUI elements and widgets.
Definition: TGPicture.h:25
TGFileItem
Definition: TGFSContainer.h:42
f
#define f(i)
Definition: RSha256.hxx:104
TImage::Merge
virtual void Merge(const TImage *, const char *="alphablend", Int_t=0, Int_t=0)
Definition: TImage.h:172
TRootBrowserLite::fHf
TGHorizontalFrame * fHf
Definition: TRootBrowserLite.h:52
TVirtualPad::Update
virtual void Update()=0
Option_t
const char Option_t
Definition: RtypesCore.h:66
TIconBoxThumb
Definition: TRootBrowserLite.cxx:237
TIconBoxThumb::fName
TString fName
Definition: TRootBrowserLite.cxx:239
TGFileContainer::fFolder_t
const TGPicture * fFolder_t
small folder icon
Definition: TGFSContainer.h:126
TRootBrowserLite::ReallyDelete
void ReallyDelete() override
Really delete the browser and the this GUI.
Definition: TRootBrowserLite.cxx:1566
kFSComboBox
@ kFSComboBox
Definition: TRootBrowserLite.cxx:120
TGHorizontal3DLine
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
Definition: TG3DLine.h:18
TRootBrowserLite::~TRootBrowserLite
virtual ~TRootBrowserLite()
Browser destructor.
Definition: TRootBrowserLite.cxx:929
TRootBrowserLite::GetDrawOption
Option_t * GetDrawOption() const override
returns drawing option
Definition: TRootBrowserLite.cxx:2544
TKeyMapFile.h
TRootBrowserLite::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2) override
Handle menu and other command generated by the user.
Definition: TRootBrowserLite.cxx:1767
kHelpOnPS
@ kHelpOnPS
Definition: TRootBrowserLite.cxx:128
TGFSComboBox.h
THashTable::Add
void Add(TObject *obj)
Add object to the hash table.
Definition: THashTable.cxx:92
TRootBrowserLite::DeleteListTreeItem
void DeleteListTreeItem(TGListTreeItem *item)
delete list tree item, remove it from history
Definition: TRootBrowserLite.cxx:2382
gHelpPullDownMenus
R__EXTERN const char gHelpPullDownMenus[]
Definition: HelpText.h:24
TGMainFrame::SetIconName
void SetIconName(const char *name)
Set window icon name. This is typically done via the window manager.
Definition: TGFrame.cxx:1777
kNPOS
const Ssiz_t kNPOS
Definition: RtypesCore.h:124
TImage::Create
static TImage * Create()
Create an image.
Definition: TImage.cxx:35
kFileQuit
@ kFileQuit
Definition: TRootBrowserLite.cxx:90
TString::Prepend
TString & Prepend(const char *cs)
Definition: TString.h:661
kFilePrint
@ kFilePrint
Definition: TRootBrowserLite.cxx:88
TRootBrowserLite::GetIconBox
TGFileContainer * GetIconBox() const
returns pointer to fIconBox object
Definition: TRootBrowserLite.cxx:1558
TRootObjItem::fObj
TObject * fObj
Definition: TRootBrowserLite.cxx:286
gEnv
R__EXTERN TEnv * gEnv
Definition: TEnv.h:170
kViewArrangeBySize
@ kViewArrangeBySize
Definition: TRootBrowserLite.cxx:108
TRootObjItem::GetDNDData
virtual TDNDData * GetDNDData(Atom_t)
Definition: TRootBrowserLite.cxx:263
TString::Atoll
Long64_t Atoll() const
Return long long value of string.
Definition: TString.cxx:1972
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
TGMainFrame::SetIconPixmap
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
Definition: TGFrame.cxx:1792
kLVLargeIcons
@ kLVLargeIcons
Definition: TGListView.h:22
TList::Delete
virtual void Delete(Option_t *option="")
Remove all objects from the list AND delete all heap based objects.
Definition: TList.cxx:470
TString::Data
const char * Data() const
Definition: TString.h:369
TRootBrowserLite::TRootIconBox
friend class TRootIconBox
Definition: TRootBrowserLite.h:42
kLHintsTop
@ kLHintsTop
Definition: TGLayout.h:27
TSystem::IsAbsoluteFileName
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
Definition: TSystem.cxx:951
TRootIconList::GetTitle
const char * GetTitle() const
Returns title of object.
Definition: TRootBrowserLite.cxx:341
TGFileItem::SetDNDData
void SetDNDData(TDNDData *data)
Set drag and drop data.
Definition: TGFSContainer.cxx:464
TRootIconBox::GetObjPictures
void GetObjPictures(const TGPicture **pic, const TGPicture **spic, TObject *obj, const char *name)
Retrieve icons associated with class "name".
Definition: TRootBrowserLite.cxx:477
TGListTree::ClearHighlighted
void ClearHighlighted()
Un highlight items.
Definition: TGListTree.cxx:2389
TRootBrowserLite::fLbl2
TGLabel * fLbl2
Definition: TRootBrowserLite.h:51
TRootIconBox::~TRootIconBox
virtual ~TRootIconBox()
destructor
Definition: TRootBrowserLite.cxx:465
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Form
char * Form(const char *fmt,...)
EKeySym
EKeySym
Definition: KeySymbols.h:25
TGFileContainer::fRefresh
TViewUpdateTimer * fRefresh
refresh timer
Definition: TGFSContainer.h:122
TGTextEditDialogs.h
kFileCloseBrowser
@ kFileCloseBrowser
Definition: TRootBrowserLite.cxx:89
TGComboBox::AddEntry
virtual void AddEntry(TGString *s, Int_t id)
Definition: TGComboBox.h:86
TObjString.h
TColor::GetPixel
ULong_t GetPixel() const
Return pixel value corresponding to this color.
Definition: TColor.cxx:1446
kFileOpen
@ kFileOpen
Definition: TRootBrowserLite.cxx:85
TImage::SetImageBuffer
virtual Bool_t SetImageBuffer(char **, EImageFileTypes=TImage::kPng)
Definition: TImage.h:242
TRootBrowserLite::AddToTree
virtual void AddToTree(TObject *obj, const char *name, Int_t check=-1)
Add items to the current TGListTree of the browser.
Definition: TRootBrowserLite.cxx:1422
kViewArrangeByName
@ kViewArrangeByName
Definition: TRootBrowserLite.cxx:106
TGContainer::FindFrame
virtual TGFrameElement * FindFrame(Int_t x, Int_t y, Bool_t exclude=kTRUE)
Find frame located int container at position x,y.
Definition: TGCanvas.cxx:1657
TRootBrowserLite::ExecMacro
void ExecMacro()
executed browsed text macro
Definition: TRootBrowserLite.cxx:3091
gHelpObjects
R__EXTERN const char gHelpObjects[]
Definition: HelpText.h:26
TObject::GetIconName
virtual const char * GetIconName() const
Returns mime type name of object.
Definition: TObject.cxx:369
TGStatusBar.h
kLHintsLeft
@ kLHintsLeft
Definition: TGLayout.h:24
TObject::Info
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:867
Long64_t
long long Long64_t
Definition: RtypesCore.h:80
TRootBrowserLite::fBrowseTextFile
Bool_t fBrowseTextFile
Definition: TRootBrowserLite.h:63
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:893
TGTextEntry::SetToolTipText
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
Definition: TGTextEntry.cxx:1649
TGPopupMenu::AddSeparator
virtual void AddSeparator(TGMenuEntry *before=nullptr)
Add a menu separator to the menu.
Definition: TGMenu.cxx:1060
TGLabel
This class handles GUI labels.
Definition: TGLabel.h:24
TString::kIgnoreCase
@ kIgnoreCase
Definition: TString.h:268
TGFileInfo::fMultipleSelection
Bool_t fMultipleSelection
if true, allow multiple file selection
Definition: TGFileDialog.h:51
TGListTree::HighlightItem
void HighlightItem(TGListTreeItem *item)
Highlight item.
Definition: TGListTree.cxx:2379
gHelpPostscript
R__EXTERN const char gHelpPostscript[]
Definition: HelpText.h:21
TContextMenu::Popup
virtual void Popup(Int_t x, Int_t y, TObject *obj, TVirtualPad *c=nullptr, TVirtualPad *p=nullptr)
Popup context menu at given location in canvas c and pad p for selected object.
Definition: TContextMenu.cxx:411
TRootBrowserLite::fTreeHdr
TGCompositeFrame * fTreeHdr
Definition: TRootBrowserLite.h:53
kSortByDate
@ kSortByDate
Definition: TGFSContainer.h:24
TGListTree::FindChildByData
TGListTreeItem * FindChildByData(TGListTreeItem *item, void *userData)
Find child of item by userData.
Definition: TGListTree.cxx:2300
TGTreeLBEntry
Definition: TGFSComboBox.h:25
TGListBox::Resize
virtual void Resize(UInt_t w, UInt_t h)
Resize the listbox widget.
Definition: TGListBox.cxx:1411
TGContainer::NumSelected
virtual Int_t NumSelected() const
Definition: TGCanvas.h:104
TGToolBar
A toolbar is a composite frame that contains TGPictureButtons.
Definition: TGToolBar.h:33
gFile
#define gFile
Definition: TFile.h:343
TImage::FromPad
virtual void FromPad(TVirtualPad *, Int_t=0, Int_t=0, UInt_t=0, UInt_t=0)
Definition: TImage.h:122
kButtonUp
@ kButtonUp
Definition: TGButton.h:53
gInterpreter
#define gInterpreter
Definition: TInterpreter.h:560
TGWindow::kEditDisable
@ kEditDisable
disable edit of this window
Definition: TGWindow.h:50
TSystemDirectory
Describes an Operating System directory for the browser.
Definition: TSystemDirectory.h:32
TGListTreeItem::GetText
virtual const char * GetText() const =0
TGMainFrame::SetWMSizeHints
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.
Definition: TGFrame.cxx:1880
TRootBrowserLite::fLt
TGListTree * fLt
Definition: TRootBrowserLite.h:104
TBrowser::GetContextMenu
TContextMenu * GetContextMenu() const
Definition: TBrowser.h:96
TGListTree::GetSelected
TGListTreeItem * GetSelected() const
Definition: TGListTree.h:382
TGFileContainer::AddFile
virtual TGFileItem * AddFile(const char *name, const TGPicture *pic=nullptr, const TGPicture *lpic=nullptr)
Add file in container.
Definition: TGFSContainer.cxx:803
TRootBrowserLite::AddToBox
virtual void AddToBox(TObject *obj, const char *name)
Add items to the iconbox of the browser.
Definition: TRootBrowserLite.cxx:1392
TObject::GetObjectInfo
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Returns string containing info about the object at position (px,py).
Definition: TObject.cxx:388
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGTextButton
Yield an action as soon as it is clicked.
Definition: TGButton.h:142
gHelpGraphicsEditor
R__EXTERN const char gHelpGraphicsEditor[]
Definition: HelpText.h:23
TGView::SetBackgroundColor
virtual void SetBackgroundColor(Pixel_t)
Set background color of the canvas frame.
Definition: TGView.cxx:581
kViewInterrupt
@ kViewInterrupt
Definition: TRootBrowserLite.cxx:103
TRootBrowserLite::fToolBar
TGToolBar * fToolBar
Definition: TRootBrowserLite.h:46
TRootIconBox::fLargeCachedPic
const TGPicture * fLargeCachedPic
Definition: TRootBrowserLite.cxx:398
TGComboBox::GetTextEntry
virtual TGTextEntry * GetTextEntry() const
Definition: TGComboBox.h:111
TGLVEntry
Definition: TGListView.h:36
Int_t
int Int_t
Definition: RtypesCore.h:45
TObjString::GetString
const TString & GetString() const
Definition: TObjString.h:46
TGLVEntry::SetUserData
void SetUserData(void *userData)
Definition: TGListView.h:94
box
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Definition: fillpatterns.C:1
TGSearchDialog::SearchDialog
static TGSearchDialog *& SearchDialog()
Return global search dialog.
Definition: TGTextEditDialogs.cxx:303
TGListView::SetHeaders
virtual void SetHeaders(Int_t ncolumns)
Set number of headers, i.e.
Definition: TGListView.cxx:1240
TRootBrowserLite::fIconBox
TRootIconBox * fIconBox
Definition: TRootBrowserLite.h:102
kFileNewBuilder
@ kFileNewBuilder
Definition: TRootBrowserLite.cxx:84
TGFileInfo::SetIniDir
void SetIniDir(const char *inidir)
Set directory name.
Definition: TGFileDialog.cxx:116
TBrowser.h
TGListTree
A list tree is a widget that can contain a number of items arranged in a tree structure.
Definition: TGListTree.h:195
HelpText.h
TString::Hash
UInt_t Hash(ECaseCompare cmp=kExact) const
Return hash value.
Definition: TString.cxx:662
TBuffer::Buffer
char * Buffer() const
Definition: TBuffer.h:96
TGTextEdit.h
TApplication::ProcessLine
virtual Longptr_t ProcessLine(const char *line, Bool_t sync=kFALSE, Int_t *error=0)
TWin32SplashThread.h
TRootBrowserLite::SetDrawOption
void SetDrawOption(Option_t *option="") override
sets drawing option
Definition: TRootBrowserLite.cxx:2536
TImage
An abstract interface to image processing library.
Definition: TImage.h:29
TRootBrowserLite
This class creates a ROOT object browser (looking like Windows Explorer).
Definition: TRootBrowserLite.h:40
TString::EndsWith
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
Definition: TString.cxx:2202
kCT_SELCHANGED
@ kCT_SELCHANGED
Definition: WidgetMessageTypes.h:56
TGComboBox::Select
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...
Definition: TGComboBox.cxx:456
TGCompositeFrame::SetEditDisabled
virtual void SetEditDisabled(UInt_t on=1)
Set edit disable flag for this frame and subframes.
Definition: TGFrame.cxx:1022
event
Definition: triangle.c:553
x
Double_t x[n]
Definition: legend1.C:17
TString::Length
Ssiz_t Length() const
Definition: TString.h:410
TGFSContainer.h
TGMimeTypes.h
TString::kExact
@ kExact
Definition: TString.h:268
TRootBrowserLite::ShowToolBar
virtual void ShowToolBar(Bool_t show=kTRUE)
Show or hide toolbar.
Definition: TRootBrowserLite.cxx:2802
TGFileContainer::fDoc_s
const TGPicture * fDoc_s
big document icon
Definition: TGFSContainer.h:131
TClass.h
TGFrame::fgWhitePixel
static Pixel_t fgWhitePixel
Definition: TGFrame.h:103
TList::Last
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Definition: TList.cxx:693
kButton1
@ kButton1
Definition: GuiTypes.h:214
TGMainFrame::SetWindowName
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1764
TGListTree::FindItemByPathname
TGListTreeItem * FindItemByPathname(const char *path)
Find item by pathname.
Definition: TGListTree.cxx:2324
TGStatusBar::SetText
virtual void SetText(TGString *text, Int_t partidx=0)
Set text in partition partidx in status bar.
Definition: TGStatusBar.cxx:145
TEnv::GetValue
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
Definition: TEnv.cxx:491
TColor.h
kKeyMod1Mask
const Mask_t kKeyMod1Mask
typically the Alt key
Definition: GuiTypes.h:198
TImage::GetHeight
virtual UInt_t GetHeight() const
Definition: TImage.h:229
TCollection::fName
TString fName
Definition: TCollection.h:147
TRootIconBox::WasGrouped
Bool_t WasGrouped() const
Definition: TRootBrowserLite.cxx:429
TGFrame::GetDefaultFrameBackground
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:683
TVirtualX.h
TRootBrowserCursorSwitcher
Definition: TRootBrowserLite.cxx:221
TKeyMapFile
Utility class for browsing TMapFile objects.
Definition: TKeyMapFile.h:20
TGHorizontalFrame
A composite frame that layout their children in horizontal way.
Definition: TGFrame.h:386
TRootHelpDialog::SetText
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
Definition: TRootHelpDialog.cxx:77
TRootBrowserLite::SetSortMode
void SetSortMode(Int_t new_mode)
Set iconbox's sort mode and update menu radio buttons accordingly.
Definition: TRootBrowserLite.cxx:2933
kViewSmallIcons
@ kViewSmallIcons
Definition: TRootBrowserLite.cxx:95
TGListBox::GetContainer
virtual TGFrame * GetContainer() const
Definition: TGListBox.h:267
TGLVEntry::GetUserData
void * GetUserData() const
Definition: TGListView.h:95
TGContainer::fLastName
TString fLastName
the name of object of last search
Definition: TGCanvas.h:55
TRootObjItem::TRootObjItem
TRootObjItem(const TGWindow *p, const TGPicture *bpic, const TGPicture *spic, TGString *name, TObject *obj, TClass *cl, EListViewMode viewMode=kLVSmallIcons)
Create an icon box item.
Definition: TRootBrowserLite.cxx:293
kFileNewBrowser
@ kFileNewBrowser
Definition: TRootBrowserLite.cxx:82
TGListTree::FindItemByObj
TGListTreeItem * FindItemByObj(TGListTreeItem *item, void *ptr)
Find item with fUserData == ptr.
Definition: TGListTree.cxx:2827
TRootBrowserLite::ShowMacroButtons
void ShowMacroButtons(Bool_t show=kTRUE)
show/hide macro buttons
Definition: TRootBrowserLite.cxx:3115
TGListTree::AddItem
void AddItem(TGListTreeItem *parent, TGListTreeItem *item)
Add given item to list tree.
Definition: TGListTree.cxx:1957
TRootIconBox::fCurrentItem
TRootObjItem * fCurrentItem
Definition: TRootBrowserLite.cxx:392
TString::Format
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition: TString.cxx:2336
TObject::GetTitle
virtual const char * GetTitle() const
Returns title of object.
Definition: TObject.cxx:403
TGListTree::DeleteItem
Int_t DeleteItem(TGListTreeItem *item)
Delete item from list tree.
Definition: TGListTree.cxx:2015
TGFileItem::fBuf
TBufferFile * fBuf
buffer used for Drag and Drop
Definition: TGFSContainer.h:53
TGPopupMenu::DisableEntry
virtual void DisableEntry(Int_t id)
Disable entry (disabled entries appear in a sunken relieve).
Definition: TGMenu.cxx:1724
TEnv.h
EMouseButton
EMouseButton
Button names.
Definition: GuiTypes.h:214
TGDNDManager.h
TRootBrowserLite::fMenuBarLayout
TGLayoutHints * fMenuBarLayout
Definition: TRootBrowserLite.h:56
TRootBrowserLite::TRootBrowserLite
TRootBrowserLite(const TRootBrowserLite &)=delete
TRootBrowserLite::fExpandLayout
TGLayoutHints * fExpandLayout
Definition: TRootBrowserLite.h:62
TRootBrowserLite::ClearHistory
void ClearHistory()
clear navigation history
Definition: TRootBrowserLite.cxx:2298
TString
Basic string class.
Definition: TString.h:136
TSystem::AccessPathName
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition: TSystem.cxx:1295
TGFrame
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition: TGFrame.h:80
TWin32SplashThread
Definition: TWin32SplashThread.h:18
TGTextView::SetReadOnly
virtual void SetReadOnly(Bool_t on=kTRUE)
Definition: TGTextView.h:117
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TRootBrowserLite::NewBrowser
static TBrowserImp * NewBrowser(TBrowser *b=nullptr, const char *title="ROOT Browser", UInt_t width=800, UInt_t height=500, Option_t *opt="")
Interface method to the old browser.
Definition: TRootBrowserLite.cxx:3155
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:37
TGPopupMenu::UnCheckEntry
virtual void UnCheckEntry(Int_t id)
Uncheck menu entry (i.e. remove check mark).
Definition: TGMenu.cxx:1807
kDoubleBorder
@ kDoubleBorder
Definition: GuiTypes.h:385
THashTable::Delete
void Delete(Option_t *option="")
Remove all objects from the table AND delete all heap based objects.
Definition: THashTable.cxx:220
TGListView
A list view is a widget that can contain a number of items arranged in a grid or list.
Definition: TGListView.h:115
kCT_ITEMDBLCLICK
@ kCT_ITEMDBLCLICK
Definition: WidgetMessageTypes.h:55
TObject::InheritsFrom
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:445
kHelpOnObjects
@ kHelpOnObjects
Definition: TRootBrowserLite.cxx:127
TGClient::GetPicturePool
TGPicturePool * GetPicturePool() const
Definition: TGClient.h:126
b
#define b(i)
Definition: RSha256.hxx:100
TFile.h
TGToolBar.h
TGLabel::SetText
virtual void SetText(TGString *newText)
Set new text in label.
Definition: TGLabel.cxx:180
TSystem::GetDirName
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
Definition: TSystem.cxx:1031
TGListTree::GetFirstItem
TGListTreeItem * GetFirstItem() const
Definition: TGListTree.h:381
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition: TGFrame.h:204
TRemoteObject.h
bool
TSystem::WorkingDirectory
virtual const char * WorkingDirectory()
Return working directory.
Definition: TSystem.cxx:871
TString::ReplaceAll
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:692
TGFrame::GetWidth
UInt_t GetWidth() const
Definition: TGFrame.h:224
TGToolBar::Cleanup
virtual void Cleanup()
Cleanup and delete all objects contained in this composite frame.
Definition: TGToolBar.cxx:214
TGCompositeFrame::fList
TList * fList
container of frame elements
Definition: TGFrame.h:292
lv
auto * lv
Definition: textalign.C:5
TRootBrowserHistoryCursor::fItem
TGListTreeItem * fItem
Definition: TRootBrowserLite.cxx:184
TGContainer::AdjustPosition
virtual void AdjustPosition()
Move content to position of highlighted/activated frame.
Definition: TGCanvas.cxx:1793
TGFileDialog.h
TRootBrowserLite::fHelpMenu
TGPopupMenu * fHelpMenu
Definition: TRootBrowserLite.h:99
TGFrameElement::fFrame
TGFrame * fFrame
Definition: TGLayout.h:112
TRootBrowserLite::UpdateDrawOption
void UpdateDrawOption()
add new draw option to the "history"
Definition: TRootBrowserLite.cxx:1534
kWatch
@ kWatch
Definition: GuiTypes.h:375
kKey_Right
@ kKey_Right
Definition: KeySymbols.h:42
TRootBrowserLite::ShowStatusBar
virtual void ShowStatusBar(Bool_t show=kTRUE)
Show or hide statusbar.
Definition: TRootBrowserLite.cxx:2818
TImage.h
TRootBrowserLite::fBarLayout
TGLayoutHints * fBarLayout
Definition: TRootBrowserLite.h:60
TROOT.h
TGWindow::DestroyWindow
virtual void DestroyWindow()
destroy window
Definition: TGWindow.cxx:192
TRootIconBox::fBrowser
TRootBrowserLite * fBrowser
Definition: TRootBrowserLite.cxx:405
TGListTree::SetAutoTips
void SetAutoTips(Bool_t on=kTRUE)
Definition: TGListTree.h:351
TGMenuBar::AddPopup
virtual void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
Add popup menu to menu bar.
Definition: TGMenu.cxx:418
TGStatusBar
Provides a StatusBar widget.
Definition: TGStatusBar.h:21
TObjString
Collectable string class.
Definition: TObjString.h:28
gClient
#define gClient
Definition: TGClient.h:157
kTextLeft
@ kTextLeft
Definition: TGWidget.h:23
kLHintsBottom
@ kLHintsBottom
Definition: TGLayout.h:29
TDNDData::fDataType
Atom_t fDataType
Data type description.
Definition: TGDNDManager.h:74
TGListTreeItem::IsActive
virtual Bool_t IsActive() const =0
TGContainer::fMsgWindow
const TGWindow * fMsgWindow
window handling container messages
Definition: TGCanvas.h:42
TIconBoxThumb::TIconBoxThumb
TIconBoxThumb(const char *name, const TGPicture *spic, const TGPicture *pic)
Definition: TRootBrowserLite.cxx:243
TApplication.h
TList::First
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:659
TRootIconBox::TRootIconList
friend class TRootIconList
Definition: TRootBrowserLite.cxx:386
kViewArrangeByDate
@ kViewArrangeByDate
Definition: TRootBrowserLite.cxx:109
TObject::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:359
total
static unsigned int total
Definition: TGWin32ProxyDefs.h:40
TGListTree::AdjustPosition
void AdjustPosition(TGListTreeItem *item)
Move content to position of item.
Definition: TGListTree.cxx:1290
TGString::GetLength
Int_t GetLength() const
Definition: TGString.h:29
TRootIconBox::fGroupSize
Int_t fGroupSize
Definition: TRootBrowserLite.cxx:396
TRootBrowserLite::GetStatusBar
TGStatusBar * GetStatusBar() const
Definition: TRootBrowserLite.h:145
TGListView::SetHeader
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...
Definition: TGListView.cxx:1300
TBuffer::Length
Int_t Length() const
Definition: TBuffer.h:100
TRemoteObject
The TRemoteObject class provides protocol for browsing ROOT objects from a remote ROOT session.
Definition: TRemoteObject.h:34
TRootBrowserCursorSwitcher::TRootBrowserCursorSwitcher
TRootBrowserCursorSwitcher(TGWindow *w1, TGWindow *w2)
Definition: TRootBrowserLite.cxx:226
TRootBrowserLite::fHistory
TList * fHistory
history of browsing
Definition: TRootBrowserLite.h:67
TList::After
virtual TObject * After(const TObject *obj) const
Returns the object after object obj.
Definition: TList.cxx:330
TRootBrowserLite::CreateBrowser
void CreateBrowser(const char *name)
Create the actual browser.
Definition: TRootBrowserLite.cxx:974
TGLBContainer
A Composite frame that contains a list of TGLBEnties.
Definition: TGListBox.h:163
TContextMenu.h
TGFrame::DeleteWindow
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:276
TString::ECaseCompare
ECaseCompare
Definition: TString.h:268
TRootBrowserHistoryCursor
Definition: TRootBrowserLite.cxx:182
TRootBrowserLite::fV2
TGVerticalFrame * fV2
Definition: TRootBrowserLite.h:49
TGTextEdit
A TGTextEdit is a specialization of TGTextView.
Definition: TGTextEdit.h:22
TGContainer::GetPagePosition
virtual TGPosition GetPagePosition() const
Returns page position.
Definition: TGCanvas.cxx:737
TG3DLine.h
kSortByType
@ kSortByType
Definition: TGFSContainer.h:22
gHelpBrowserLite
R__EXTERN const char gHelpBrowserLite[]
Definition: HelpText.h:19
TSystemDirectory.h
kSunkenFrame
@ kSunkenFrame
Definition: GuiTypes.h:383
TGPicturePool::GetPicture
const TGPicture * GetPicture(const char *name)
Get a picture from the picture pool.
Definition: TGPicture.cxx:82
TGMainFrame::SendCloseMessage
virtual void SendCloseMessage()
Send close message to self.
Definition: TGFrame.cxx:1720
TGMainFrame::SetClassHints
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition: TGFrame.cxx:1832
TRootBrowserLite::fComboLayout
TGLayoutHints * fComboLayout
Definition: TRootBrowserLite.h:59
TBrowser::kNoHidden
@ kNoHidden
Definition: TBrowser.h:55
TGContainer::Search
virtual void Search(Bool_t close=kTRUE)
Invokes search dialog. Looks for item with the entered name.
Definition: TGCanvas.cxx:1467
kOneLevelUp
@ kOneLevelUp
Definition: TRootBrowserLite.cxx:119
TBrowserImp
ABC describing GUI independent browser implementation protocol.
Definition: TBrowserImp.h:29
TDNDData::fData
void * fData
Actual data.
Definition: TGDNDManager.h:76
TApplication::kProcessRemotely
@ kProcessRemotely
Definition: TApplication.h:44
TList::FirstLink
virtual TObjLink * FirstLink() const
Definition: TList.h:108
TRootBrowserLite::AddToHistory
void AddToHistory(TGListTreeItem *item)
helper method to track history
Definition: TRootBrowserLite.cxx:2276
TRootBrowserLite::fMenuBarItemLayout
TGLayoutHints * fMenuBarItemLayout
Definition: TRootBrowserLite.h:57
TRootBrowserLite::Show
void Show() override
Definition: TRootBrowserLite.h:138
TSystem.h
TGPosition::fX
Int_t fX
x position
Definition: TGDimension.h:38
TRootBrowserLite::fTextEdit
TGTextEdit * fTextEdit
contents of browsed text file
Definition: TRootBrowserLite.h:112
THashTable
THashTable implements a hash table to store TObject's.
Definition: THashTable.h:35
TKey::GetClassName
virtual const char * GetClassName() const
Definition: TKey.h:76
kLHintsCenterY
@ kLHintsCenterY
Definition: TGLayout.h:28
TSystemFile
A TSystemFile describes an operating system file.
Definition: TSystemFile.h:29
TColor
The color creation and management class.
Definition: TColor.h:19
TGTextEdit::SaveFile
virtual Bool_t SaveFile(const char *fname, Bool_t saveas=kFALSE)
Save file.
Definition: TGTextEdit.cxx:388
h
#define h(i)
Definition: RSha256.hxx:106
kGKeyPress
@ kGKeyPress
Definition: GuiTypes.h:60
TImage::Scale
virtual void Scale(UInt_t, UInt_t)
Definition: TImage.h:141
TGContainer::SetHsbPosition
virtual void SetHsbPosition(Int_t newPos)
set new hor. position
Definition: TGCanvas.cxx:1777
kButton3
@ kButton3
Definition: GuiTypes.h:214
TObject::SetBit
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:696
TGCompositeFrame::MapSubwindows
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1164
TGContainer::fLastActiveEl
TGFrameElement * fLastActiveEl
last active item
Definition: TGCanvas.h:43
TGVerticalFrame
A composite frame that layout their children in vertical way.
Definition: TGFrame.h:375
kButtonEngaged
@ kButtonEngaged
Definition: TGButton.h:55
kViewRefresh
@ kViewRefresh
Definition: TRootBrowserLite.cxx:100
TList::Before
virtual TObject * Before(const TObject *obj) const
Returns the object before object obj.
Definition: TList.cxx:371
TGListTreeItem::SetUserData
virtual void SetUserData(void *, Bool_t=kFALSE)
Definition: TGListTree.h:79
kLVDetails
@ kLVDetails
Definition: TGListView.h:25
TGWidget::Associate
virtual void Associate(const TGWindow *w)
Definition: TGWidget.h:72
kViewArrangeAuto
@ kViewArrangeAuto
Definition: TRootBrowserLite.cxx:110
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:605
TGObject::fId
Handle_t fId
X11/Win32 Window identifier.
Definition: TGObject.h:26
kSortByName
@ kSortByName
Definition: TGFSContainer.h:21
TRootIconBox::Refresh
void Refresh()
Sort icons, and send message to browser with number of objects in box.
Definition: TRootBrowserLite.cxx:863
TGTextEntry
A TGTextEntry is a one line text input widget.
Definition: TGTextEntry.h:24
TRootBrowserLite::fListLevel
TGListTreeItem * fListLevel
current TGListTree level
Definition: TRootBrowserLite.h:108
TString::Remove
TString & Remove(Ssiz_t pos)
Definition: TString.h:673
Atom_t
Handle_t Atom_t
WM token.
Definition: GuiTypes.h:37
TGLVContainer::ActivateItem
virtual void ActivateItem(TGFrameElement *el)
Select/activate item.
Definition: TGListView.cxx:757
TGListTree::CheckItem
void CheckItem(TGListTreeItem *item, Bool_t check=kTRUE)
Set check button state for the node 'item'.
Definition: TGListTree.cxx:2759
TRootBrowserLite.h
TRootIconList
Definition: TRootBrowserLite.cxx:331
TGDNDManager::IsDragging
Bool_t IsDragging() const
Definition: TGDNDManager.h:173
THashTable::FindObject
TObject * FindObject(const char *name) const
Find object using its name.
Definition: THashTable.cxx:238
TGFrame::SendMessage
virtual void SendMessage(const TGWindow *w, Long_t msg, Long_t parm1, Long_t parm2)
Send message (i.e.
Definition: TGFrame.cxx:645
TRootBrowserLite::HistoryBackward
Bool_t HistoryBackward()
go to the past
Definition: TRootBrowserLite.cxx:2310
TGFileContainer::AddRemoteFile
virtual TGFileItem * AddRemoteFile(TObject *obj, const TGPicture *ipic=nullptr, const TGPicture *ilpic=nullptr)
Add remote file in container.
Definition: TGFSContainer.cxx:852
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TRootBrowserLite::fFSComboBox
TGFSComboBox * fFSComboBox
Definition: TRootBrowserLite.h:106
TSystem::Exec
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition: TSystem.cxx:655
TRootIconBox::fSmallCachedPic
const TGPicture * fSmallCachedPic
Definition: TRootBrowserLite.cxx:399
TCollection::fSize
Int_t fSize
Definition: TCollection.h:148
TGCompositeFrame::HideFrame
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1190
TImage::GetMask
virtual Pixmap_t GetMask()
Definition: TImage.h:236
TRootBrowserLite::IconBoxAction
void IconBoxAction(TObject *obj)
Default action when double clicking on icon.
Definition: TRootBrowserLite.cxx:2572
kCM_BUTTON
@ kCM_BUTTON
Definition: WidgetMessageTypes.h:34
Long_t
long Long_t
Definition: RtypesCore.h:54
TRootBrowserLite::Add
void Add(TObject *obj, const char *name=nullptr, Int_t check=-1) override
Add items to the browser.
Definition: TRootBrowserLite.cxx:1286
kLHintsRight
@ kLHintsRight
Definition: TGLayout.h:26
kLVSmallIcons
@ kLVSmallIcons
Definition: TGListView.h:23
TGFileInfo
Definition: TGFileDialog.h:39
TGString::SetString
virtual void SetString(const char *s)
Definition: TGString.h:31
gToolBarData
static ToolBarData_t gToolBarData[]
Definition: TRootBrowserLite.cxx:154
TGLayoutHints
This class describes layout hints used by the layout classes.
Definition: TGLayout.h:50
TRootHelpDialog.h
TRootBrowserLite::fHistoryCursor
TObject * fHistoryCursor
current history position
Definition: TRootBrowserLite.h:68
gDirectory
#define gDirectory
Definition: TDirectory.h:327
kViewFind
@ kViewFind
Definition: TRootBrowserLite.cxx:101
TGListTreeItem::IsOpen
virtual Bool_t IsOpen() const
Definition: TGListTree.h:64
TRootIconList::IsFolder
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TRootBrowserLite.cxx:342
TRootIconBox::FindFrame
TGFrameElement * FindFrame(Int_t x, Int_t y, Bool_t exclude=kTRUE)
Find frame located int container at position x,y.
Definition: TRootBrowserLite.cxx:428
TRootBrowserLite::fSortMenu
TGPopupMenu * fSortMenu
Definition: TRootBrowserLite.h:100
gApplication
R__EXTERN TApplication * gApplication
Definition: TApplication.h:165
TRootBrowserLite::ToSystemDirectory
void ToSystemDirectory(const char *dirname)
display directory
Definition: TRootBrowserLite.cxx:2499
kC_CONTAINER
@ kC_CONTAINER
Definition: WidgetMessageTypes.h:53
TGContainer::FindItem
virtual void * FindItem(const TString &name, Bool_t direction=kTRUE, Bool_t caseSensitive=kTRUE, Bool_t subString=kFALSE)
Definition: TGCanvas.cxx:1690
TGLVEntry::fSubnames
TGString ** fSubnames
sub names of item (details)
Definition: TGListView.h:44
TRootBrowserLite::HandleKey
Bool_t HandleKey(Event_t *event) override
handle keys
Definition: TRootBrowserLite.cxx:1249
TVirtualPad.h
TGListView::LayoutHeader
virtual void LayoutHeader(TGFrame *head)
Layout list view components (container and contents of container).
Definition: TGListView.cxx:1539
TRootIconBox::GetGroupSize
Int_t GetGroupSize() const
Definition: TRootBrowserLite.cxx:427
TString::BeginsWith
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Definition: TString.h:615
TGContainer::ClearViewPort
virtual void ClearViewPort()
Clear view port and redraw full content.
Definition: TGCanvas.cxx:891
TRootBrowserLite::ListTreeHighlight
void ListTreeHighlight(TGListTreeItem *item)
Open tree item and list in iconbox its contents.
Definition: TRootBrowserLite.cxx:2391
TRootBrowserLite::SetViewMode
void SetViewMode(Int_t new_mode, Bool_t force=kFALSE)
Set iconbox's view mode and update menu and toolbar buttons accordingly.
Definition: TRootBrowserLite.cxx:2874
TGListView::SetViewMode
virtual void SetViewMode(EListViewMode viewMode)
Set list view mode.
Definition: TGListView.cxx:1366
TClass::GetClass
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.
Definition: TClass.cxx:2955
TRootBrowserHistory::RecursiveRemove
void RecursiveRemove(TObject *obj)
Remove object from this collection and recursively remove the object from all other objects (and coll...
Definition: TRootBrowserLite.cxx:194
TGComboBox::GetListBox
virtual TGListBox * GetListBox() const
Definition: TGComboBox.h:110
y
Double_t y[n]
Definition: legend1.C:17
TApplication::Terminate
virtual void Terminate(Int_t status=0)
kKey_Escape
@ kKey_Escape
Definition: KeySymbols.h:26
TGPopupMenu::Associate
virtual void Associate(const TGWindow *w)
Definition: TGMenu.h:206
TRootBrowserLite::fMenuBar
TGMenuBar * fMenuBar
Definition: TRootBrowserLite.h:45
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
kHelpOnBrowser
@ kHelpOnBrowser
Definition: TRootBrowserLite.cxx:123
TGListView::AdjustHeaders
virtual void AdjustHeaders()
Definition: TGListView.h:154
kLHintsExpandY
@ kLHintsExpandY
Definition: TGLayout.h:31
TDNDData
Drag and drop data container.
Definition: TGDNDManager.h:64
TIconBoxThumb::Hash
ULong_t Hash() const
Return hash value for this object.
Definition: TRootBrowserLite.cxx:248
TRootBrowserLite::fViewMode
Int_t fViewMode
current IconBox view mode
Definition: TRootBrowserLite.h:110
TRootIconList::~TRootIconList
virtual ~TRootIconList()
destructor
Definition: TRootBrowserLite.cxx:360
TRootBrowserLite::fFileMenu
TGPopupMenu * fFileMenu
Definition: TRootBrowserLite.h:96
KeySymbols.h
TGContainer::fLastCase
Bool_t fLastCase
case sensitivity of last search
Definition: TGCanvas.h:53
TRootBrowserLite::RemoveCheckBox
void RemoveCheckBox(TObject *obj) override
Remove checkbox from TGListTree and checkmark from TGListView.
Definition: TRootBrowserLite.cxx:1368
TGCompositeFrame::RemoveFrame
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1149
TGListTreeItem::GetFirstChild
TGListTreeItem * GetFirstChild() const
Definition: TGListTree.h:59
kKey_F5
@ kKey_F5
Definition: KeySymbols.h:61
kFileSave
@ kFileSave
Definition: TRootBrowserLite.cxx:86
kPointer
@ kPointer
Definition: GuiTypes.h:375
gDNDManager
R__EXTERN TGDNDManager * gDNDManager
Definition: TGDNDManager.h:201
TClass::IsTObject
Bool_t IsTObject() const
Return kTRUE is the class inherits from TObject.
Definition: TClass.cxx:5931
TRootBrowserLite::Chdir
void Chdir(TGListTreeItem *item)
Make object associated with item the current directory.
Definition: TRootBrowserLite.cxx:2232
TFile
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
TRemoteObject::GetKeyClassName
const char * GetKeyClassName() const
Definition: TRemoteObject.h:56
TGPopupMenu::CheckEntry
virtual void CheckEntry(Int_t id)
Check a menu entry (i.e. add a check mark in front of it).
Definition: TGMenu.cxx:1782
TRootIconList::fIconBox
TRootIconBox * fIconBox
Definition: TRootBrowserLite.cxx:334
TRootBrowserLite::DisplayTotal
void DisplayTotal(Int_t total, Int_t selected)
Display in statusbar total number of objects and number of selected objects in IconBox.
Definition: TRootBrowserLite.cxx:1584
TGListTreeItem::SetTipText
virtual void SetTipText(const char *)
Definition: TGListTree.h:77
kHelpOnRemote
@ kHelpOnRemote
Definition: TRootBrowserLite.cxx:129
TRootBrowserLite::BrowseObj
void BrowseObj(TObject *obj) override
Browse object.
Definition: TRootBrowserLite.cxx:1498
unsigned int
TGCompositeFrame::GetDefaultHeight
virtual UInt_t GetDefaultHeight() const
Definition: TGFrame.h:314
TRootBrowserLite::CloseWindow
void CloseWindow() override
In case window is closed via WM we get here.
Definition: TRootBrowserLite.cxx:1575
TRootIconBox::SetGroupSize
void SetGroupSize(Int_t siz)
Definition: TRootBrowserLite.cxx:426
TGComboBox
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
Definition: TGComboBox.h:47
gOpenTypes
static const char * gOpenTypes[]
Definition: TRootBrowserLite.cxx:177
TGButton::SetState
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition: TGButton.cxx:235
TGClient::GetMimeTypeList
TGMimeTypes * GetMimeTypeList() const
Definition: TGClient.h:146
kOptionAutoThumbnail
@ kOptionAutoThumbnail
Definition: TRootBrowserLite.cxx:117
TRootBrowserHistory
Definition: TRootBrowserLite.cxx:192
TRootBrowserLite::InterruptMacro
void InterruptMacro()
interrupt browsed macro execution
Definition: TRootBrowserLite.cxx:3107
TRootBrowserLite::fV1
TGVerticalFrame * fV1
Definition: TRootBrowserLite.h:48
kHorizontalFrame
@ kHorizontalFrame
Definition: GuiTypes.h:382
TString::Index
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
Definition: TString.h:639
TRootBrowserHistory::DeleteItem
void DeleteItem(TGListTreeItem *item)
Definition: TRootBrowserLite.cxx:206
gSystem
R__EXTERN TSystem * gSystem
Definition: TSystem.h:559
TGPopupMenu::RCheckEntry
virtual void RCheckEntry(Int_t id, Int_t IDfirst, Int_t IDlast)
Radio-select entry (note that they cannot be unselected, the selection must be moved to another entry...
Definition: TGMenu.cxx:1860
TKey
Book space in a file, create I/O buffers, to fill them, (un)compress them.
Definition: TKey.h:28
TGFSComboBox
This is a combo box that is used in the File Selection dialog box.
Definition: TGFSComboBox.h:67
TImage::GetWidth
virtual UInt_t GetWidth() const
Definition: TImage.h:228
TGListTree::GetPathnameFromItem
void GetPathnameFromItem(TGListTreeItem *item, char *path, Int_t depth=0)
Get pathname from item.
Definition: TGListTree.cxx:2398
TGLabel.h
TGPopupMenu::AddPopup
virtual void AddPopup(TGHotString *s, TGPopupMenu *popup, TGMenuEntry *before=nullptr, const TGPicture *p=nullptr)
Add a (cascading) popup menu to a popup menu.
Definition: TGMenu.cxx:1152
TRootBrowserLite::BrowseTextFile
void BrowseTextFile(const char *file)
browse text file
Definition: TRootBrowserLite.cxx:3013
TBrowser::SetRefreshFlag
void SetRefreshFlag(Bool_t flag)
Definition: TBrowser.h:99
TGFileInfo::fIniDir
char * fIniDir
on input: initial directory, on output: new directory
Definition: TGFileDialog.h:47
kKey_Left
@ kKey_Left
Definition: KeySymbols.h:40
TGListView::SetDefaultHeaders
virtual void SetDefaultHeaders()
Default headers are: Name, Attributes, Size, Owner, Group, Modified.
Definition: TGListView.cxx:1352
TGWindow::GetParent
const TGWindow * GetParent() const
Definition: TGWindow.h:76
TRootIconBox::fAutoThumbnail
Bool_t fAutoThumbnail
Definition: TRootBrowserLite.cxx:404
TGFileInfo::fFileTypes
const char ** fFileTypes
file types used to filter selectable files
Definition: TGFileDialog.h:48
TRootBrowserLite::Checked
virtual void Checked(TObject *obj, Bool_t check)
Emits signal when double clicking on icon.
Definition: TRootBrowserLite.cxx:2559
TGLVContainer::GetViewMode
EListViewMode GetViewMode() const
Definition: TGListView.h:214
TRootBrowserLite::fOptionMenu
TGPopupMenu * fOptionMenu
Definition: TRootBrowserLite.h:98
box
Definition: box.py:1
TGClient::NeedRedraw
void NeedRedraw(TGWindow *w, Bool_t force=kFALSE)
Set redraw flags.
Definition: TGClient.cxx:374
TString::IsNull
Bool_t IsNull() const
Definition: TString.h:407
TGListTree::SetToolTipItem
void SetToolTipItem(TGListTreeItem *item, const char *string)
Set tooltip text for this item.
Definition: TGListTree.cxx:2077
kViewGroupLV
@ kViewGroupLV
Definition: TRootBrowserLite.cxx:111
TGListView::Layout
virtual void Layout()
Layout list view components (container and contents of container).
Definition: TGListView.cxx:1448
TGLVContainer::fListView
TGListView * fListView
listview which contains this container
Definition: TGListView.h:190
kHelpOnGraphicsEd
@ kHelpOnGraphicsEd
Definition: TRootBrowserLite.cxx:126
TQObject::Connect
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.
Definition: TQObject.cxx:869
TVirtualPad
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
TSystem::TempDirectory
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
Definition: TSystem.cxx:1481
TRootIconBox::fActiveObject
TObject * fActiveObject
Definition: TRootBrowserLite.cxx:401
TGFileContainer::fFolder_s
const TGPicture * fFolder_s
big folder icon
Definition: TGFSContainer.h:127
TGFrame::UnmapWindow
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:206
TRootIconBox::fWasGrouped
Bool_t fWasGrouped
Definition: TRootBrowserLite.cxx:400
ToolBarData_t
Definition: TGToolBar.h:23
TGFileContainer::Sort
virtual void Sort(EFSSortMode sortType)
Sort file system list view container according to sortType.
Definition: TGFSContainer.cxx:628
TSystem::UnixPathName
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Definition: TSystem.cxx:1062
TList::Remove
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:822
TRootIconBox::RemoveGarbage
void RemoveGarbage()
delete all TRootIconLists from garbage
Definition: TRootBrowserLite.cxx:538
TGListTree::SetCheckBox
void SetCheckBox(TGListTreeItem *item, Bool_t on=kTRUE)
Set check button state for the node 'item'.
Definition: TGListTree.cxx:2767
TGObject::fClient
TGClient * fClient
Connection to display server.
Definition: TGObject.h:27
TBrowser::GetRefreshFlag
Bool_t GetRefreshFlag() const
Definition: TBrowser.h:97
TGFrame::MoveResize
virtual void MoveResize(Int_t x, Int_t y, UInt_t w=0, UInt_t h=0)
Move and/or resize the frame.
Definition: TGFrame.cxx:629
TCollection::GetSize
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Definition: TCollection.h:182
TRootBrowserLite::fListView
TGListView * fListView
Definition: TRootBrowserLite.h:101
TInterpreter.h
TGContainer::NumItems
virtual Int_t NumItems() const
Definition: TGCanvas.h:105
gHelpAbout
R__EXTERN const char gHelpAbout[]
Definition: HelpText.h:17
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
TRootBrowserLite::fViewMenu
TGPopupMenu * fViewMenu
Definition: TRootBrowserLite.h:97
kViewArrangeByType
@ kViewArrangeByType
Definition: TRootBrowserLite.cxx:107
TGListTreeItem::GetUserData
virtual void * GetUserData() const =0
kHistoryForw
@ kHistoryForw
Definition: TRootBrowserLite.cxx:114
file
Definition: file.py:1
TGContainer::fLastDir
Bool_t fLastDir
direction of last search
Definition: TGCanvas.h:52
kC_COMMAND
@ kC_COMMAND
Definition: WidgetMessageTypes.h:31
TRootBrowserLite::CheckObjectItem
void CheckObjectItem(TObject *obj, Bool_t check=kFALSE) override
Check / uncheck the TGListTreeItem corresponding to this object and add a checkmark on TGLVEntry if c...
Definition: TRootBrowserLite.cxx:1344
TRootBrowserLite::fToolBarSep
TGHorizontal3DLine * fToolBarSep
Definition: TRootBrowserLite.h:47
kViewLineUp
@ kViewLineUp
Definition: TRootBrowserLite.cxx:98
TRootIconList::fPic
const TGPicture * fPic
Definition: TRootBrowserLite.cxx:335
TList::Add
virtual void Add(TObject *obj)
Definition: TList.h:87
TRootBrowserCursorSwitcher::fW2
TGWindow * fW2
Definition: TRootBrowserLite.cxx:224
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TRootBrowserLite::HideTextEdit
void HideTextEdit()
hide text edit
Definition: TRootBrowserLite.cxx:2990
TGTextEntry.h
TBufferFile.h
TGSplitter.h
TKey::GetCycle
Short_t GetCycle() const
Return cycle number associated to this key.
Definition: TKey.cxx:577
TIconBoxThumb::GetName
const char * GetName() const
Returns name of object.
Definition: TRootBrowserLite.cxx:249
TGButton.h
TGListTree.h
TGDNDManager::EndDrag
Bool_t EndDrag()
End dragging.
Definition: TGDNDManager.cxx:971
TRootBrowserLite::fListHdr
TGCompositeFrame * fListHdr
Definition: TRootBrowserLite.h:54
TGPopupMenu
This class creates a popup menu object.
Definition: TGMenu.h:110
TGFrame::SetDNDSource
void SetDNDSource(Bool_t onoff)
Definition: TGFrame.h:268
TImage::GetPixmap
virtual Pixmap_t GetPixmap()
Definition: TImage.h:235
TRootBrowserLite::RecursiveRemove
void RecursiveRemove(TObject *obj) override
Recursively remove object from browser.
Definition: TRootBrowserLite.cxx:2734
Event_t
Event structure.
Definition: GuiTypes.h:174
GET_SUBMSG
Int_t GET_SUBMSG(Long_t val)
Definition: WidgetMessageTypes.h:111
TGToolBar::AddButton
virtual TGButton * AddButton(const TGWindow *w, ToolBarData_t *button, Int_t spacing=0)
Add button to toolbar.
Definition: TGToolBar.cxx:92
TList::Clear
virtual void Clear(Option_t *option="")
Remove all objects from the list.
Definition: TList.cxx:402
TFolder.h
ERootBrowserCommands
ERootBrowserCommands
Definition: TRootBrowserLite.cxx:80
kCM_COMBOBOX
@ kCM_COMBOBOX
Definition: WidgetMessageTypes.h:38
kFileSaveAs
@ kFileSaveAs
Definition: TRootBrowserLite.cxx:87
name
char name[80]
Definition: TGX11.cxx:110
gHelpRemote
R__EXTERN const char gHelpRemote[]
Definition: HelpText.h:28
TGTextLBEntry
Text string listbox entries.
Definition: TGListBox.h:48
TRootIconList::UpdateName
void UpdateName()
composite name
Definition: TRootBrowserLite.cxx:368
TIconBoxThumb::fLarge
const TGPicture * fLarge
Definition: TRootBrowserLite.cxx:241
TRootBrowserLite::fTreeLock
Bool_t fTreeLock
true when we want to lock TGListTree
Definition: TRootBrowserLite.h:109
TRootIconBox::fCheckHeaders
Bool_t fCheckHeaders
Definition: TRootBrowserLite.cxx:390
TGMainFrame::fDNDTypeList
Atom_t * fDNDTypeList
handles DND types
Definition: TGFrame.h:414
TGCanvas.h
TGListTreeItem::GetNextSibling
TGListTreeItem * GetNextSibling() const
Definition: TGListTree.h:62
TGListView::GetHeader
virtual const char * GetHeader(Int_t idx) const
Returns name of header idx.
Definition: TGListView.cxx:1341
TGFrameElement
Definition: TGLayout.h:105
TRemoteObject::GetClassName
const char * GetClassName() const
Definition: TRemoteObject.h:54
TGMimeTypes::GetAction
Bool_t GetAction(const char *filename, char *action)
Return in action the mime action string belonging to filename.
Definition: TGMimeTypes.cxx:225
TDirectory
Describe directory structure in memory.
Definition: TDirectory.h:45
TRootIconBox
Definition: TRootBrowserLite.cxx:385
TGTextEntry::GetText
const char * GetText() const
Definition: TGTextEntry.h:119
TVirtualPad::Modified
virtual void Modified(Bool_t flag=1)=0
TSystem::ConcatFileName
virtual char * ConcatFileName(const char *dir, const char *name)
Concatenate a directory and a file name. User must delete returned string.
Definition: TSystem.cxx:1070
TGString::GetString
const char * GetString() const
Definition: TGString.h:30
gPad
#define gPad
Definition: TVirtualPad.h:287
TRootBrowserLite::fLbl1
TGLabel * fLbl1
Definition: TRootBrowserLite.h:50
TROOT::GetBinDir
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Definition: TROOT.cxx:2894
TIter
Definition: TCollection.h:233
TBrowser::SetDrawOption
void SetDrawOption(Option_t *option="")
Set drawing option for object.
Definition: TBrowser.h:105
kCT_ITEMCLICK
@ kCT_ITEMCLICK
Definition: WidgetMessageTypes.h:54
TGLVEntry::fCtw
Int_t * fCtw
width of sub names
Definition: TGListView.h:47
TGFileContainer::fSortType
EFSSortMode fSortType
sorting mode of contents
Definition: TGFSContainer.h:120
EFSSortMode
EFSSortMode
Definition: TGFSContainer.h:20
kOptionShowCycles
@ kOptionShowCycles
Definition: TRootBrowserLite.cxx:116
TGListView::GetViewMode
EListViewMode GetViewMode() const
Definition: TGListView.h:161
kLHintsExpandX
@ kLHintsExpandX
Definition: TGLayout.h:30
TGFileContainer::fDoc_t
const TGPicture * fDoc_t
small document icon
Definition: TGFSContainer.h:130
kSortBySize
@ kSortBySize
Definition: TGFSContainer.h:23
TRootBrowserLite::fWidgets
TList * fWidgets
Definition: TRootBrowserLite.h:66
kViewExec
@ kViewExec
Definition: TRootBrowserLite.cxx:102
kHelpAbout
@ kHelpAbout
Definition: TRootBrowserLite.cxx:122
TGCompositeFrame::TGCompositeFrame
TGCompositeFrame(const TGCompositeFrame &)=delete
TRootIconBox::fGrouped
Bool_t fGrouped
Definition: TRootBrowserLite.cxx:393
TRootIconBox::SetObjHeaders
void SetObjHeaders()
Set list box headers used to display detailed object iformation.
Definition: TRootBrowserLite.cxx:852
TRootIconBox::fCurrentList
TRootIconList * fCurrentList
Definition: TRootBrowserLite.cxx:391
TRootBrowserLite::HighlightListLevel
void HighlightListLevel()
helper method to track history
Definition: TRootBrowserLite.cxx:2265
TGFileInfo::fFileNamesList
TList * fFileNamesList
list of selected file names
Definition: TGFileDialog.h:52
DefaultIcon_t::fIcon
const TGPicture * fIcon[2]
Definition: TRootBrowserLite.cxx:137
TIconBoxThumb::fSmall
const TGPicture * fSmall
Definition: TRootBrowserLite.cxx:240
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TRootBrowserCursorSwitcher::fW1
TGWindow * fW1
Definition: TRootBrowserLite.cxx:223
TGContainer::SetVsbPosition
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
Definition: TGCanvas.cxx:1761
TGMenuBar
The TGMenu.h header contains all different menu classes.
Definition: TGMenu.h:282
TRootBrowserLite::fDrawOption
TGComboBox * fDrawOption
drawing option entry
Definition: TRootBrowserLite.h:61
kFileNewCanvas
@ kFileNewCanvas
Definition: TRootBrowserLite.cxx:83
TGButton
A button abstract base class.
Definition: TGButton.h:68
TGCompositeFrame::GetDefaultWidth
virtual UInt_t GetDefaultWidth() const
Definition: TGFrame.h:312
TRootBrowserLite::AddCheckBox
void AddCheckBox(TObject *obj, Bool_t check=kFALSE) override
Add a checkbox in the TGListTreeItem corresponding to obj and a checkmark on TGLVEntry if check = kTR...
Definition: TRootBrowserLite.cxx:1320
TRootBrowserHistoryCursor::Print
void Print(Option_t *) const
This method must be overridden when a class wants to print itself.
Definition: TRootBrowserLite.cxx:187
TKey.h
TGVSplitter
Definition: TGSplitter.h:53
kViewLargeIcons
@ kViewLargeIcons
Definition: TRootBrowserLite.cxx:94
kHistoryBack
@ kHistoryBack
Definition: TRootBrowserLite.cxx:113
Class
void Class()
Definition: Class.C:29
TString::ToLower
void ToLower()
Change string to lower-case.
Definition: TString.cxx:1150
TGuiBuilder.h
kReadPermission
@ kReadPermission
Definition: TSystem.h:47
TRootIconBox::FindItem
void * FindItem(const TString &name, Bool_t direction=kTRUE, Bool_t caseSensitive=kTRUE, Bool_t beginWith=kFALSE)
Find a frame which assosiated object has a name containing a "name" string.
Definition: TRootBrowserLite.cxx:781
TGTextEdit::Search
virtual Bool_t Search(const char *string, Bool_t direction=kTRUE, Bool_t caseSensitive=kFALSE)
Search for string in the specified direction.
Definition: TGTextEdit.cxx:634
TGPosition
Definition: TGDimension.h:36
TGListView.h
kLVList
@ kLVList
Definition: TGListView.h:24
TRootIconBox::fCachedPicName
TString fCachedPicName
Definition: TRootBrowserLite.cxx:394
TGCanvas
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
Definition: TGCanvas.h:192
TGContainer::RemoveAll
virtual void RemoveAll()
Remove all items from the container.
Definition: TGCanvas.cxx:641
TGListTreeItem
Definition: TGListTree.h:27
TGContainer::fTotal
Int_t fTotal
total items
Definition: TGCanvas.h:48
TRootObjItem
Definition: TRootBrowserLite.cxx:257
TGListView::SetIncrements
virtual void SetIncrements(Int_t hInc, Int_t vInc)
Set horizontal and vertical scrollbar increments.
Definition: TGListView.cxx:1396
kViewHidden
@ kViewHidden
Definition: TRootBrowserLite.cxx:99
TRootApplication.h
TCollection::GetName
virtual const char * GetName() const
Return name of this collection.
Definition: TCollection.cxx:351
TObject::ClassName
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:130
splitter
REAL splitter
Definition: triangle.c:617
TGCompositeFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1117
TGMenu.h
kCM_MENU
@ kCM_MENU
Definition: WidgetMessageTypes.h:32
TObject::IsFolder
virtual Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
Definition: TObject.cxx:475
TGListTree::RecursiveDeleteItem
Int_t RecursiveDeleteItem(TGListTreeItem *item, void *userData)
Delete item with fUserData == ptr.
Definition: TGListTree.cxx:2057
TGLVContainer::AddItem
virtual void AddItem(TGLVEntry *item)
Definition: TGListView.h:207
TGString
TGString wraps a TString and adds some graphics routines like drawing, size of string on screen depen...
Definition: TGString.h:20
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1257
TImage::DrawBox
virtual void DrawBox(Int_t, Int_t, Int_t, Int_t, const char *="#000000", UInt_t=1, Int_t=0)
Definition: TImage.h:188
TRootIconBox::fCurrentName
TGString * fCurrentName
Definition: TRootBrowserLite.cxx:397
TBufferFile
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
Definition: TBufferFile.h:47
kHelpOnMenus
@ kHelpOnMenus
Definition: TRootBrowserLite.cxx:125
TGListTree::OpenItem
void OpenItem(TGListTreeItem *item)
Open item in list tree (i.e. show child items).
Definition: TGListTree.cxx:2032
TRootBrowserLite::SetDefaults
virtual void SetDefaults(const char *iconStyle=nullptr, const char *sortBy=nullptr)
Set defaults depending on settings in the user's .rootrc.
Definition: TRootBrowserLite.cxx:2832
TRootIconBox::RemoveAll
void RemoveAll()
Remove all items from icon box.
Definition: TRootBrowserLite.cxx:878
TRootBrowserLite::fIconPic
const TGPicture * fIconPic
icon picture
Definition: TRootBrowserLite.h:69
TGFileContainer::StopRefreshTimer
void StopRefreshTimer()
stop refresh timer
Definition: TGFSContainer.cxx:890
TGCompositeFrame::ShowFrame
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1204
MK_MSG
Int_t MK_MSG(EWidgetMessageTypes msg, EWidgetMessageTypes submsg)
Definition: WidgetMessageTypes.h:108
TGListTreeItem::GetParent
TGListTreeItem * GetParent() const
Definition: TGListTree.h:58
TGPopupMenu::AddEntry
virtual void AddEntry(TGHotString *s, Int_t id, void *ud=nullptr, const TGPicture *p=nullptr, TGMenuEntry *before=nullptr)
Add a menu entry.
Definition: TGMenu.cxx:990
TGListTreeItem::Rename
void Rename(const char *new_name)
Definition: TGListTree.h:71
TGMimeTypes::GetIcon
const TGPicture * GetIcon(const char *filename, Bool_t small_icon)
Return icon belonging to mime type of filename.
Definition: TGMimeTypes.cxx:203
TSystem::pwd
const char * pwd()
Definition: TSystem.h:422
kButtonDisabled
@ kButtonDisabled
Definition: TGButton.h:56
TGToolBar::GetButton
virtual TGButton * GetButton(Int_t id) const
Finds and returns a pointer to the button with the specified identifier id.
Definition: TGToolBar.cxx:157
kFileNewBrowserLite
@ kFileNewBrowserLite
Definition: TRootBrowserLite.cxx:81
TRootIconList::GetPicture
const TGPicture * GetPicture() const
Definition: TRootBrowserLite.cxx:344
kViewDetails
@ kViewDetails
Definition: TRootBrowserLite.cxx:97
TGMainFrame::HandleKey
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
Definition: TGFrame.cxx:1582
TList
A doubly linked list.
Definition: TList.h:44
TBuffer::kWrite
@ kWrite
Definition: TBuffer.h:73
TGTextView::LoadFile
virtual Bool_t LoadFile(const char *fname, long startpos=0, long length=-1)
Load a file in the text view widget.
Definition: TGTextView.cxx:454
TGMainFrame::SetWMPosition
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1855
TQObject::Emit
void Emit(const char *signal, const T &arg)
Activate signal with single parameter.
Definition: TQObject.h:164
TImage::IsValid
virtual Bool_t IsValid() const
Definition: TImage.h:230
TApplication::GetAppRemote
TApplication * GetAppRemote() const
Definition: TApplication.h:145
TRootIconBox::fIsEmpty
Bool_t fIsEmpty
Definition: TRootBrowserLite.cxx:402
TBrowserImp::fBrowser
TBrowser * fBrowser
TBrowser associated with this implementation.
Definition: TBrowserImp.h:32
TRootHelpDialog
A TRootHelpDialog is used to display help text (or any text in a dialog window).
Definition: TRootHelpDialog.h:22
TRootBrowserLite::fMenuBarHelpLayout
TGLayoutHints * fMenuBarHelpLayout
Definition: TRootBrowserLite.h:58
gROOT
#define gROOT
Definition: TROOT.h:404
TImage::kXpm
@ kXpm
Definition: TImage.h:37
TGFileDialog
This class creates a file selection dialog.
Definition: TGFileDialog.h:65
kFDOpen
@ kFDOpen
Definition: TGFileDialog.h:21
TGuiBuilder::Instance
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
Definition: TGuiBuilder.cxx:139
int
TSystemFile.h
TGTextLBEntry::GetText
const TGString * GetText() const
Definition: TGListBox.h:79
TRootIconBox::fGarbage
TList * fGarbage
Definition: TRootBrowserLite.cxx:395
TRootObjItem::HandleDNDFinished
virtual Bool_t HandleDNDFinished()
Definition: TRootBrowserLite.cxx:279
TGFileInfo::fFilename
char * fFilename
selected file name
Definition: TGFileDialog.h:46
THashTable.h
TRootBrowserHistoryCursor::TRootBrowserHistoryCursor
TRootBrowserHistoryCursor(TGListTreeItem *item)
Definition: TRootBrowserLite.cxx:186
TGContainer::GetNextSelected
virtual const TGFrame * GetNextSelected(void **current)
Return the next selected item.
Definition: TGCanvas.cxx:681
kHelpOnCanvas
@ kHelpOnCanvas
Definition: TRootBrowserLite.cxx:124