Logo ROOT  
Reference Guide
TRootBrowser.cxx
Go to the documentation of this file.
1 // @(#)root/gui:$Id$
2 // Author: Bertrand Bellenot 26/09/2007
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 TRootBrowser
14  \ingroup guiwidgets
15 
16 This class creates a ROOT object browser, constituted by three main tabs.
17 
18 All tabs can 'swallow' frames, thanks to the new method:
19  ExecPlugin(const char *name = 0, const char *fname = 0,
20  const char *cmd = 0, Int_t pos = kRight,
21  Int_t subpos = -1)
22 allowing to select plugins (can be a macro or a command)
23 to be executed, and where to embed the frame created by
24 the plugin (tab and tab element).
25 
26 ### Examples:
27 
28 #### create a new browser:
29 ```
30 TBrowser b;
31 ```
32 
33 #### create a new TCanvas in a new top right tab element:
34 ```
35 b.ExecPlugin("Canvas", 0, "new TCanvas()");
36 ```
37 #### create a new top right tab element embedding the TGMainFrame created by the macro 'myMacro.C':
38 ```
39 b.ExecPlugin("MyPlugin", "myMacro.C");
40 ```
41 
42 #### create a new bottom tab element embedding the TGMainFrame created by the macro 'myMacro.C':
43 ```
44 b.ExecPlugin("MyPlugin", "myMacro.C", 0, TRootBrowser::kBottom);
45 ```
46 
47 this browser implementation can be selected via the env
48 `Browser.Name` in `.rootrc`, (TRootBrowser or TRootBrowserLite)
49 the default being TRootBrowserLite
50 a list of options (plugins) for the new TRootBrowser is also
51 specified via the env 'Browser.Options' in .rootrc, the default
52 being: FECI
53 
54 Here is the list of available options:
55  - F: File browser
56  - E: Text Editor
57  - H: HTML browser C: Canvas I: I/O redirection
58  - P: Proof
59  - G: GL viewer
60 
61 */
62 
63 #include "TROOT.h"
64 #include "TSystem.h"
65 #include "TApplication.h"
66 #include "TBrowser.h"
67 #include "TClass.h"
68 #include "TGClient.h"
69 #include "TGFrame.h"
70 #include "TGTab.h"
71 #include "TGMenu.h"
72 #include "TGLayout.h"
73 #include "TGSplitter.h"
74 #include "TGStatusBar.h"
75 #include "Varargs.h"
76 #include "TInterpreter.h"
77 #include "TGFileDialog.h"
78 #include "TObjString.h"
79 #include "TVirtualPad.h"
80 #include "TEnv.h"
81 #include <KeySymbols.h>
82 
83 #include "RConfigure.h"
84 
85 #include "TRootBrowser.h"
86 #include "TGFileBrowser.h"
87 #include "TGInputDialog.h"
88 #include "TRootHelpDialog.h"
89 #include "TVirtualPadEditor.h"
90 #include "HelpText.h"
91 #include "Getline.h"
92 #include "TVirtualX.h"
93 #include "strlcpy.h"
94 #include "snprintf.h"
95 
96 #ifdef WIN32
97 #include <TWin32SplashThread.h>
98 #endif
99 
100 static const char *gOpenFileTypes[] = {
101  "ROOT files", "*.root",
102  "All files", "*",
103  0, 0
104 };
105 
106 static const char *gPluginFileTypes[] = {
107  "ROOT files", "*.C",
108  "All files", "*",
109  0, 0
110 };
111 
112 
114 
115 ////////////////////////////////////////////////////////////////////////////////
116 /// Create browser with a specified width and height.
117 
119  UInt_t height, Option_t *opt, Bool_t initshow) :
120  TGMainFrame(gClient->GetDefaultRoot(), width, height), TBrowserImp(b)
121 {
123  fActBrowser = 0;
124  fIconPic = 0;
126  Resize(width, height);
127  if (initshow) {
128  InitPlugins(opt);
129  MapWindow();
130  }
131  TQObject::Connect("TCanvas", "ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
132  "TRootBrowser", this,
133  "EventInfo(Int_t, Int_t, Int_t, TObject*)");
134  gVirtualX->SetInputFocus(GetId());
135 }
136 
137 ////////////////////////////////////////////////////////////////////////////////
138 /// Create browser with a specified width and height and at position x, y.
139 
141  UInt_t width, UInt_t height, Option_t *opt,
142  Bool_t initshow) :
143  TGMainFrame(gClient->GetDefaultRoot(), width, height), TBrowserImp(b)
144 {
146  fActBrowser = 0;
147  fIconPic = 0;
149  MoveResize(x, y, width, height);
150  SetWMPosition(x, y);
151  if (initshow) {
152  InitPlugins(opt);
153  MapWindow();
154  }
155  TQObject::Connect("TCanvas", "ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
156  "TRootBrowser", this,
157  "EventInfo(Int_t, Int_t, Int_t, TObject*)");
158  gVirtualX->SetInputFocus(GetId());
159 }
160 
161 
162 ////////////////////////////////////////////////////////////////////////////////
163 
165 {
166  // Create the actual interface.
167 
168  fVf = new TGVerticalFrame(this, 100, 100);
169 
171  fLH1 = new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0);
172  fLH2 = new TGLayoutHints(kLHintsTop | kLHintsExpandX, 0, 0, 1, 1);
178 
179  // Menubar Frame
180  fTopMenuFrame = new TGHorizontalFrame(fVf, 100, 20);
181 
184  fMenuFile = new TGPopupMenu(gClient->GetDefaultRoot());
185  fMenuFile->AddEntry("&Browse...\tCtrl+B", kBrowse);
186  fMenuFile->AddEntry("&Open...\tCtrl+O", kOpenFile);
188 
190  fMenuHelp->AddEntry("&About ROOT...", kHelpAbout);
192  fMenuHelp->AddEntry("Help On Browser...", kHelpOnBrowser);
193  fMenuHelp->AddEntry("Help On Canvas...", kHelpOnCanvas);
194  fMenuHelp->AddEntry("Help On Menus...", kHelpOnMenus);
195  fMenuHelp->AddEntry("Help On Graphics Editor...", kHelpOnGraphicsEd);
196  fMenuHelp->AddEntry("Help On Objects...", kHelpOnObjects);
197  fMenuHelp->AddEntry("Help On PostScript...", kHelpOnPS);
198  fMenuHelp->AddEntry("Help On Remote Session...", kHelpOnRemote);
199  fMenuFile->AddPopup("Browser Help...", fMenuHelp);
200 
202  fMenuFile->AddEntry("&Clone\tCtrl+N", kClone);
204  fMenuFile->AddEntry("New &Editor\tCtrl+E", kNewEditor);
205  fMenuFile->AddEntry("New &Canvas\tCtrl+C", kNewCanvas);
206  fMenuFile->AddEntry("New &HTML\tCtrl+H", kNewHtml);
210  fMenuExecPlugin->AddEntry("&Command...", kExecPluginCmd);
211  fMenuFile->AddPopup("Execute &Plugin...", fMenuExecPlugin);
213  fMenuFile->AddEntry("Close &Tab\tCtrl+T", kCloseTab);
214  fMenuFile->AddEntry("Close &Window\tCtrl+W", kCloseWindow);
216  fMenuFile->AddEntry("&Quit Root\tCtrl+Q", kQuitRoot);
217  fMenuBar->AddPopup("&Browser", fMenuFile, fLH1);
218  fMenuFile->Connect("Activated(Int_t)", "TRootBrowser", this,
219  "HandleMenu(Int_t)");
222 
223  if (!TClass::GetClass("TGHtmlBrowser"))
225 
228 
231 
232  // Toolbar Frame
234  kRaisedFrame);
236 
237  fHf = new TGHorizontalFrame(fVf, 100, 100);
238  // Tabs & co...
239 #if defined(R__HAS_COCOA)
240  fV1 = new TGVerticalFrame(fHf, 252, 100, kFixedWidth);
241 #else
242  fV1 = new TGVerticalFrame(fHf, 250, 100, kFixedWidth);
243 #endif
244  fV2 = new TGVerticalFrame(fHf, 600, 100);
245  fH1 = new TGHorizontalFrame(fV2, 100, 100);
246  fH2 = new TGHorizontalFrame(fV2, 100, 100, kFixedHeight);
247 
248  // Left tab
249  fTabLeft = new TGTab(fV1,100,100);
250  //fTabLeft->AddTab("Tab 1");
253 
254  // Vertical splitter
255  fVSplitter = new TGVSplitter(fHf, 4, 4);
257  fHf->AddFrame(fV1, fLH7);
259 
260  // Right tab
261  fTabRight = new TGTab(fH1, 500, 100);
262  //fTabRight->AddTab("Tab 1");
265  fTabRight->Connect("Selected(Int_t)", "TRootBrowser", this, "DoTab(Int_t)");
266  fTabRight->Connect("CloseTab(Int_t)", "TRootBrowser", this, "CloseTab(Int_t)");
267  fV2->AddFrame(fH1, fLH4);
268 
269  // Horizontal splitter
270  fHSplitter = new TGHSplitter(fV2, 4, 4);
272 
273  // Bottom tab
274  fTabBottom = new TGTab(fH2, 100, 100);
275  //fTabBottom->AddTab("Tab 1");
277  fV2->AddFrame(fH2, fLH3);
278 
280  fHf->AddFrame(fV2, fLH5);
281  fVf->AddFrame(fHf, fLH5);
282  AddFrame(fVf, fLH5);
283 
284  // status bar
285  fStatusBar = new TGStatusBar(this, 400, 20);
286  int parts[] = { 33, 10, 10, 47 };
287  fStatusBar->SetParts(parts, 4);
289 
290  fNbInitPlugins = 0;
291  fEditFrame = 0;
292  fEditTab = 0;
293  fEditPos = -1;
294  fEditSubPos= -1;
295  fNbTab[0] = fNbTab[1] = fNbTab[2] = 0;
296  fCrTab[0] = fCrTab[1] = fCrTab[2] = -1;
297 
298  // Set a name to the main frame
300  SetIconName(name);
301  fIconPic = SetIconPixmap("rootdb_s.xpm");
302  SetClassHints("ROOT", "Browser");
303 
304  if (!strcmp(gROOT->GetDefCanvasName(), "c1"))
305  gROOT->SetDefCanvasName("Canvas_1");
306 
307  SetWMSizeHints(600, 350, 10000, 10000, 2, 2);
308  MapSubwindows();
311 
313 }
314 
315 ////////////////////////////////////////////////////////////////////////////////
316 /// Clean up all widgets, frames and layouthints that were used
317 
319 {
320  if (fIconPic) gClient->FreePicture(fIconPic);
321  delete fLH0;
322  delete fLH1;
323  delete fLH2;
324  delete fLH3;
325  delete fLH4;
326  delete fLH5;
327  delete fLH6;
328  delete fLH7;
329  delete fMenuHelp;
330  delete fMenuExecPlugin;
331  delete fMenuFile;
332  delete fMenuBar;
333  delete fMenuFrame;
334  delete fPreMenuFrame;
335  delete fTopMenuFrame;
336  delete fToolbarFrame;
337  delete fVSplitter;
338  delete fHSplitter;
339  delete fTabLeft;
340  delete fTabRight;
341  delete fTabBottom;
342  delete fH1;
343  delete fH2;
344  delete fV1;
345  delete fV2;
346  delete fHf;
347  delete fStatusBar;
348  delete fVf;
349 }
350 
351 ////////////////////////////////////////////////////////////////////////////////
352 /// Add items to the actual browser. This function has to be called
353 /// by the Browse() member function of objects when they are
354 /// called by a browser. If check < 0 (default) no check box is drawn,
355 /// if 0 then unchecked checkbox is added, if 1 checked checkbox is added.
356 
357 void TRootBrowser::Add(TObject *obj, const char *name, Int_t check)
358 {
359  if (obj->InheritsFrom("TObjectSpy"))
360  return;
361  if (fActBrowser)
362  fActBrowser->Add(obj, name, check);
363 }
364 
365 ////////////////////////////////////////////////////////////////////////////////
366 /// Browse object. This, in turn, will trigger the calling of
367 /// TRootBrowser::Add() which will fill the IconBox and the tree.
368 /// Emits signal "BrowseObj(TObject*)".
369 
371 {
372  if (fActBrowser)
373  fActBrowser->BrowseObj(obj);
374  Emit("BrowseObj(TObject*)", (Long_t)obj);
375 }
376 
377 ////////////////////////////////////////////////////////////////////////////////
378 /// Clone the browser. A new Browser will be created, with the same
379 /// plugins executed in the current one.
380 
382 {
383  Int_t loop = 1;
384  TBrowserPlugin *plugin = 0;
385  TBrowser *b = new TBrowser();
386  TIter next(&fPlugins);
387  while ((plugin = (TBrowserPlugin *)next())) {
388  if (loop > fNbInitPlugins)
389  b->ExecPlugin(plugin->GetName(), "", plugin->fCommand.Data(), plugin->fTab,
390  plugin->fSubTab);
391  ++loop;
392  }
393 }
394 
395 ////////////////////////////////////////////////////////////////////////////////
396 /// Remove tab element id from right tab.
397 
399 {
400  RemoveTab(kRight, id);
401 }
402 
403 ////////////////////////////////////////////////////////////////////////////////
404 /// Properly close the mainframes embedded in the different tabs
405 
407 {
408  TGFrameElement *el;
409  TGCompositeFrame *container;
410  Int_t i;
411  TQObject::Disconnect("TCanvas", "ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
412  this, "EventInfo(Int_t, Int_t, Int_t, TObject*)");
413  Disconnect(fMenuFile, "Activated(Int_t)", this, "HandleMenu(Int_t)");
414  Disconnect(fTabRight, "Selected(Int_t)", this, "DoTab(Int_t)");
415  if (fPlugins.IsEmpty()) return;
416  fActBrowser = 0;
417  for (i=0;i<fTabLeft->GetNumberOfTabs();i++) {
418  container = fTabLeft->GetTabContainer(i);
419  if (!container) continue;
420  el = (TGFrameElement *)container->GetList()->First();
421  if (el && el->fFrame) {
422  el->fFrame->SetFrameElement(0);
423  if (el->fFrame->InheritsFrom("TVirtualPadEditor")) {
425  }
426  else if (el->fFrame->InheritsFrom("TGMainFrame")) {
427  el->fFrame->UnmapWindow();
428  ((TGMainFrame *)el->fFrame)->CloseWindow();
430  }
431  else
432  delete el->fFrame;
433  el->fFrame = 0;
434  if (el->fLayout && (el->fLayout != fgDefaultHints) &&
435  (el->fLayout->References() > 0)) {
436  el->fLayout->RemoveReference();
437  if (!el->fLayout->References()) {
438  delete el->fLayout;
439  }
440  }
441  container->GetList()->Remove(el);
442  delete el;
443  }
444  }
445  for (i=0;i<fTabRight->GetNumberOfTabs();i++) {
446  container = fTabRight->GetTabContainer(i);
447  if (!container) continue;
448  el = (TGFrameElement *)container->GetList()->First();
449  if (el && el->fFrame) {
450  el->fFrame->SetFrameElement(0);
451  if (el->fFrame->InheritsFrom("TGMainFrame")) {
452  el->fFrame->UnmapWindow();
453  Bool_t sleep = (el->fFrame->InheritsFrom("TRootCanvas")) ? kTRUE : kFALSE;
454  if (sleep)
455  gSystem->Sleep(150);
456  ((TGMainFrame *)el->fFrame)->CloseWindow();
457  if (sleep)
458  gSystem->Sleep(150);
460  }
461  else
462  delete el->fFrame;
463  el->fFrame = 0;
464  if (el->fLayout && (el->fLayout != fgDefaultHints) &&
465  (el->fLayout->References() > 0)) {
466  el->fLayout->RemoveReference();
467  if (!el->fLayout->References()) {
468  delete el->fLayout;
469  }
470  }
471  container->GetList()->Remove(el);
472  delete el;
473  }
474  }
475  for (i=0;i<fTabBottom->GetNumberOfTabs();i++) {
476  container = fTabBottom->GetTabContainer(i);
477  if (!container) continue;
478  el = (TGFrameElement *)container->GetList()->First();
479  if (el && el->fFrame) {
480  el->fFrame->SetFrameElement(0);
481  if (el->fFrame->InheritsFrom("TGMainFrame")) {
482  el->fFrame->UnmapWindow();
483  ((TGMainFrame *)el->fFrame)->CloseWindow();
484  gSystem->Sleep(150);
486  }
487  else
488  delete el->fFrame;
489  el->fFrame = 0;
490  if (el->fLayout && (el->fLayout != fgDefaultHints) &&
491  (el->fLayout->References() > 0)) {
492  el->fLayout->RemoveReference();
493  if (!el->fLayout->References()) {
494  delete el->fLayout;
495  }
496  }
497  container->GetList()->Remove(el);
498  delete el;
499  }
500  }
501  fPlugins.Delete();
502  Emit("CloseWindow()");
503 }
504 
505 ////////////////////////////////////////////////////////////////////////////////
506 /// Called when window is closed via the window manager.
507 
509 {
510  TQObject::Disconnect("TCanvas", "ProcessedEvent(Int_t,Int_t,Int_t,TObject*)",
511  this, "EventInfo(Int_t, Int_t, Int_t, TObject*)");
512  CloseTabs();
513  DeleteWindow();
514 }
515 
516 ////////////////////////////////////////////////////////////////////////////////
517 /// Handle Tab navigation.
518 
520 {
521  TGTab *sender = (TGTab *)gTQSender;
522  if ((sender) && (sender == fTabRight)) {
523  SwitchMenus(sender->GetTabContainer(id));
524  }
525 }
526 
527 ////////////////////////////////////////////////////////////////////////////////
528 /// Display a tooltip with infos about the primitive below the cursor.
529 
531 {
532  const Int_t kTMAX=256;
533  static char atext[kTMAX];
534  if (selected == 0 || event == kMouseLeave) {
535  SetStatusText("", 0);
536  SetStatusText("", 1);
537  SetStatusText("", 2);
538  SetStatusText("", 3);
539  return;
540  }
541  SetStatusText(selected->GetTitle(), 0);
542  SetStatusText(selected->GetName(), 1);
543  if (event == kKeyPress)
544  snprintf(atext, kTMAX, "%c", (char) px);
545  else
546  snprintf(atext, kTMAX, "%d,%d", px, py);
547  SetStatusText(atext, 2);
548  SetStatusText(selected->GetObjectInfo(px,py), 3);
549 }
550 
551 ////////////////////////////////////////////////////////////////////////////////
552 /// Execute a macro and embed the created frame in the tab "pos"
553 /// and tab element "subpos".
554 
555 Long_t TRootBrowser::ExecPlugin(const char *name, const char *fname,
556  const char *cmd, Int_t pos, Int_t subpos)
557 {
558  Long_t retval = 0;
559  TBrowserPlugin *p;
560  TString command, pname;
561  if (cmd && strlen(cmd)) {
562  command = cmd;
563  if (name) pname = name;
564  else pname = TString::Format("Plugin %d", fPlugins.GetSize());
565  p = new TBrowserPlugin(pname.Data(), command.Data(), pos, subpos);
566  }
567  else if (fname && strlen(fname)) {
568  pname = name ? name : gSystem->BaseName(fname);
569  Ssiz_t t = pname.Last('.');
570  if (t > 0) pname.Remove(t);
571  command.Form("gROOT->Macro(\"%s\");", gSystem->UnixPathName(fname));
572  p = new TBrowserPlugin(pname.Data(), command.Data(), pos, subpos);
573  }
574  else return 0;
575  if (IsWebGUI() && command.Contains("new TCanvas"))
576  return gROOT->ProcessLine(command.Data());
577  StartEmbedding(pos, subpos);
578  fPlugins.Add(p);
579  retval = gROOT->ProcessLine(command.Data());
580  if (command.Contains("new TCanvas")) {
581  pname = gPad->GetName();
582  p->SetName(pname.Data());
583  }
584  SetTabTitle(pname.Data(), pos, subpos);
585  StopEmbedding();
586  return retval;
587 }
588 
589 ////////////////////////////////////////////////////////////////////////////////
590 /// Returns drawing option.
591 
593 {
594  if (fActBrowser)
595  return fActBrowser->GetDrawOption();
596  return 0;
597 }
598 
599 ////////////////////////////////////////////////////////////////////////////////
600 /// Returns the TGTab at position pos.
601 
603 {
604  switch (pos) {
605  case kLeft: return fTabLeft;
606  case kRight: return fTabRight;
607  case kBottom: return fTabBottom;
608  default: return 0;
609  }
610 }
611 
612 ////////////////////////////////////////////////////////////////////////////////
613 /// Handle keyboard events.
614 
616 {
617  char input[10];
618  UInt_t keysym;
619 
620  if (event->fType == kGKeyPress) {
621  gVirtualX->LookupString(event, input, sizeof(input), keysym);
622 
623  if (!event->fState && (EKeySym)keysym == kKey_F5) {
624  Refresh(kTRUE);
625  return kTRUE;
626  }
627  switch ((EKeySym)keysym) { // ignore these keys
628  case kKey_Shift:
629  case kKey_Control:
630  case kKey_Meta:
631  case kKey_Alt:
632  case kKey_CapsLock:
633  case kKey_NumLock:
634  case kKey_ScrollLock:
635  return kTRUE;
636  default:
637  break;
638  }
639  if (event->fState & kKeyControlMask) { // Cntrl key modifier pressed
640  switch ((EKeySym)keysym & ~0x20) { // treat upper and lower the same
641  case kKey_B:
643  return kTRUE;
644  case kKey_O:
646  return kTRUE;
647  case kKey_E:
649  return kTRUE;
650  case kKey_C:
652  return kTRUE;
653  case kKey_H:
655  return kTRUE;
656  case kKey_N:
658  return kTRUE;
659  case kKey_T:
661  return kTRUE;
662  case kKey_W:
664  return kTRUE;
665  case kKey_Q:
667  return kTRUE;
668  default:
669  break;
670  }
671  }
672  }
674 }
675 
676 ////////////////////////////////////////////////////////////////////////////////
677 /// Handle menu entries events.
678 
680 {
681  TRootHelpDialog *hd;
682  TString cmd;
683  static Int_t eNr = 1;
684  TGPopupMenu *sender = (TGPopupMenu *)gTQSender;
685  if (sender != fMenuFile)
686  return;
687  switch (id) {
688  case kBrowse:
689  new TBrowser();
690  break;
691  case kOpenFile:
692  {
693  Bool_t newfile = kFALSE;
694  static TString dir(".");
695  TGFileInfo fi;
697  fi.SetIniDir(dir);
698  new TGFileDialog(gClient->GetDefaultRoot(), this,
699  kFDOpen,&fi);
700  dir = fi.fIniDir;
701  if (fi.fMultipleSelection && fi.fFileNamesList) {
702  TObjString *el;
703  TIter next(fi.fFileNamesList);
704  while ((el = (TObjString *) next())) {
705  gROOT->ProcessLine(Form("new TFile(\"%s\");",
706  gSystem->UnixPathName(el->GetString())));
707  }
708  newfile = kTRUE;
709  }
710  else if (fi.fFilename) {
711  gROOT->ProcessLine(Form("new TFile(\"%s\");",
713  newfile = kTRUE;
714  }
715  if (fActBrowser && newfile) {
716  TGFileBrowser *fb = dynamic_cast<TGFileBrowser *>(fActBrowser);
717  if (fb) fb->Selected(0);
718  }
719  }
720  break;
721  // Handle Help menu items...
722  case kHelpAbout:
723  {
724 #ifdef R__UNIX
725  TString rootx = TROOT::GetBinDir() + "/root -a &";
726  gSystem->Exec(rootx);
727 #else
728 #ifdef WIN32
730 #else
731  char str[32];
732  sprintf(str, "About ROOT %s...", gROOT->GetVersion());
733  hd = new TRootHelpDialog(this, str, 600, 400);
734  hd->SetText(gHelpAbout);
735  hd->Popup();
736 #endif
737 #endif
738  }
739  break;
740  case kHelpOnCanvas:
741  hd = new TRootHelpDialog(this, "Help on Canvas...", 600, 400);
742  hd->SetText(gHelpCanvas);
743  hd->Popup();
744  break;
745  case kHelpOnMenus:
746  hd = new TRootHelpDialog(this, "Help on Menus...", 600, 400);
748  hd->Popup();
749  break;
750  case kHelpOnGraphicsEd:
751  hd = new TRootHelpDialog(this, "Help on Graphics Editor...", 600, 400);
753  hd->Popup();
754  break;
755  case kHelpOnBrowser:
756  hd = new TRootHelpDialog(this, "Help on Browser...", 600, 400);
757  hd->SetText(gHelpBrowser);
758  hd->Popup();
759  break;
760  case kHelpOnObjects:
761  hd = new TRootHelpDialog(this, "Help on Objects...", 600, 400);
762  hd->SetText(gHelpObjects);
763  hd->Popup();
764  break;
765  case kHelpOnPS:
766  hd = new TRootHelpDialog(this, "Help on PostScript...", 600, 400);
768  hd->Popup();
769  break;
770  case kHelpOnRemote:
771  hd = new TRootHelpDialog(this, "Help on Browser...", 600, 400);
772  hd->SetText(gHelpRemote);
773  hd->Popup();
774  break;
775  case kClone:
776  CloneBrowser();
777  break;
778  case kNewEditor:
779  cmd.Form("new TGTextEditor((const char *)0, gClient->GetRoot())");
780  ++eNr;
781  ExecPlugin(Form("Editor %d", eNr), "", cmd.Data(), 1);
782  break;
783  case kNewCanvas:
784  if (IsWebGUI())
785  gROOT->ProcessLine("new TCanvas()");
786  else
787  ExecPlugin("", "", "new TCanvas()", 1);
788  break;
789  case kNewHtml:
790  cmd.Form("new TGHtmlBrowser(\"%s\", gClient->GetRoot())",
791  gEnv->GetValue("Browser.StartUrl", "http://root.cern.ch"));
792  ExecPlugin("HTML", "", cmd.Data(), 1);
793  break;
794  case kExecPluginMacro:
795  {
796  static TString dir(".");
797  TGFileInfo fi;
799  fi.SetIniDir(dir);
800  new TGFileDialog(gClient->GetDefaultRoot(), this,
801  kFDOpen,&fi);
802  dir = fi.fIniDir;
803  if (fi.fFilename) {
804  ExecPlugin(0, fi.fFilename, 0, kRight);
805  }
806  }
807  break;
808  case kExecPluginCmd:
809  {
810  char command[1024];
811  strlcpy(command, "new TGLSAViewer(gClient->GetRoot(), 0);",
812  sizeof(command));
813  new TGInputDialog(gClient->GetRoot(), this,
814  "Enter plugin command line:",
815  command, command);
816  if (strcmp(command, "")) {
817  ExecPlugin("User", 0, command, kRight);
818  }
819  }
820  break;
821  case kCloseTab:
823  break;
824  case kCloseWindow:
825  CloseWindow();
826  break;
827  case kQuitRoot:
828  CloseWindow();
830  break;
831  default:
832  break;
833  }
834 }
835 
836 ////////////////////////////////////////////////////////////////////////////////
837 /// Initialize default plugins. Could be also of the form:
838 /// StartEmbedding(0);
839 /// TPluginHandler *ph;
840 /// ph = gROOT->GetPluginManager()->FindHandler("TGClassBrowser");
841 /// if (ph && ph->LoadPlugin() != -1) {
842 /// ph->ExecPlugin(3, gClient->GetRoot(), 200, 500);
843 /// }
844 /// StopEmbedding();
845 
847 {
848  TString cmd;
849 
850  if ((opt == 0) || (!opt[0]))
851  return;
852  // --- Left vertical area
853 
854  // File Browser plugin
855  if (strchr(opt, 'F')) {
856  cmd.Form("new TGFileBrowser(gClient->GetRoot(), (TBrowser *)0x%lx, 200, 500);", (ULong_t)fBrowser);
857  ExecPlugin("Files", 0, cmd.Data(), 0);
858  ++fNbInitPlugins;
859  }
860 
861  // --- Right main area
862 
863  Int_t i, len = strlen(opt);
864  for (i=0; i<len; ++i) {
865  // Editor plugin...
866  if (opt[i] == 'E') {
867  cmd.Form("new TGTextEditor((const char *)0, gClient->GetRoot());");
868  ExecPlugin("Editor 1", 0, cmd.Data(), 1);
869  ++fNbInitPlugins;
870  }
871 
872  // HTML plugin...
873  if (opt[i] == 'H') {
874  if (gSystem->Load("libGuiHtml") >= 0) {
875  cmd.Form("new TGHtmlBrowser(\"%s\", gClient->GetRoot());",
876  gEnv->GetValue("Browser.StartUrl",
877  "http://root.cern.ch/root/html/ClassIndex.html"));
878  ExecPlugin("HTML", 0, cmd.Data(), 1);
879  ++fNbInitPlugins;
880  }
881  }
882 
883  // Canvas plugin...
884  if ((opt[i] == 'C') && !IsWebGUI()) {
885  cmd.Form("new TCanvas();");
886  ExecPlugin("c1", 0, cmd.Data(), 1);
887  ++fNbInitPlugins;
888  }
889 
890  // GLViewer plugin...
891  if (opt[i] == 'G') {
892  cmd.Form("new TGLSAViewer(gClient->GetRoot(), 0);");
893  ExecPlugin("OpenGL", 0, cmd.Data(), 1);
894  ++fNbInitPlugins;
895  }
896 
897  // PROOF plugin...
898  if (opt[i] == 'P') {
899  cmd.Form("new TSessionViewer();");
900  ExecPlugin("PROOF", 0, cmd.Data(), 1);
901  ++fNbInitPlugins;
902  }
903  }
904  // --- Right bottom area
905 
906  // Command plugin...
907  if (strchr(opt, 'I')) {
908  cmd.Form("new TGCommandPlugin(gClient->GetRoot(), 700, 300);");
909  ExecPlugin("Command", 0, cmd.Data(), 2);
910  ++fNbInitPlugins;
911  }
912 
913  // --- Select first tab everywhere
914  SetTab(0, 0);
915  SetTab(1, 0);
916  SetTab(2, 0);
917 }
918 
919 ////////////////////////////////////////////////////////////////////////////////
920 /// Check if the GUI factory is set to use the Web GUI.
921 
923 {
924  TString factory = gEnv->GetValue("Gui.Factory", "native");
925  return (factory.Contains("web", TString::kIgnoreCase));
926 }
927 
928 ////////////////////////////////////////////////////////////////////////////////
929 /// Really delete the browser and the this GUI.
930 
932 {
934  delete this;
935 }
936 
937 ////////////////////////////////////////////////////////////////////////////////
938 /// Recursively remove object from browser.
939 
941 {
942  if (fActBrowser)
944 }
945 
946 ////////////////////////////////////////////////////////////////////////////////
947 /// Recursively reparent TGPopupMenu to gClient->GetDefaultRoot().
948 
950 {
951  TGMenuEntry *entry = 0;
952  TIter next(popup->GetListOfEntries());
953  while ((entry = (TGMenuEntry *)next())) {
954  if (entry->GetPopup()) {
955  RecursiveReparent(entry->GetPopup());
956  }
957  }
958  popup->ReparentWindow(gClient->GetDefaultRoot());
959 }
960 
961 ////////////////////////////////////////////////////////////////////////////////
962 /// Refresh the actual browser contents.
963 
965 {
966  if (fActBrowser)
967  fActBrowser->Refresh(force);
968 }
969 
970 ////////////////////////////////////////////////////////////////////////////////
971 /// Remove tab element "subpos" from tab "pos".
972 
974 {
975  TGTab *edit = 0;
976  switch (pos) {
977  case kLeft: // left
978  edit = fTabLeft;
979  break;
980  case kRight: // right
981  edit = fTabRight;
984  fActMenuBar = 0;
985  break;
986  case kBottom: // bottom
987  edit = fTabBottom;
988  break;
989  }
990  if (!edit || !edit->GetTabTab(subpos))
991  return;
992  const char *tabName = edit->GetTabTab(subpos)->GetString();
993  TObject *obj = 0;
994  if ((obj = fPlugins.FindObject(tabName))) {
995  fPlugins.Remove(obj);
996  }
997  TGFrameElement *el = 0;
998  if (edit->GetTabContainer(subpos))
999  el = (TGFrameElement *)edit->GetTabContainer(subpos)->GetList()->First();
1000  if (el && el->fFrame) {
1001  el->fFrame->Disconnect("ProcessedConfigure(Event_t*)");
1002  el->fFrame->SetFrameElement(0);
1003  if (el->fFrame->InheritsFrom("TGMainFrame")) {
1004  Bool_t sleep = (el->fFrame->InheritsFrom("TRootCanvas")) ? kTRUE : kFALSE;
1005  ((TGMainFrame *)el->fFrame)->CloseWindow();
1006  if (sleep)
1007  gSystem->Sleep(150);
1009  }
1010  else
1011  delete el->fFrame;
1012  el->fFrame = 0;
1013  if (el->fLayout && (el->fLayout != fgDefaultHints) &&
1014  (el->fLayout->References() > 0)) {
1015  el->fLayout->RemoveReference();
1016  if (!el->fLayout->References()) {
1017  delete el->fLayout;
1018  }
1019  }
1020  edit->GetTabContainer(subpos)->GetList()->Remove(el);
1021  delete el;
1022  }
1023  fNbTab[pos]--;
1024  edit->RemoveTab(subpos);
1025  SwitchMenus(edit->GetTabContainer(edit->GetCurrent()));
1026 }
1027 
1028 ////////////////////////////////////////////////////////////////////////////////
1029 /// Switch to Tab "subpos" in TGTab "pos".
1030 
1032 {
1033  TGTab *tab = GetTab(pos);
1034  if (subpos == -1)
1035  subpos = fCrTab[pos];
1036 
1037  if (tab && tab->SetTab(subpos, kFALSE)) { // Block signal emit
1038  if (pos == kRight)
1039  SwitchMenus(tab->GetTabContainer(subpos));
1040  tab->Layout();
1041  }
1042 }
1043 
1044 ////////////////////////////////////////////////////////////////////////////////
1045 /// Set text "title" of Tab "subpos" in TGTab "pos".
1046 
1047 void TRootBrowser::SetTabTitle(const char *title, Int_t pos, Int_t subpos)
1048 {
1049  TBrowserPlugin *p = 0;
1050  TGTab *edit = GetTab(pos);
1051  if (!edit) return;
1052  if (subpos == -1)
1053  subpos = fCrTab[pos];
1054 
1055  TGTabElement *el = edit->GetTabTab(subpos);
1056  if (el) {
1057  el->SetText(new TGString(title));
1058  edit->Layout();
1059  if ((p = (TBrowserPlugin *)fPlugins.FindObject(title)))
1060  p->SetName(title);
1061  }
1062 }
1063 
1064 ////////////////////////////////////////////////////////////////////////////////
1065 /// Set text in column col in status bar.
1066 
1067 void TRootBrowser::SetStatusText(const char* txt, Int_t col)
1068 {
1069  fStatusBar->SetText(txt, col);
1070 }
1071 
1072 ////////////////////////////////////////////////////////////////////////////////
1073 /// Show the selected frame's menu and hide previous one.
1074 
1076 {
1077  TGFrameElement *el = 0;
1078  // temporary solution until I find a proper way to handle
1079  // these bloody menus...
1080  fBindList->Delete();
1081  TIter nextm(fMenuBar->GetList());
1082  while ((el = (TGFrameElement *) nextm())) {
1083  TGMenuTitle *t = (TGMenuTitle *) el->fFrame;
1084  Int_t code = t->GetHotKeyCode();
1085  BindKey(fMenuBar, code, kKeyMod1Mask);
1093  }
1095  fMenuFrame->ShowFrame(menu);
1096  menu->Layout();
1097  fMenuFrame->Layout();
1098  fActMenuBar = menu;
1099 }
1100 
1101 ////////////////////////////////////////////////////////////////////////////////
1102 /// Start embedding external frame in the tab "pos" and tab element "subpos".
1103 
1105 {
1106  fEditTab = GetTab(pos);
1107  if (!fEditTab) return;
1108  fEditPos = pos;
1109  fEditSubPos = subpos;
1110 
1111  if (fEditFrame == 0) {
1112  if (subpos == -1) {
1113  fCrTab[pos] = fNbTab[pos]++;
1114  fEditFrame = fEditTab->AddTab(Form("Tab %d",fNbTab[pos]));
1116  fEditFrame->MapWindow();
1118  if(tabel) {
1119  tabel->MapWindow();
1120  if (fShowCloseTab && (pos == 1))
1121  tabel->ShowClose();
1122  }
1124  fEditTab->Layout();
1125  }
1126  else {
1127  fCrTab[pos] = subpos;
1128  fEditFrame = fEditTab->GetTabContainer(subpos);
1129  fEditTab->SetTab(subpos);
1130  }
1132  }
1133 }
1134 
1135 ////////////////////////////////////////////////////////////////////////////////
1136 /// Stop embedding external frame in the current editable frame.
1137 
1139 {
1140  if (fEditFrame != 0) {
1143  if (el && el->fFrame) {
1144  // let be notified when the inside frame gets resized, and tell its
1145  // container to recompute its layout
1146  el->fFrame->Connect("ProcessedConfigure(Event_t*)", "TGCompositeFrame",
1147  fEditFrame, "Layout()");
1148  }
1149  if (layout) {
1150  el = (TGFrameElement*) fEditFrame->GetList()->Last();
1151  // !!!! MT what to do with the old layout? Leak it for now ...
1152  if (el) el->fLayout = layout;
1153  }
1154  fEditFrame->Layout();
1155  if (fEditTab == fTabRight)
1157  }
1158  if (name && strlen(name)) {
1160  }
1162  fEditFrame = fEditTab = 0;
1163  fEditPos = fEditSubPos = -1;
1164 }
1165 
1166 ////////////////////////////////////////////////////////////////////////////////
1167 /// Move the menu from original frame to our TGMenuFrame, or display the
1168 /// menu associated to the current tab.
1169 
1171 {
1172  if (from == 0)
1173  return;
1174  TGFrameElement *fe = (TGFrameElement *)from->GetList()->First();
1175  if (!fe) {
1176  if (fActMenuBar != fMenuBar)
1177  ShowMenu(fMenuBar);
1178  return;
1179  }
1180  TGCompositeFrame *embed = (TGCompositeFrame *)fe->fFrame;
1181  TGFrameElement *el = 0;
1182  if (embed && embed->GetList()) {
1183  TIter next(embed->GetList());
1184  while ((el = (TGFrameElement *)next())) {
1185  if (el->fFrame->InheritsFrom("TGMenuBar")) {
1186  TGMenuBar *menu = (TGMenuBar *)el->fFrame;
1187  if (fActMenuBar == menu)
1188  return;
1189  TGFrameElement *nw;
1190  TIter nel(fMenuFrame->GetList());
1191  while ((nw = (TGFrameElement *) nel())) {
1192  if (nw->fFrame == menu) {
1193  ShowMenu(menu);
1194  return;
1195  }
1196  }
1197  ((TGCompositeFrame *)menu->GetParent())->HideFrame(menu);
1199  menu->ReparentWindow(fMenuFrame);
1200  fMenuFrame->AddFrame(menu, fLH2);
1201  TGFrameElement *mel;
1202  TIter mnext(menu->GetList());
1203  while ((mel = (TGFrameElement *) mnext())) {
1204  TGMenuTitle *t = (TGMenuTitle *) mel->fFrame;
1205  TGPopupMenu *popup = menu->GetPopup(t->GetName());
1206  if (popup) {
1207  RecursiveReparent(popup);
1208  if (popup->GetEntry("Close Canvas")) {
1209  TGMenuEntry *exit = popup->GetEntry("Close Canvas");
1210  popup->HideEntry(exit->GetEntryId());
1211  }
1212  if (popup->GetEntry("Close Viewer")) {
1213  TGMenuEntry *exit = popup->GetEntry("Close Viewer");
1214  popup->HideEntry(exit->GetEntryId());
1215  }
1216  if (popup->GetEntry("Quit ROOT")) {
1217  TGMenuEntry *exit = popup->GetEntry("Quit ROOT");
1218  popup->HideEntry(exit->GetEntryId());
1219  }
1220  if (popup->GetEntry("Exit")) {
1221  TGMenuEntry *exit = popup->GetEntry("Exit");
1222  popup->HideEntry(exit->GetEntryId());
1223  }
1224  }
1225  }
1226  ShowMenu(menu);
1227  return;
1228  }
1229  }
1230  }
1231  if (fActMenuBar != fMenuBar)
1232  ShowMenu(fMenuBar);
1233 }
1234 
1235 ////////////////////////////////////////////////////////////////////////////////
1236 /// Emits signal when double clicking on icon.
1237 
1239 {
1240  Emit("DoubleClicked(TObject*)", (Long_t)obj);
1241 }
1242 
1243 ////////////////////////////////////////////////////////////////////////////////
1244 /// Emits signal when double clicking on icon.
1245 
1247 {
1248  Long_t args[2];
1249 
1250  args[0] = (Long_t)obj;
1251  args[1] = checked;
1252 
1253  Emit("Checked(TObject*,Bool_t)", args);
1254 }
1255 
1256 ////////////////////////////////////////////////////////////////////////////////
1257 /// Emits signal "ExecuteDefaultAction(TObject*)".
1258 
1260 {
1261  Emit("ExecuteDefaultAction(TObject*)", (Long_t)obj);
1262 }
1263 
1264 
1265 ////////////////////////////////////////////////////////////////////////////////
1266 /// static constructor returning TBrowserImp,
1267 /// as needed by the plugin mechanism.
1268 
1270  UInt_t width, UInt_t height,
1271  Option_t *opt)
1272 {
1273  TRootBrowser *browser = new TRootBrowser(b, title, width, height, opt);
1274  return (TBrowserImp *)browser;
1275 }
1276 
1277 ////////////////////////////////////////////////////////////////////////////////
1278 /// static constructor returning TBrowserImp,
1279 /// as needed by the plugin mechanism.
1280 
1282  Int_t y, UInt_t width, UInt_t height,
1283  Option_t *opt)
1284 {
1285  TRootBrowser *browser = new TRootBrowser(b, title, x, y, width, height, opt);
1286  return (TBrowserImp *)browser;
1287 }
TGCompositeFrame::GetDefaultSize
virtual TGDimension GetDefaultSize() const
std::cout << fWidth << "x" << fHeight << std::endl;
Definition: TGFrame.h:316
TRootHelpDialog::Popup
void Popup()
Show help dialog.
Definition: TRootHelpDialog.cxx:69
TRootBrowser::fMenuFrame
TGHorizontalFrame * fMenuFrame
Shared menu frame.
Definition: TRootBrowser.h:79
TRootBrowser::kExecPluginMacro
@ kExecPluginMacro
Definition: TRootBrowser.h:113
kMouseLeave
@ kMouseLeave
Definition: Buttons.h:23
TGTab::GetCurrent
Int_t GetCurrent() const
Definition: TGTab.h:90
TRootBrowser::fNbInitPlugins
Int_t fNbInitPlugins
Number of initial plugins (from .rootrc)
Definition: TRootBrowser.h:90
gHelpCanvas
R__EXTERN const char gHelpCanvas[]
Definition: HelpText.h:25
TRootBrowser::GetTab
TGTab * GetTab(Int_t pos) const
Returns the TGTab at position pos.
Definition: TRootBrowser.cxx:602
TGStatusBar::SetParts
virtual void SetParts(Int_t npart)
Divide the status bar in npart equal sized parts.
Definition: TGStatusBar.cxx:293
TVirtualPadEditor::Terminate
static void Terminate()
Close the global pad editor. Static method.
Definition: TVirtualPadEditor.cxx:118
TGFileBrowser
System file browser, used as TRootBrowser plug-in.
Definition: TGFileBrowser.h:36
kKey_E
@ kKey_E
Definition: KeySymbols.h:130
TBrowserImp::BrowseObj
virtual void BrowseObj(TObject *)
Definition: TBrowserImp.h:48
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
TGFrameElement::fLayout
TGLayoutHints * fLayout
Definition: TGLayout.h:114
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
kFixedWidth
@ kFixedWidth
Definition: GuiTypes.h:387
TGCompositeFrame::GetList
virtual TList * GetList() const
Definition: TGFrame.h:310
TRootBrowser::fLH4
TGLayoutHints * fLH4
Definition: TRootBrowser.h:61
kKey_T
@ kKey_T
Definition: KeySymbols.h:145
TGMainFrame
Defines top level windows that interact with the system Window Manager.
Definition: TGFrame.h:398
snprintf
#define snprintf
Definition: civetweb.c:1540
TGInputDialog.h
TBrowser::SetBrowserImp
void SetBrowserImp(TBrowserImp *i)
Definition: TBrowser.h:95
TRootBrowser::kOpenFile
@ kOpenFile
Definition: TRootBrowser.h:100
TRootBrowser::kHelpOnRemote
@ kHelpOnRemote
Definition: TRootBrowser.h:109
TRootBrowser::TRootBrowser
TRootBrowser(const TRootBrowser &)=delete
TNamed::SetName
virtual void SetName(const char *name)
Set the name of the TNamed.
Definition: TNamed.cxx:140
Option_t
const char Option_t
Definition: RtypesCore.h:66
TRefCnt::References
UInt_t References() const
Definition: TRefCnt.h:38
TRootBrowser::kNewCanvas
@ kNewCanvas
Definition: TRootBrowser.h:111
TRootBrowser::Add
void Add(TObject *obj, const char *name=nullptr, Int_t check=-1) override
Add items to the actual browser.
Definition: TRootBrowser.cxx:357
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
TBrowserPlugin::fTab
Int_t fTab
Tab number.
Definition: TRootBrowser.h:38
TRootBrowser::CloseTab
virtual void CloseTab(Int_t id)
Remove tab element id from right tab.
Definition: TRootBrowser.cxx:398
TRootBrowser::CloseWindow
void CloseWindow() override
Called when window is closed via the window manager.
Definition: TRootBrowser.cxx:508
gEnv
R__EXTERN TEnv * gEnv
Definition: TEnv.h:170
gOpenFileTypes
static const char * gOpenFileTypes[]
Definition: TRootBrowser.cxx:100
TSystem::BaseName
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
Definition: TSystem.cxx:934
TRootBrowser::kHelpOnBrowser
@ kHelpOnBrowser
Definition: TRootBrowser.h:103
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
TList::FindObject
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition: TList.cxx:578
TGTab::GetTabContainer
TGCompositeFrame * GetTabContainer(Int_t tabIndex) const
Return container of tab with index tabIndex.
Definition: TGTab.cxx:614
TGMainFrame::SetIconPixmap
const TGPicture * SetIconPixmap(const char *iconName)
Set window icon pixmap by name.
Definition: TGFrame.cxx:1792
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
kLHintsTop
@ kLHintsTop
Definition: TGLayout.h:27
TRootBrowser::CreateBrowser
void CreateBrowser(const char *name)
Definition: TRootBrowser.cxx:164
TGLayout.h
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Form
char * Form(const char *fmt,...)
EKeySym
EKeySym
Definition: KeySymbols.h:25
kKey_ScrollLock
@ kKey_ScrollLock
Definition: KeySymbols.h:55
TObjString.h
kKey_Shift
@ kKey_Shift
Definition: KeySymbols.h:49
TRootBrowser::kHelpOnObjects
@ kHelpOnObjects
Definition: TRootBrowser.h:107
gHelpObjects
R__EXTERN const char gHelpObjects[]
Definition: HelpText.h:26
TRootBrowser.h
TGStatusBar.h
TGCompositeFrame::SetEditable
virtual void SetEditable(Bool_t on=kTRUE)
Switch ON/OFF edit mode.
Definition: TGFrame.cxx:948
kLHintsLeft
@ kLHintsLeft
Definition: TGLayout.h:24
TGPopupMenu::AddSeparator
virtual void AddSeparator(TGMenuEntry *before=nullptr)
Add a menu separator to the menu.
Definition: TGMenu.cxx:1060
kKeyLockMask
const Mask_t kKeyLockMask
Definition: GuiTypes.h:196
TString::kIgnoreCase
@ kIgnoreCase
Definition: TString.h:268
TGFileInfo::fMultipleSelection
Bool_t fMultipleSelection
if true, allow multiple file selection
Definition: TGFileDialog.h:51
TRootBrowser::kHelpAbout
@ kHelpAbout
Definition: TRootBrowser.h:102
gHelpPostscript
R__EXTERN const char gHelpPostscript[]
Definition: HelpText.h:21
TRootBrowser::fLH7
TGLayoutHints * fLH7
Layout hints, part 2.
Definition: TRootBrowser.h:61
TRootBrowser::Checked
virtual void Checked(TObject *obj, Bool_t check)
Emits signal when double clicking on icon.
Definition: TRootBrowser.cxx:1246
kKey_O
@ kKey_O
Definition: KeySymbols.h:140
kKey_W
@ kKey_W
Definition: KeySymbols.h:148
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
TGVSplitter::SetFrame
virtual void SetFrame(TGFrame *frame, Bool_t left)
Set frame to be resized.
Definition: TGSplitter.cxx:143
TRootBrowser::kHelpOnMenus
@ kHelpOnMenus
Definition: TRootBrowser.h:105
TRootBrowser::fEditPos
Int_t fEditPos
Id of tab in "Edit" mode.
Definition: TRootBrowser.h:66
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
TRootBrowser::kHelpOnCanvas
@ kHelpOnCanvas
Definition: TRootBrowser.h:104
TRootBrowser::kExecPluginCmd
@ kExecPluginCmd
Definition: TRootBrowser.h:114
kKey_B
@ kKey_B
Definition: KeySymbols.h:127
gHelpGraphicsEditor
R__EXTERN const char gHelpGraphicsEditor[]
Definition: HelpText.h:23
gTQSender
R__EXTERN void * gTQSender
Definition: TQObject.h:44
TRootBrowser::~TRootBrowser
virtual ~TRootBrowser()
Clean up all widgets, frames and layouthints that were used.
Definition: TRootBrowser.cxx:318
kKey_NumLock
@ kKey_NumLock
Definition: KeySymbols.h:54
TObjString::GetString
const TString & GetString() const
Definition: TObjString.h:46
kKeyMod2Mask
const Mask_t kKeyMod2Mask
typically mod on numeric keys
Definition: GuiTypes.h:199
TGFileInfo::SetIniDir
void SetIniDir(const char *inidir)
Set directory name.
Definition: TGFileDialog.cxx:116
TBrowser.h
HelpText.h
TWin32SplashThread.h
TGMenuEntry
This class contains all information about a menu entry.
Definition: TGMenu.h:57
TString::Contains
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:624
event
Definition: triangle.c:553
TRootBrowser::fTabRight
TGTab * fTabRight
Right Tab.
Definition: TRootBrowser.h:63
x
Double_t x[n]
Definition: legend1.C:17
TRootBrowser::CloseTabs
void CloseTabs() override
Properly close the mainframes embedded in the different tabs.
Definition: TRootBrowser.cxx:406
TRootBrowser::fMenuFile
TGPopupMenu * fMenuFile
"File" popup menu
Definition: TRootBrowser.h:82
TGMainFrame::BindKey
virtual Bool_t BindKey(const TGWindow *w, Int_t keycode, Int_t modifier) const
Bind key to a window.
Definition: TGFrame.cxx:1613
TRootBrowser::ShowMenu
void ShowMenu(TGCompositeFrame *menu)
Show the selected frame's menu and hide previous one.
Definition: TRootBrowser.cxx:1075
TRootBrowser::DoTab
void DoTab(Int_t id)
Handle Tab navigation.
Definition: TRootBrowser.cxx:519
TRootBrowser::fPreMenuFrame
TGHorizontalFrame * fPreMenuFrame
First (owned) menu frame.
Definition: TRootBrowser.h:78
TClass.h
TList::Last
virtual TObject * Last() const
Return the last object in the list. Returns 0 when list is empty.
Definition: TList.cxx:693
TGMainFrame::SetWindowName
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1764
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
kKeyMod1Mask
const Mask_t kKeyMod1Mask
typically the Alt key
Definition: GuiTypes.h:198
TVirtualX.h
TRootBrowser::fHf
TGHorizontalFrame * fHf
Horizontal frame.
Definition: TRootBrowser.h:69
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
TRootBrowser::fEditSubPos
Int_t fEditSubPos
Id of subtab in "Edit" mode.
Definition: TRootBrowser.h:67
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
TGPopupMenu::DisableEntry
virtual void DisableEntry(Int_t id)
Disable entry (disabled entries appear in a sunken relieve).
Definition: TGMenu.cxx:1724
TEnv.h
TSystem::Load
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Definition: TSystem.cxx:1854
Varargs.h
TString
Basic string class.
Definition: TString.h:136
TRootBrowser::fVSplitter
TGVSplitter * fVSplitter
Vertical splitter.
Definition: TRootBrowser.h:74
TGMenuTitle::GetName
const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGMenu.h:274
TWin32SplashThread
Definition: TWin32SplashThread.h:18
TGObject::GetId
Handle_t GetId() const
Definition: TGObject.h:37
sleep
R__EXTERN C unsigned int sleep(unsigned int seconds)
TRootBrowser::kRight
@ kRight
Definition: TRootBrowser.h:121
TGTabElement
Service classes of the tab widget.
Definition: TGTab.h:117
TBrowserPlugin::fSubTab
Int_t fSubTab
Tab element number.
Definition: TRootBrowser.h:39
TObject::InheritsFrom
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:445
TBrowserImp::RecursiveRemove
virtual void RecursiveRemove(TObject *)
Definition: TBrowserImp.h:53
b
#define b(i)
Definition: RSha256.hxx:100
TRootBrowser::kBottom
@ kBottom
Definition: TRootBrowser.h:121
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition: TGFrame.h:204
bool
TGFileDialog.h
TGFrameElement::fFrame
TGFrame * fFrame
Definition: TGLayout.h:112
TRootBrowser::kBrowse
@ kBrowse
Definition: TRootBrowser.h:99
TString::Last
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Definition: TString.cxx:916
TRootBrowser::fLH1
TGLayoutHints * fLH1
Definition: TRootBrowser.h:60
TROOT.h
TGTab::Selected
virtual void Selected(Int_t id)
Definition: TGTab.h:109
TGPopupMenu::Activated
virtual void Activated(Int_t id)
Definition: TGMenu.h:219
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
TRootBrowser::fMenuExecPlugin
TGPopupMenu * fMenuExecPlugin
"Exec Plugin" popup menu
Definition: TRootBrowser.h:83
gClient
#define gClient
Definition: TGClient.h:157
TRootBrowser::fPlugins
TList fPlugins
List of plugins.
Definition: TRootBrowser.h:88
kLHintsBottom
@ kLHintsBottom
Definition: TGLayout.h:29
TApplication.h
TRootBrowser::fLH2
TGLayoutHints * fLH2
Definition: TRootBrowser.h:60
TList::First
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:659
TObject::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:359
TBrowserPlugin
Helper class used to manage plugins (command or macro to be executed).
Definition: TRootBrowser.h:36
TRootBrowser::fCrTab
Int_t fCrTab[3]
Actual (active) tab elements (for each Tab)
Definition: TRootBrowser.h:92
TRootBrowser::SwitchMenus
void SwitchMenus(TGCompositeFrame *from)
Move the menu from original frame to our TGMenuFrame, or display the menu associated to the current t...
Definition: TRootBrowser.cxx:1170
kNoCleanup
@ kNoCleanup
Definition: TGFrame.h:40
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:339
TString::Form
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Definition: TString.cxx:2314
TRootBrowser::kClone
@ kClone
Definition: TRootBrowser.h:101
TRootBrowser::fMenuBar
TGMenuBar * fMenuBar
Main (owned) menu bar.
Definition: TRootBrowser.h:81
TGFrame::DeleteWindow
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:276
TRootBrowser::DoubleClicked
virtual void DoubleClicked(TObject *obj)
Emits signal when double clicking on icon.
Definition: TRootBrowser.cxx:1238
TGMainFrame::SetClassHints
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition: TGFrame.cxx:1832
kLHintsNormal
@ kLHintsNormal
Definition: TGLayout.h:32
TVirtualPadEditor.h
TBrowserImp
ABC describing GUI independent browser implementation protocol.
Definition: TBrowserImp.h:29
TGMenuTitle
This class creates a menu title.
Definition: TGMenu.h:234
kFixedHeight
@ kFixedHeight
Definition: GuiTypes.h:389
TRootBrowser::fActBrowser
TBrowserImp * fActBrowser
Actual (active) browser imp.
Definition: TRootBrowser.h:86
TRootBrowser::fH2
TGHorizontalFrame * fH2
Horizontal frame.
Definition: TRootBrowser.h:71
TSystem.h
TRootBrowser::IsWebGUI
Bool_t IsWebGUI()
Check if the GUI factory is set to use the Web GUI.
Definition: TRootBrowser.cxx:922
TRootBrowser::EventInfo
void EventInfo(Int_t event, Int_t px, Int_t py, TObject *selected)
Display a tooltip with infos about the primitive below the cursor.
Definition: TRootBrowser.cxx:530
TRootBrowser::kCloseTab
@ kCloseTab
Definition: TRootBrowser.h:115
TRootBrowser::kNewHtml
@ kNewHtml
Definition: TRootBrowser.h:112
kGKeyPress
@ kGKeyPress
Definition: GuiTypes.h:60
TRootBrowser::BrowseObj
void BrowseObj(TObject *obj) override
Browse object.
Definition: TRootBrowser.cxx:370
TGCompositeFrame::MapSubwindows
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1164
TGVerticalFrame
A composite frame that layout their children in vertical way.
Definition: TGFrame.h:375
TGTab::AddTab
virtual TGCompositeFrame * AddTab(TGString *text)
Add a tab to the tab widget.
Definition: TGTab.cxx:376
TGFrame::ReparentWindow
virtual void ReparentWindow(const TGWindow *p, Int_t x=0, Int_t y=0)
Reparent window, make p the new parent and position the window at position (x,y) in new parent.
Definition: TGFrame.h:202
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:605
TRootBrowser::fTabLeft
TGTab * fTabLeft
Left Tab.
Definition: TRootBrowser.h:62
kKey_Control
@ kKey_Control
Definition: KeySymbols.h:50
TString::Remove
TString & Remove(Ssiz_t pos)
Definition: TString.h:673
kKey_Meta
@ kKey_Meta
Definition: KeySymbols.h:51
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
kKey_C
@ kKey_C
Definition: KeySymbols.h:128
TGFileBrowser.h
TRootBrowser::fNbTab
Int_t fNbTab[3]
Number of tab elements (for each Tab)
Definition: TRootBrowser.h:91
TSystem::Exec
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition: TSystem.cxx:655
TGTabElement::GetString
const char * GetString() const
Definition: TGTab.h:146
TBrowserImp::Add
virtual void Add(TObject *, const char *, Int_t)
Definition: TBrowserImp.h:44
TGCompositeFrame::HideFrame
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1190
TGFrame.h
Long_t
long Long_t
Definition: RtypesCore.h:54
TGFileInfo
Definition: TGFileDialog.h:39
TGLayoutHints
This class describes layout hints used by the layout classes.
Definition: TGLayout.h:50
TRootBrowser::fV1
TGVerticalFrame * fV1
Vertical frame.
Definition: TRootBrowser.h:72
TRootHelpDialog.h
TRootBrowser::GetDrawOption
Option_t * GetDrawOption() const override
Returns drawing option.
Definition: TRootBrowser.cxx:592
TRootBrowser::Refresh
void Refresh(Bool_t force=kFALSE) override
Refresh the actual browser contents.
Definition: TRootBrowser.cxx:964
TRootBrowser::ExecuteDefaultAction
void ExecuteDefaultAction(TObject *obj) override
Emits signal "ExecuteDefaultAction(TObject*)".
Definition: TRootBrowser.cxx:1259
TRootBrowser::fV2
TGVerticalFrame * fV2
Vertical frame.
Definition: TRootBrowser.h:73
gApplication
R__EXTERN TApplication * gApplication
Definition: TApplication.h:165
TGTab
A tab widget contains a set of composite frames each with a little tab with a name (like a set of fol...
Definition: TGTab.h:46
TRootBrowser::RecursiveRemove
void RecursiveRemove(TObject *obj) override
Recursively remove object from browser.
Definition: TRootBrowser.cxx:940
TRootBrowser::fLH0
TGLayoutHints * fLH0
Definition: TRootBrowser.h:60
TRootBrowser::fLH3
TGLayoutHints * fLH3
Layout hints, part 1.
Definition: TRootBrowser.h:60
TVirtualPad.h
TGTab.h
TRootBrowser::fVf
TGVerticalFrame * fVf
Vertical frame.
Definition: TRootBrowser.h:68
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
y
Double_t y[n]
Definition: legend1.C:17
TApplication::Terminate
virtual void Terminate(Int_t status=0)
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
kLHintsExpandY
@ kLHintsExpandY
Definition: TGLayout.h:31
TGTab::SetTab
virtual Bool_t SetTab(Int_t tabIndex, Bool_t emit=kTRUE)
Brings the composite frame with the index tabIndex to the front and generate the following event if t...
Definition: TGTab.cxx:558
TSystem::Sleep
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition: TSystem.cxx:439
TGClient.h
KeySymbols.h
TRootBrowser::fHSplitter
TGHSplitter * fHSplitter
Horizontal splitter.
Definition: TRootBrowser.h:75
kKey_Alt
@ kKey_Alt
Definition: KeySymbols.h:52
gPluginFileTypes
static const char * gPluginFileTypes[]
Definition: TRootBrowser.cxx:106
TRootBrowser::fTopMenuFrame
TGHorizontalFrame * fTopMenuFrame
Top menu frame.
Definition: TRootBrowser.h:77
TCollection::IsEmpty
virtual Bool_t IsEmpty() const
Definition: TCollection.h:186
kKey_F5
@ kKey_F5
Definition: KeySymbols.h:61
kKeyPressMask
const Mask_t kKeyPressMask
Definition: GuiTypes.h:159
kRaisedFrame
@ kRaisedFrame
Definition: GuiTypes.h:384
kKey_H
@ kKey_H
Definition: KeySymbols.h:133
TRootBrowser::CloneBrowser
void CloneBrowser()
Clone the browser.
Definition: TRootBrowser.cxx:381
TGMenuEntry::GetEntryId
Int_t GetEntryId() const
Definition: TGMenu.h:83
TRootBrowser::fTabBottom
TGTab * fTabBottom
Bottom Tab.
Definition: TRootBrowser.h:64
unsigned int
TRootBrowser::kNewEditor
@ kNewEditor
Definition: TRootBrowser.h:110
kHorizontalFrame
@ kHorizontalFrame
Definition: GuiTypes.h:382
TRootBrowser::fStatusBar
TGStatusBar * fStatusBar
Status bar.
Definition: TRootBrowser.h:89
gSystem
R__EXTERN TSystem * gSystem
Definition: TSystem.h:559
kKeyControlMask
const Mask_t kKeyControlMask
Definition: GuiTypes.h:197
TRootBrowser::fShowCloseTab
Bool_t fShowCloseTab
kTRUE to show close icon on tab elements
Definition: TRootBrowser.h:94
TRootBrowser::ExecPlugin
Long_t ExecPlugin(const char *name=nullptr, const char *fname=nullptr, const char *cmd=nullptr, Int_t pos=kRight, Int_t subpos=-1) override
Execute a macro and embed the created frame in the tab "pos" and tab element "subpos".
Definition: TRootBrowser.cxx:555
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
TRootBrowser::NewBrowser
static TBrowserImp * NewBrowser(TBrowser *b=nullptr, const char *title="ROOT Browser", UInt_t width=800, UInt_t height=500, Option_t *opt="")
static constructor returning TBrowserImp, as needed by the plugin mechanism.
Definition: TRootBrowser.cxx:1269
TGFileInfo::fIniDir
char * fIniDir
on input: initial directory, on output: new directory
Definition: TGFileDialog.h:47
TGWindow::GetParent
const TGWindow * GetParent() const
Definition: TGWindow.h:76
TGFileInfo::fFileTypes
const char ** fFileTypes
file types used to filter selectable files
Definition: TGFileDialog.h:48
TRootBrowser::StopEmbedding
void StopEmbedding(const char *name=nullptr) override
Definition: TRootBrowser.h:152
TGHSplitter
Definition: TGSplitter.h:90
TBrowserImp::GetDrawOption
virtual Option_t * GetDrawOption() const
Definition: TBrowserImp.h:57
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
TRootBrowser::fMenuHelp
TGPopupMenu * fMenuHelp
"Browser Help" popup menu
Definition: TRootBrowser.h:84
TGFrame::UnmapWindow
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:206
TBrowserPlugin::fCommand
TString fCommand
Command to be executed.
Definition: TRootBrowser.h:40
TGHSplitter::SetFrame
virtual void SetFrame(TGFrame *frame, Bool_t above)
Set frame to be resized.
Definition: TGSplitter.cxx:342
kKey_Q
@ kKey_Q
Definition: KeySymbols.h:142
TGCompositeFrame::fgDefaultHints
static TGLayoutHints * fgDefaultHints
Definition: TGFrame.h:297
TSystem::UnixPathName
virtual const char * UnixPathName(const char *unixpathname)
Convert from a local pathname to a Unix pathname.
Definition: TSystem.cxx:1062
TRootBrowser::SetStatusText
void SetStatusText(const char *txt, Int_t col) override
Set text in column col in status bar.
Definition: TRootBrowser.cxx:1067
TRefCnt::RemoveReference
UInt_t RemoveReference()
Definition: TRefCnt.h:41
TList::Remove
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:822
TGObject::fClient
TGClient * fClient
Connection to display server.
Definition: TGObject.h:27
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
TInterpreter.h
gHelpAbout
R__EXTERN const char gHelpAbout[]
Definition: HelpText.h:17
TGMenuEntry::GetPopup
TGPopupMenu * GetPopup() const
Definition: TGMenu.h:88
TRootBrowser::HandleMenu
void HandleMenu(Int_t id)
Handle menu entries events.
Definition: TRootBrowser.cxx:679
kKey_N
@ kKey_N
Definition: KeySymbols.h:139
TRootBrowser::SetTab
void SetTab(Int_t pos=kRight, Int_t subpos=-1)
Switch to Tab "subpos" in TGTab "pos".
Definition: TRootBrowser.cxx:1031
TRootBrowser::SetTabTitle
void SetTabTitle(const char *title, Int_t pos=kRight, Int_t subpos=-1)
Set text "title" of Tab "subpos" in TGTab "pos".
Definition: TRootBrowser.cxx:1047
TGFileBrowser::Selected
void Selected(char *)
A ROOT File has been selected in TGHtmlBrowser.
Definition: TGFileBrowser.cxx:1814
TBrowserImp::Refresh
virtual void Refresh(Bool_t=kFALSE)
Definition: TBrowserImp.h:54
TList::Add
virtual void Add(TObject *obj)
Definition: TList.h:87
TGTab::RemoveTab
virtual void RemoveTab(Int_t tabIndex=-1, Bool_t storeRemoved=kTRUE)
Remove container and tab of tab with index tabIndex.
Definition: TGTab.cxx:427
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TRootBrowser::fLH5
TGLayoutHints * fLH5
Definition: TRootBrowser.h:61
TGSplitter.h
gHelpBrowser
R__EXTERN const char gHelpBrowser[]
Definition: HelpText.h:18
kKeyReleaseMask
const Mask_t kKeyReleaseMask
Definition: GuiTypes.h:160
TGPopupMenu
This class creates a popup menu object.
Definition: TGMenu.h:110
Event_t
Event structure.
Definition: GuiTypes.h:174
name
char name[80]
Definition: TGX11.cxx:110
gHelpRemote
R__EXTERN const char gHelpRemote[]
Definition: HelpText.h:28
TRootBrowser::kHelpOnPS
@ kHelpOnPS
Definition: TRootBrowser.h:108
TGFrameElement
Definition: TGLayout.h:105
gPad
#define gPad
Definition: TVirtualPad.h:287
TRootBrowser::fH1
TGHorizontalFrame * fH1
Horizontal frame.
Definition: TRootBrowser.h:70
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
TGInputDialog
Input Dialog Widget.
Definition: TGInputDialog.h:22
TRootBrowser::InitPlugins
void InitPlugins(Option_t *opt="")
Initialize default plugins.
Definition: TRootBrowser.cxx:846
kLHintsExpandX
@ kLHintsExpandX
Definition: TGLayout.h:30
TGTabElement::ShowClose
virtual void ShowClose(Bool_t on=kTRUE)
Show/hide close icon on the tab element, then apply layout to compute correct elements size.
Definition: TGTab.cxx:230
TGMainFrame::fBindList
TList * fBindList
list with key bindings
Definition: TGFrame.h:415
TRootBrowser::fToolbarFrame
TGHorizontalFrame * fToolbarFrame
Toolbar frame.
Definition: TRootBrowser.h:80
kKey_CapsLock
@ kKey_CapsLock
Definition: KeySymbols.h:53
kKeyPress
@ kKeyPress
Definition: Buttons.h:20
TGCompositeFrame::SetCleanup
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1072
TRootBrowser::RecursiveReparent
void RecursiveReparent(TGPopupMenu *popup)
Recursively reparent TGPopupMenu to gClient->GetDefaultRoot().
Definition: TRootBrowser.cxx:949
TGTab::GetNumberOfTabs
Int_t GetNumberOfTabs() const
Return number of tabs.
Definition: TGTab.cxx:709
TGFileInfo::fFileNamesList
TList * fFileNamesList
list of selected file names
Definition: TGFileDialog.h:52
TNamed::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:47
TRootBrowser::StartEmbedding
void StartEmbedding(Int_t pos=kRight, Int_t subpos=-1) override
Start embedding external frame in the tab "pos" and tab element "subpos".
Definition: TRootBrowser.cxx:1104
TGPopupMenu::GetListOfEntries
const TList * GetListOfEntries() const
Definition: TGMenu.h:200
TGMenuBar
The TGMenu.h header contains all different menu classes.
Definition: TGMenu.h:282
TRootBrowser::ReallyDelete
void ReallyDelete() override
Really delete the browser and the this GUI.
Definition: TRootBrowser.cxx:931
TGVSplitter
Definition: TGSplitter.h:53
TRootBrowser::kLeft
@ kLeft
Definition: TRootBrowser.h:121
TGTab::GetTabTab
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
Definition: TGTab.cxx:663
TRootBrowser::fEditTab
TGTab * fEditTab
Tab in "Edit" mode.
Definition: TRootBrowser.h:65
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TGClient::GetRoot
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:226
TRootBrowser::kHelpOnGraphicsEd
@ kHelpOnGraphicsEd
Definition: TRootBrowser.h:106
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
TGMenuBar::GetPopup
virtual TGPopupMenu * GetPopup(const char *s)
Return popup menu with the specified name.
Definition: TGMenu.cxx:540
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
TSystem::ProcessEvents
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition: TSystem.cxx:418
TGFrame::SetFrameElement
void SetFrameElement(TGFrameElement *fe)
Definition: TGFrame.h:236
TRootBrowser::kCloseWindow
@ kCloseWindow
Definition: TRootBrowser.h:116
TGCompositeFrame::ShowFrame
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1204
TRootBrowser::fEditFrame
TGCompositeFrame * fEditFrame
Frame in "Edit" mode.
Definition: TRootBrowser.h:76
TRootBrowser::fIconPic
const TGPicture * fIconPic
icon picture
Definition: TRootBrowser.h:95
TGMenuTitle::GetHotKeyCode
Int_t GetHotKeyCode() const
Definition: TGMenu.h:272
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
kKeyShiftMask
const Mask_t kKeyShiftMask
Definition: GuiTypes.h:195
TGTabElement::SetText
void SetText(TGString *text)
Set new tab text.
Definition: TGTab.cxx:213
TRootBrowser::RemoveTab
void RemoveTab(Int_t pos, Int_t subpos)
Remove tab element "subpos" from tab "pos".
Definition: TRootBrowser.cxx:973
TGMainFrame::HandleKey
virtual Bool_t HandleKey(Event_t *event)
Handle keyboard events.
Definition: TGFrame.cxx:1582
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
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
TRootBrowser::kQuitRoot
@ kQuitRoot
Definition: TRootBrowser.h:117
gROOT
#define gROOT
Definition: TROOT.h:404
TRootBrowser::fActMenuBar
TGCompositeFrame * fActMenuBar
Actual (active) menu bar.
Definition: TRootBrowser.h:85
TGFileDialog
This class creates a file selection dialog.
Definition: TGFileDialog.h:65
kFDOpen
@ kFDOpen
Definition: TGFileDialog.h:21
int
TRootBrowser::fLH6
TGLayoutHints * fLH6
Definition: TRootBrowser.h:61
TRootBrowser::HandleKey
Bool_t HandleKey(Event_t *event) override
Handle keyboard events.
Definition: TRootBrowser.cxx:615
TRootBrowser
This class creates a ROOT object browser, constituted by three main tabs.
Definition: TRootBrowser.h:54
TGFileInfo::fFilename
char * fFilename
selected file name
Definition: TGFileDialog.h:46