Logo ROOT  
Reference Guide
TRootCanvas.cxx
Go to the documentation of this file.
1 // @(#)root/gui:$Id: b4c21444ab4f787f65b2b44199fc0440c3c2ce81 $
2 // Author: Fons Rademakers 15/01/98
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, 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 TRootCanvas
14  \ingroup guiwidgets
15 
16 This class creates a main window with menubar, scrollbars and a
17 drawing area. The widgets used are the new native ROOT GUI widgets.
18 
19 */
20 
21 
22 #include "RConfigure.h"
23 
24 #include "TRootCanvas.h"
25 #include "TRootApplication.h"
26 #include "TRootHelpDialog.h"
27 #include "TGClient.h"
28 #include "TGCanvas.h"
29 #include "TGMenu.h"
30 #include "TGWidget.h"
31 #include "TGFileDialog.h"
32 #include "TGStatusBar.h"
33 #include "TGTextEditDialogs.h"
34 #include "TROOT.h"
35 #include "TClass.h"
36 #include "TSystem.h"
37 #include "TCanvas.h"
38 #include "TBrowser.h"
39 #include "TClassTree.h"
40 #include "TMarker.h"
41 #include "TStyle.h"
42 #include "TColorWheel.h"
43 #include "TVirtualX.h"
44 #include "TApplication.h"
45 #include "TFile.h"
46 #include "TInterpreter.h"
47 #include "TEnv.h"
48 #include "TMath.h"
49 #include <iostream>
50 #include "TGDockableFrame.h"
51 
52 #include "TG3DLine.h"
53 #include "TGToolBar.h"
54 #include "TGToolTip.h"
55 #include "TVirtualPadEditor.h"
56 #include "TRootControlBar.h"
57 #include "TGuiBuilder.h"
58 #include "TImage.h"
59 #include "TError.h"
60 #include "TGDNDManager.h"
61 #include "TBufferFile.h"
62 #include "TRootBrowser.h"
63 #include "TGTab.h"
64 #include "TGedEditor.h"
65 
66 #include "TPluginManager.h"
67 #include "TVirtualGL.h"
68 
69 #ifdef WIN32
70 #include "TWin32SplashThread.h"
71 #endif
72 
73 #include "HelpText.h"
74 
75 
76 // Canvas menu command ids
93 
102 
113 
125 
132 
140 
157  kToolCutG
158 
159 };
160 
161 static const char *gOpenTypes[] = { "ROOT files", "*.root",
162  "All files", "*",
163  0, 0 };
164 
165 static const char *gSaveAsTypes[] = { "PDF", "*.pdf",
166  "PostScript", "*.ps",
167  "Encapsulated PostScript", "*.eps",
168  "SVG", "*.svg",
169  "TeX", "*.tex",
170  "GIF", "*.gif",
171  "ROOT macros", "*.C",
172  "ROOT files", "*.root",
173  "XML", "*.xml",
174  "PNG", "*.png",
175  "XPM", "*.xpm",
176  "JPEG", "*.jpg",
177  "TIFF", "*.tiff",
178  "XCF", "*.xcf",
179  "All files", "*",
180  0, 0 };
181 
183  // { filename, tooltip, staydown, id, button}
184  { "newcanvas.xpm", "New", kFALSE, kFileNewCanvas, 0 },
185  { "open.xpm", "Open", kFALSE, kFileOpen, 0 },
186  { "save.xpm", "Save As", kFALSE, kFileSaveAs, 0 },
187  { "printer.xpm", "Print", kFALSE, kFilePrint, 0 },
188  { "", "", kFALSE, -1, 0 },
189  { "interrupt.xpm", "Interrupt", kFALSE, kOptionInterrupt,0 },
190  { "refresh2.xpm", "Refresh", kFALSE, kOptionRefresh, 0 },
191  { "", "", kFALSE, -1, 0 },
192  { "inspect.xpm", "Inspect", kFALSE, kInspectRoot, 0 },
193  { "browser.xpm", "Browser", kFALSE, kToolsBrowser, 0 },
194  { 0, 0, kFALSE, 0, 0 }
195 };
196 
198  { "pointer.xpm", "Modify", kFALSE, kToolModify, 0 },
199  { "arc.xpm", "Arc", kFALSE, kToolArc, 0 },
200  { "line.xpm", "Line", kFALSE, kToolLine, 0 },
201  { "arrow.xpm", "Arrow", kFALSE, kToolArrow, 0 },
202  { "diamond.xpm", "Diamond", kFALSE, kToolDiamond, 0 },
203  { "ellipse.xpm", "Ellipse", kFALSE, kToolEllipse, 0 },
204  { "pad.xpm", "Pad", kFALSE, kToolPad, 0 },
205  { "pave.xpm", "Pave", kFALSE, kToolPave, 0 },
206  { "pavelabel.xpm", "Pave Label", kFALSE, kToolPLabel, 0 },
207  { "pavetext.xpm", "Pave Text", kFALSE, kToolPText, 0 },
208  { "pavestext.xpm", "Paves Text", kFALSE, kToolPsText, 0 },
209  { "graph.xpm", "Graph", kFALSE, kToolGraph, 0 },
210  { "curlyline.xpm", "Curly Line", kFALSE, kToolCurlyLine, 0 },
211  { "curlyarc.xpm", "Curly Arc", kFALSE, kToolCurlyArc, 0 },
212  { "latex.xpm", "Text/Latex", kFALSE, kToolLatex, 0 },
213  { "marker.xpm", "Marker", kFALSE, kToolMarker, 0 },
214  { "cut.xpm", "Graphical Cut", kFALSE, kToolCutG, 0 },
215  { 0, 0, kFALSE, 0, 0 }
216 };
217 
218 //////////////////////////////////////////////////////////////////////////
219 // //
220 // TRootContainer //
221 // //
222 // Utility class used by TRootCanvas. The TRootContainer is the frame //
223 // embedded in the TGCanvas widget. The ROOT graphics goes into this //
224 // frame. This class is used to enable input events on this graphics //
225 // frame and forward the events to the TRootCanvas handlers. //
226 // //
227 //////////////////////////////////////////////////////////////////////////
228 
230 private:
231  TRootCanvas *fCanvas; // pointer back to canvas imp
232 public:
233  TRootContainer(TRootCanvas *c, Window_t id, const TGWindow *parent);
234 
237  { return fCanvas->HandleContainerDoubleClick(ev); }
240  return fCanvas->HandleContainerConfigure(ev); }
242  { return fCanvas->HandleContainerKey(ev); }
244  { return fCanvas->HandleContainerMotion(ev); }
246  { return fCanvas->HandleContainerExpose(ev); }
248  { return fCanvas->HandleContainerCrossing(ev); }
249  void SavePrimitive(std::ostream &out, Option_t * = "");
250  void SetEditable(Bool_t) { }
251 };
252 
253 ////////////////////////////////////////////////////////////////////////////////
254 /// Create a canvas container.
255 
258 {
259  fCanvas = c;
260 
261  gVirtualX->GrabButton(fId, kAnyButton, kAnyModifier,
264 
268 }
269 
270 ////////////////////////////////////////////////////////////////////////////////
271 /// Directly handle scroll mouse buttons (4 and 5), only pass buttons
272 /// 1, 2 and 3 on to the TCanvas.
273 
275 {
276  TGViewPort *vp = (TGViewPort*)fParent;
277  UInt_t page = vp->GetHeight()/4;
278  Int_t newpos;
279 
280  gVirtualX->SetInputFocus(GetMainFrame()->GetId());
281 
282  if (event->fCode == kButton4) {
283  //scroll up
284  newpos = fCanvas->fCanvasWindow->GetVsbPosition() - page;
285  if (newpos < 0) newpos = 0;
287 // return kTRUE;
288  }
289  if (event->fCode == kButton5) {
290  // scroll down
291  newpos = fCanvas->fCanvasWindow->GetVsbPosition() + page;
293 // return kTRUE;
294  }
296 }
297 
299 
300 ////////////////////////////////////////////////////////////////////////////////
301 /// Create a basic ROOT canvas.
302 
304  : TGMainFrame(gClient->GetRoot(), width, height), TCanvasImp(c)
305 {
307 
310 
311  Resize(width, height);
312 }
313 
314 ////////////////////////////////////////////////////////////////////////////////
315 /// Create a basic ROOT canvas.
316 
318  : TGMainFrame(gClient->GetRoot(), width, height), TCanvasImp(c)
319 {
321 
324 
325  MoveResize(x, y, width, height);
326  SetWMPosition(x, y);
327 }
328 
329 ////////////////////////////////////////////////////////////////////////////////
330 /// Create the actual canvas.
331 
333 {
334  fButton = 0;
335  fAutoFit = kTRUE; // check also menu entry
336  fEditor = 0;
337  fEmbedded = kFALSE;
338 
339  // Create menus
346 
347  static Int_t img = 0;
348 
349  if (!img) {
350  Int_t sav = gErrorIgnoreLevel;
352  TImage* itmp = TImage::Create();
353  img = itmp ? 1 : -1;
354  if (itmp) {
355  delete itmp;
356  itmp=NULL;
357  }
358  gErrorIgnoreLevel = sav;
359  }
360  if (img > 0) {
363  }
364 
367 
369  fFileMenu->AddEntry("&New Canvas", kFileNewCanvas);
370  fFileMenu->AddEntry("&Open...", kFileOpen);
371  fFileMenu->AddEntry("&Close Canvas", kFileCloseCanvas);
373  fFileMenu->AddPopup("&Save", fFileSaveMenu);
374  fFileMenu->AddEntry("Save &As...", kFileSaveAs);
376  fFileMenu->AddEntry("&Print...", kFilePrint);
378  fFileMenu->AddEntry("&Quit ROOT", kFileQuit);
379 
383 
385  fEditMenu->AddEntry("&Style...", kEditStyle);
387  fEditMenu->AddEntry("Cu&t", kEditCut);
388  fEditMenu->AddEntry("&Copy", kEditCopy);
389  fEditMenu->AddEntry("&Paste", kEditPaste);
391  fEditMenu->AddPopup("C&lear", fEditClearMenu);
393  fEditMenu->AddEntry("&Undo", kEditUndo);
394  fEditMenu->AddEntry("&Redo", kEditRedo);
395 
401 
403  fViewWithMenu->AddEntry("&X3D", kViewX3D);
404  fViewWithMenu->AddEntry("&OpenGL", kViewOpenGL);
405 
407  fViewMenu->AddEntry("&Editor", kViewEditor);
408  fViewMenu->AddEntry("&Toolbar", kViewToolbar);
409  fViewMenu->AddEntry("Event &Statusbar", kViewEventStatus);
410  fViewMenu->AddEntry("T&oolTip Info", kViewToolTips);
412  fViewMenu->AddEntry("&Colors", kViewColors);
413  fViewMenu->AddEntry("&Fonts", kViewFonts);
414  fViewMenu->AddEntry("&Markers", kViewMarkers);
416  fViewMenu->AddEntry("&Iconify", kViewIconify);
418  fViewMenu->AddPopup("&View With", fViewWithMenu);
419 
421 
423  fOptionMenu->AddEntry("&Auto Resize Canvas", kOptionAutoResize);
424  fOptionMenu->AddEntry("&Resize Canvas", kOptionResizeCanvas);
425  fOptionMenu->AddEntry("&Move Opaque", kOptionMoveOpaque);
426  fOptionMenu->AddEntry("Resize &Opaque", kOptionResizeOpaque);
428  fOptionMenu->AddEntry("&Interrupt", kOptionInterrupt);
429  fOptionMenu->AddEntry("R&efresh", kOptionRefresh);
431  fOptionMenu->AddEntry("&Pad Auto Exec", kOptionAutoExec);
433  fOptionMenu->AddEntry("&Statistics", kOptionStatistics);
434  fOptionMenu->AddEntry("Histogram &Title", kOptionHistTitle);
435  fOptionMenu->AddEntry("&Fit Parameters", kOptionFitParams);
436  fOptionMenu->AddEntry("Can Edit &Histograms", kOptionCanEdit);
437 
438  // Opaque options initialized in InitWindow()
440  if (gStyle->GetOptStat())
442  if (gStyle->GetOptTitle())
444  if (gStyle->GetOptFit())
446  if (gROOT->GetEditHistograms())
448 
450  fToolsMenu->AddEntry("&Inspect ROOT", kInspectRoot);
451  fToolsMenu->AddEntry("&Class Tree", kClassesTree);
452  fToolsMenu->AddEntry("&Fit Panel", kFitPanel);
453  fToolsMenu->AddEntry("&Start Browser", kToolsBrowser);
454  fToolsMenu->AddEntry("&Gui Builder", kToolsBuilder);
455  fToolsMenu->AddEntry("&Event Recorder", kToolsRecorder);
456 
458  fHelpMenu->AddLabel("Basic Help On...");
460  fHelpMenu->AddEntry("&Canvas", kHelpOnCanvas);
461  fHelpMenu->AddEntry("&Menus", kHelpOnMenus);
462  fHelpMenu->AddEntry("&Graphics Editor", kHelpOnGraphicsEd);
463  fHelpMenu->AddEntry("&Browser", kHelpOnBrowser);
464  fHelpMenu->AddEntry("&Objects", kHelpOnObjects);
465  fHelpMenu->AddEntry("&PostScript", kHelpOnPS);
467  fHelpMenu->AddEntry("&About ROOT...", kHelpAbout);
468 
469  // This main frame will process the menu commands
470  fFileMenu->Associate(this);
471  fFileSaveMenu->Associate(this);
472  fEditMenu->Associate(this);
473  fEditClearMenu->Associate(this);
474  fViewMenu->Associate(this);
475  fViewWithMenu->Associate(this);
476  fOptionMenu->Associate(this);
477  fToolsMenu->Associate(this);
478  fHelpMenu->Associate(this);
479 
480  // Create menubar layout hints
484 
485  // Create menubar
486  fMenuBar = new TGMenuBar(this, 1, 1, kHorizontalFrame);
493 
495 
496  fHorizontal1 = new TGHorizontal3DLine(this);
499 
500  // Create toolbar dock
501  fToolDock = new TGDockableFrame(this);
505 
506  // will alocate it later
507  fToolBar = 0;
508  fVertical1 = 0;
509  fVertical2 = 0;
510  fVertical1Layout = 0;
511  fVertical2Layout = 0;
512 
513  fToolBarSep = new TGHorizontal3DLine(this);
516 
517  fMainFrame = new TGCompositeFrame(this, GetWidth() + 4, GetHeight() + 4,
520 
521  // Create editor frame that will host the pad editor
525 
526  // Create canvas and canvas container that will host the ROOT graphics
529 
530  fCanvasID = -1;
531 
532  if (fCanvas->UseGL()) {
534  //first, initialize GL (if not yet)
535  if (!gGLManager) {
536  TString x = "win32";
537  if (gVirtualX->InheritsFrom("TGX11"))
538  x = "x11";
539  else if (gVirtualX->InheritsFrom("TGCocoa"))
540  x = "osx";
541 
542  TPluginHandler *ph = gROOT->GetPluginManager()->FindHandler("TGLManager", x);
543 
544  if (ph && ph->LoadPlugin() != -1) {
545  if (!ph->ExecPlugin(0))
546  Error("CreateCanvas", "GL manager plugin failed");
547  }
548  }
549 
550  if (gGLManager) {
551  fCanvasID = gGLManager->InitGLWindow((ULong_t)fCanvasWindow->GetViewPort()->GetId());
552  if (fCanvasID != -1) {
553  //Create gl context.
554  const Int_t glCtx = gGLManager->CreateGLContext(fCanvasID);
555  if (glCtx != -1) {
557  fCanvas->SetGLDevice(glCtx);//Now, fCanvas is responsible for context deletion!
558  } else
559  Error("CreateCanvas", "GL context creation failed.");
560  } else
561  Error("CreateCanvas", "GL window creation failed\n");
562  }
563  }
564 
565  if (fCanvasID == -1)
567 
568  Window_t win = gVirtualX->GetWindowID(fCanvasID);
572 
575 
576  // create the tooltip with a timeout of 250 ms
578 
579  fCanvas->Connect("ProcessedEvent(Int_t, Int_t, Int_t, TObject*)",
580  "TRootCanvas", this,
581  "EventInfo(Int_t, Int_t, Int_t, TObject*)");
582 
583  // Create status bar
584  int parts[] = { 33, 10, 10, 47 };
585  fStatusBar = new TGStatusBar(this, 10, 10);
586  fStatusBar->SetParts(parts, 4);
587 
589 
591 
592  // Misc
594  SetIconName(name);
595  fIconPic = SetIconPixmap("macro_s.xpm");
596  SetClassHints("ROOT", "Canvas");
597 
599  MapSubwindows();
600 
601  // by default status bar, tool bar and pad editor are hidden
606 
609 
610  // we need to use GetDefaultSize() to initialize the layout algorithm...
612 
613  gVirtualX->SetDNDAware(fId, fDNDTypeList);
615 }
616 
617 ////////////////////////////////////////////////////////////////////////////////
618 /// Delete ROOT basic canvas. Order is significant. Delete in reverse
619 /// order of creation.
620 
622 {
623  delete fToolTip;
624  if (fIconPic) gClient->FreePicture(fIconPic);
625  if (fEditor && !fEmbedded) delete fEditor;
626  if (fToolBar) {
627  Disconnect(fToolDock, "Docked()", this, "AdjustSize()");
628  Disconnect(fToolDock, "Undocked()", this, "AdjustSize()");
629  fToolBar->Cleanup();
630  delete fToolBar;
631  }
632 
633  if (!MustCleanup()) {
634  delete fStatusBar;
635  delete fStatusBarLayout;
636  delete fCanvasContainer;
637  delete fCanvasWindow;
638 
639  delete fEditorFrame;
640  delete fEditorLayout;
641  delete fMainFrame;
642  delete fMainFrameLayout;
643  delete fToolBarSep;
644  delete fToolDock;
645  delete fToolBarLayout;
646  delete fHorizontal1;
647  delete fHorizontal1Layout;
648 
649  delete fMenuBar;
650  delete fMenuBarLayout;
651  delete fMenuBarItemLayout;
652  delete fMenuBarHelpLayout;
653  delete fCanvasLayout;
654  delete fDockLayout;
655  }
656 
657  delete fFileMenu;
658  delete fFileSaveMenu;
659  delete fEditMenu;
660  delete fEditClearMenu;
661  delete fViewMenu;
662  delete fViewWithMenu;
663  delete fOptionMenu;
664  delete fToolsMenu;
665  delete fHelpMenu;
666 }
667 
668 ////////////////////////////////////////////////////////////////////////////////
669 /// Called via TCanvasImp interface by TCanvas.
670 
672 {
674  if(gged && gged->GetCanvas() == fCanvas) {
675  if (fEmbedded) {
676  ((TGedEditor *)gged)->SetModel(0, 0, kButton1Down);
677  ((TGedEditor *)gged)->SetCanvas(0);
678  }
679  else gged->Hide();
680  }
681 
682  gVirtualX->CloseWindow();
683 }
684 
685 ////////////////////////////////////////////////////////////////////////////////
686 /// Really delete the canvas and this GUI.
687 
689 {
691  if(gged && gged->GetCanvas() == fCanvas) {
692  if (fEmbedded) {
693  ((TGedEditor *)gged)->SetModel(0, 0, kButton1Down);
694  ((TGedEditor *)gged)->SetCanvas(0);
695  }
696  else gged->Hide();
697  }
698 
699  fToolTip->Hide();
700  Disconnect(fCanvas, "ProcessedEvent(Int_t, Int_t, Int_t, TObject*)",
701  this, "EventInfo(Int_t, Int_t, Int_t, TObject*)");
702 
703  fCanvas->SetCanvasImp(0);
704  fCanvas->Clear();
705  fCanvas->SetName("");
706  if (gPad && gPad->GetCanvas() == fCanvas)
707  gPad = 0;
708  delete this;
709 }
710 
711 ////////////////////////////////////////////////////////////////////////////////
712 /// In case window is closed via WM we get here.
713 
715 {
716  DeleteWindow();
717 }
718 
719 ////////////////////////////////////////////////////////////////////////////////
720 /// Return width of canvas container.
721 
723 {
724  return fCanvasContainer->GetWidth();
725 }
726 
727 ////////////////////////////////////////////////////////////////////////////////
728 /// Return height of canvas container.
729 
731 {
732  return fCanvasContainer->GetHeight();
733 }
734 
735 ////////////////////////////////////////////////////////////////////////////////
736 /// Gets the size and position of the window containing the canvas. This
737 /// size includes the menubar and borders.
738 
740 {
741  gVirtualX->GetWindowSize(fId, x, y, w, h);
742 
743  Window_t childdum;
744  gVirtualX->TranslateCoordinates(fId, gClient->GetDefaultRoot()->GetId(),
745  0, 0, x, y, childdum);
746  if (!fCanvas->GetShowEditor()) return 0;
747  return fEditorFrame->GetWidth();
748 }
749 
750 ////////////////////////////////////////////////////////////////////////////////
751 /// Set text in status bar.
752 
753 void TRootCanvas::SetStatusText(const char *txt, Int_t partidx)
754 {
755  fStatusBar->SetText(txt, partidx);
756 }
757 
758 ////////////////////////////////////////////////////////////////////////////////
759 /// Handle menu and other command generated by the user.
760 
762 {
763  TRootHelpDialog *hd;
764  TList *lc;
765 
766  switch (GET_MSG(msg)) {
767 
768  case kC_COMMAND:
769 
770  switch (GET_SUBMSG(msg)) {
771 
772  case kCM_BUTTON:
773  case kCM_MENU:
774 
775  switch (parm1) {
776  // Handle toolbar items...
777  case kToolModify:
778  gROOT->SetEditorMode();
779  break;
780  case kToolArc:
781  gROOT->SetEditorMode("Arc");
782  break;
783  case kToolLine:
784  gROOT->SetEditorMode("Line");
785  break;
786  case kToolArrow:
787  gROOT->SetEditorMode("Arrow");
788  break;
789  case kToolDiamond:
790  gROOT->SetEditorMode("Diamond");
791  break;
792  case kToolEllipse:
793  gROOT->SetEditorMode("Ellipse");
794  break;
795  case kToolPad:
796  gROOT->SetEditorMode("Pad");
797  break;
798  case kToolPave:
799  gROOT->SetEditorMode("Pave");
800  break;
801  case kToolPLabel:
802  gROOT->SetEditorMode("PaveLabel");
803  break;
804  case kToolPText:
805  gROOT->SetEditorMode("PaveText");
806  break;
807  case kToolPsText:
808  gROOT->SetEditorMode("PavesText");
809  break;
810  case kToolGraph:
811  gROOT->SetEditorMode("PolyLine");
812  break;
813  case kToolCurlyLine:
814  gROOT->SetEditorMode("CurlyLine");
815  break;
816  case kToolCurlyArc:
817  gROOT->SetEditorMode("CurlyArc");
818  break;
819  case kToolLatex:
820  gROOT->SetEditorMode("Text");
821  break;
822  case kToolMarker:
823  gROOT->SetEditorMode("Marker");
824  break;
825  case kToolCutG:
826  gROOT->SetEditorMode("CutG");
827  break;
828 
829  // Handle File menu items...
830  case kFileNewCanvas:
831  gROOT->MakeDefCanvas();
832  break;
833  case kFileOpen:
834  {
835  static TString dir(".");
836  TGFileInfo fi;
837  fi.fFileTypes = gOpenTypes;
838  fi.SetIniDir(dir);
839  new TGFileDialog(fClient->GetDefaultRoot(), this, kFDOpen,&fi);
840  if (!fi.fFilename) return kTRUE;
841  dir = fi.fIniDir;
842  new TFile(fi.fFilename, "update");
843  }
844  break;
845  case kFileSaveAs:
846  {
847  TString workdir = gSystem->WorkingDirectory();
848  static TString dir(".");
849  static Int_t typeidx = 0;
850  static Bool_t overwr = kFALSE;
851  TGFileInfo fi;
852  TString defaultType = gEnv->GetValue("Canvas.SaveAsDefaultType", ".pdf");
853  if (typeidx == 0) {
854  for (int i=1;gSaveAsTypes[i];i+=2) {
855  TString ftype = gSaveAsTypes[i];
856  if (ftype.EndsWith(defaultType.Data())) {
857  typeidx = i-1;
858  break;
859  }
860  }
861  }
863  fi.SetIniDir(dir);
864  fi.fFileTypeIdx = typeidx;
865  fi.fOverwrite = overwr;
866  new TGFileDialog(fClient->GetDefaultRoot(), this, kFDSave, &fi);
867  gSystem->ChangeDirectory(workdir.Data());
868  if (!fi.fFilename) return kTRUE;
869  Bool_t appendedType = kFALSE;
870  TString fn = fi.fFilename;
871  TString ft = fi.fFileTypes[fi.fFileTypeIdx+1];
872  dir = fi.fIniDir;
873  typeidx = fi.fFileTypeIdx;
874  overwr = fi.fOverwrite;
875 again:
876  if (fn.EndsWith(".root") ||
877  fn.EndsWith(".ps") ||
878  fn.EndsWith(".eps") ||
879  fn.EndsWith(".pdf") ||
880  fn.EndsWith(".svg") ||
881  fn.EndsWith(".tex") ||
882  fn.EndsWith(".gif") ||
883  fn.EndsWith(".xml") ||
884  fn.EndsWith(".xpm") ||
885  fn.EndsWith(".jpg") ||
886  fn.EndsWith(".png") ||
887  fn.EndsWith(".xcf") ||
888  fn.EndsWith(".tiff")) {
889  fCanvas->SaveAs(fn);
890  } else if (fn.EndsWith(".C"))
891  fCanvas->SaveSource(fn);
892  else {
893  if (!appendedType) {
894  if (ft.Index(".") != kNPOS) {
895  fn += ft(ft.Index("."), ft.Length());
896  appendedType = kTRUE;
897  goto again;
898  }
899  }
900  Warning("ProcessMessage", "file %s cannot be saved with this extension", fi.fFilename);
901  }
902  for (int i=1;gSaveAsTypes[i];i+=2) {
903  TString ftype = gSaveAsTypes[i];
904  ftype.ReplaceAll("*.", ".");
905  if (fn.EndsWith(ftype.Data())) {
906  typeidx = i-1;
907  break;
908  }
909  }
910  }
911  break;
912  case kFileSaveAsRoot:
913  fCanvas->SaveAs(".root");
914  break;
915  case kFileSaveAsC:
916  fCanvas->SaveSource();
917  break;
918  case kFileSaveAsPS:
919  fCanvas->SaveAs();
920  break;
921  case kFileSaveAsEPS:
922  fCanvas->SaveAs(".eps");
923  break;
924  case kFileSaveAsPDF:
925  fCanvas->SaveAs(".pdf");
926  break;
927  case kFileSaveAsGIF:
928  fCanvas->SaveAs(".gif");
929  break;
930  case kFileSaveAsJPG:
931  fCanvas->SaveAs(".jpg");
932  break;
933  case kFileSaveAsPNG:
934  fCanvas->SaveAs(".png");
935  break;
936  case kFileSaveAsTEX:
937  fCanvas->SaveAs(".tex");
938  break;
939  case kFilePrint:
940  PrintCanvas();
941  break;
942  case kFileCloseCanvas:
944  break;
945  case kFileQuit:
946  if (!gApplication->ReturnFromRun()) {
950  }
953  if (TClass::GetClass("TStyleManager"))
954  gROOT->ProcessLine("TStyleManager::Terminate()");
956  break;
957 
958  // Handle Edit menu items...
959  case kEditStyle:
960  if (!TClass::GetClass("TStyleManager"))
961  gSystem->Load("libGed");
962  gROOT->ProcessLine("TStyleManager::Show()");
963  break;
964  case kEditCut:
965  // still noop
966  break;
967  case kEditCopy:
968  // still noop
969  break;
970  case kEditPaste:
971  // still noop
972  break;
973  case kEditUndo:
974  // noop
975  break;
976  case kEditRedo:
977  // noop
978  break;
979  case kEditClearPad:
980  gPad->Clear();
981  gPad->Modified();
982  gPad->Update();
983  break;
984  case kEditClearCanvas:
985  fCanvas->Clear();
986  fCanvas->Modified();
987  fCanvas->Update();
988  break;
989 
990  // Handle View menu items...
991  case kViewEditor:
993  break;
994  case kViewToolbar:
996  break;
997  case kViewEventStatus:
999  break;
1000  case kViewToolTips:
1002  break;
1003  case kViewColors:
1004  {
1005  TVirtualPad *padsav = gPad->GetCanvas();
1006  //This was the code with the old color table
1007  // TCanvas *m = new TCanvas("colors","Color Table");
1008  // TPad::DrawColorTable();
1009  // m->Update();
1010  TColorWheel *wheel = new TColorWheel();
1011  wheel->Draw();
1012 
1013  //tp: with Cocoa, window is visible (and repainted)
1014  //before wheel->Draw() was called and you can see "empty"
1015  //canvas.
1016  gPad->Update();
1017  //
1018  if (padsav) padsav->cd();
1019  }
1020  break;
1021  case kViewFonts:
1022  // noop
1023  break;
1024  case kViewMarkers:
1025  {
1026  TVirtualPad *padsav = gPad->GetCanvas();
1027  TCanvas *m = new TCanvas("markers","Marker Types",600,200);
1029  m->Update();
1030  if (padsav) padsav->cd();
1031  }
1032  break;
1033  case kViewIconify:
1034  Iconify();
1035  break;
1036  case kViewX3D:
1037  gPad->GetViewer3D("x3d");
1038  break;
1039  case kViewOpenGL:
1040  gPad->GetViewer3D("ogl");
1041  break;
1042 
1043  // Handle Option menu items...
1044  case kOptionAutoExec:
1046  if (fCanvas->GetAutoExec()) {
1048  } else {
1050  }
1051  break;
1052  case kOptionAutoResize:
1053  {
1054  fAutoFit = fAutoFit ? kFALSE : kTRUE;
1055  int opt = fCanvasContainer->GetOptions();
1056  if (fAutoFit) {
1057  opt &= ~kFixedSize;
1059  } else {
1060  opt |= kFixedSize;
1062  }
1064  // in case of autofit this will generate a configure
1065  // event for the container and this will force the
1066  // update of the TCanvas
1067  //Layout();
1068  }
1069  Layout();
1070  break;
1071  case kOptionResizeCanvas:
1072  FitCanvas();
1073  break;
1074  case kOptionMoveOpaque:
1075  if (fCanvas->OpaqueMoving()) {
1076  fCanvas->MoveOpaque(0);
1078  } else {
1079  fCanvas->MoveOpaque(1);
1081  }
1082  break;
1083  case kOptionResizeOpaque:
1084  if (fCanvas->OpaqueResizing()) {
1085  fCanvas->ResizeOpaque(0);
1087  } else {
1088  fCanvas->ResizeOpaque(1);
1090  }
1091  break;
1092  case kOptionInterrupt:
1093  gROOT->SetInterrupt();
1094  break;
1095  case kOptionRefresh:
1096  fCanvas->Paint();
1097  fCanvas->Update();
1098  break;
1099  case kOptionStatistics:
1100  if (gStyle->GetOptStat()) {
1101  gStyle->SetOptStat(0);
1102  delete gPad->FindObject("stats");
1104  } else {
1105  gStyle->SetOptStat(1);
1107  }
1108  gPad->Modified();
1109  fCanvas->Update();
1110  break;
1111  case kOptionHistTitle:
1112  if (gStyle->GetOptTitle()) {
1113  gStyle->SetOptTitle(0);
1114  delete gPad->FindObject("title");
1116  } else {
1117  gStyle->SetOptTitle(1);
1119  }
1120  gPad->Modified();
1121  fCanvas->Update();
1122  break;
1123  case kOptionFitParams:
1124  if (gStyle->GetOptFit()) {
1125  gStyle->SetOptFit(0);
1127  } else {
1128  gStyle->SetOptFit(1);
1130  }
1131  gPad->Modified();
1132  fCanvas->Update();
1133  break;
1134  case kOptionCanEdit:
1135  if (gROOT->GetEditHistograms()) {
1136  gROOT->SetEditHistograms(kFALSE);
1138  } else {
1139  gROOT->SetEditHistograms(kTRUE);
1141  }
1142  break;
1143 
1144  // Handle Tools menu items...
1145  case kInspectRoot:
1146  fCanvas->cd();
1147  gROOT->Inspect();
1148  fCanvas->Update();
1149  break;
1150  case kToolsBrowser:
1151  new TBrowser("browser");
1152  break;
1153  case kToolsBuilder:
1155  break;
1156  case kToolsRecorder:
1157  gROOT->ProcessLine("new TGRecorder()");
1158  break;
1159 
1160  // Handle Tools menu items...
1161  case kClassesTree:
1162  {
1163  TString cdef;
1164  lc = (TList*)gROOT->GetListOfCanvases();
1165  if (lc->FindObject("ClassTree")) {
1166  cdef = TString::Format("ClassTree_%d", lc->GetSize()+1);
1167  } else {
1168  cdef = "ClassTree";
1169  }
1170  new TClassTree(cdef.Data(), "TObject");
1171  fCanvas->Update();
1172  }
1173  break;
1174 
1175  case kFitPanel:
1176  {
1177  // use plugin manager to create instance of TFitEditor
1178  TPluginHandler *handler = gROOT->GetPluginManager()->FindHandler("TFitEditor");
1179  if (handler && handler->LoadPlugin() != -1) {
1180  if (handler->ExecPlugin(2, fCanvas, 0) == 0)
1181  Error("FitPanel", "Unable to crate the FitPanel");
1182  }
1183  else
1184  Error("FitPanel", "Unable to find the FitPanel plug-in");
1185  }
1186  break;
1187 
1188  // Handle Help menu items...
1189  case kHelpAbout:
1190  {
1191 #ifdef R__UNIX
1192  TString rootx = TROOT::GetBinDir() + "/root -a &";
1193  gSystem->Exec(rootx);
1194 #else
1195 #ifdef WIN32
1197 #else
1198 
1199  char str[32];
1200  sprintf(str, "About ROOT %s...", gROOT->GetVersion());
1201  hd = new TRootHelpDialog(this, str, 600, 400);
1202  hd->SetText(gHelpAbout);
1203  hd->Popup();
1204 #endif
1205 #endif
1206  }
1207  break;
1208  case kHelpOnCanvas:
1209  hd = new TRootHelpDialog(this, "Help on Canvas...", 600, 400);
1210  hd->SetText(gHelpCanvas);
1211  hd->Popup();
1212  break;
1213  case kHelpOnMenus:
1214  hd = new TRootHelpDialog(this, "Help on Menus...", 600, 400);
1216  hd->Popup();
1217  break;
1218  case kHelpOnGraphicsEd:
1219  hd = new TRootHelpDialog(this, "Help on Graphics Editor...", 600, 400);
1221  hd->Popup();
1222  break;
1223  case kHelpOnBrowser:
1224  hd = new TRootHelpDialog(this, "Help on Browser...", 600, 400);
1225  hd->SetText(gHelpBrowser);
1226  hd->Popup();
1227  break;
1228  case kHelpOnObjects:
1229  hd = new TRootHelpDialog(this, "Help on Objects...", 600, 400);
1230  hd->SetText(gHelpObjects);
1231  hd->Popup();
1232  break;
1233  case kHelpOnPS:
1234  hd = new TRootHelpDialog(this, "Help on PostScript...", 600, 400);
1235  hd->SetText(gHelpPostscript);
1236  hd->Popup();
1237  break;
1238  }
1239  default:
1240  break;
1241  }
1242  default:
1243  break;
1244  }
1245  return kTRUE;
1246 }
1247 
1248 ////////////////////////////////////////////////////////////////////////////////
1249 /// Called by TCanvas ctor to get window indetifier.
1250 
1252 {
1253  if (fCanvas->OpaqueMoving())
1255  if (fCanvas->OpaqueResizing())
1257 
1258  return fCanvasID;
1259 }
1260 
1261 ////////////////////////////////////////////////////////////////////////////////
1262 /// Set size of canvas container. Units in pixels.
1263 
1265 {
1266  // turn off autofit, we want to stay at the given size
1267  fAutoFit = kFALSE;
1269  int opt = fCanvasContainer->GetOptions();
1270  opt |= kFixedSize; // turn on fixed size mode
1274  Layout(); // force layout (will update container to given size)
1275  fCanvas->Resize();
1276  fCanvas->Update();
1277 }
1278 
1279 ////////////////////////////////////////////////////////////////////////////////
1280 /// Set canvas position (units in pixels).
1281 
1283 {
1284  Move(x, y);
1285 }
1286 
1287 ////////////////////////////////////////////////////////////////////////////////
1288 /// Set size of canvas (units in pixels).
1289 
1291 {
1292  Resize(w, h);
1293 
1294  // Make sure the change of size is really done.
1295  gVirtualX->Update(1);
1296  if (!gThreadXAR) {
1297  gSystem->Sleep(100);
1299  gSystem->Sleep(10);
1301  }
1302 }
1303 
1304 ////////////////////////////////////////////////////////////////////////////////
1305 /// Put canvas window on top of the window stack.
1306 
1308 {
1309  gVirtualX->RaiseWindow(GetId());
1310 }
1311 
1312 ////////////////////////////////////////////////////////////////////////////////
1313 /// Change title on window.
1314 
1315 void TRootCanvas::SetWindowTitle(const char *title)
1316 {
1317  SetWindowName(title);
1318  SetIconName(title);
1319  fToolDock->SetWindowName(Form("ToolBar: %s", title));
1320 }
1321 
1322 ////////////////////////////////////////////////////////////////////////////////
1323 /// Fit canvas container to current window size.
1324 
1326 {
1327  if (!fAutoFit) {
1328  int opt = fCanvasContainer->GetOptions();
1329  int oopt = opt;
1330  opt &= ~kFixedSize; // turn off fixed size mode
1332  Layout(); // force layout
1333  fCanvas->Resize();
1334  fCanvas->Update();
1336  }
1337 }
1338 
1339 ////////////////////////////////////////////////////////////////////////////////
1340 /// Print the canvas.
1341 
1343 {
1344  Int_t ret = 0;
1345  Bool_t pname = kTRUE;
1346  char *printer, *printCmd;
1347  static TString sprinter, sprintCmd;
1348 
1349  if (sprinter == "")
1350  printer = StrDup(gEnv->GetValue("Print.Printer", ""));
1351  else
1352  printer = StrDup(sprinter);
1353  if (sprintCmd == "")
1354 #ifndef WIN32
1355  printCmd = StrDup(gEnv->GetValue("Print.Command", ""));
1356 #else
1357  printCmd = StrDup(gEnv->GetValue("Print.Command", "start AcroRd32.exe /p"));
1358 #endif
1359  else
1360  printCmd = StrDup(sprintCmd);
1361 
1362  new TGPrintDialog(fClient->GetDefaultRoot(), this, 400, 150,
1363  &printer, &printCmd, &ret);
1364  if (ret) {
1365  sprinter = printer;
1366  sprintCmd = printCmd;
1367 
1368  if (sprinter == "")
1369  pname = kFALSE;
1370 
1371  TString fn = "rootprint";
1372  FILE *f = gSystem->TempFileName(fn, gEnv->GetValue("Print.Directory", gSystem->TempDirectory()));
1373  if (f) fclose(f);
1374  fn += TString::Format(".%s",gEnv->GetValue("Print.FileType", "pdf"));
1375  fCanvas->Print(fn);
1376 
1377  TString cmd = sprintCmd;
1378  if (cmd.Contains("%p"))
1379  cmd.ReplaceAll("%p", sprinter);
1380  else if (pname) {
1381  cmd += " "; cmd += sprinter; cmd += " ";
1382  }
1383 
1384  if (cmd.Contains("%f"))
1385  cmd.ReplaceAll("%f", fn);
1386  else {
1387  cmd += " "; cmd += fn; cmd += " ";
1388  }
1389 
1390  gSystem->Exec(cmd);
1391 #ifndef WIN32
1392  gSystem->Unlink(fn);
1393 #endif
1394  }
1395  delete [] printer;
1396  delete [] printCmd;
1397 }
1398 
1399 ////////////////////////////////////////////////////////////////////////////////
1400 /// Display a tooltip with infos about the primitive below the cursor.
1401 
1403 {
1404  fToolTip->Hide();
1405  if (!fCanvas->GetShowToolTips() || selected == 0 ||
1406  event != kMouseMotion || fButton != 0)
1407  return;
1408  TString tipInfo;
1409  TString objInfo = selected->GetObjectInfo(px, py);
1410  if (objInfo.BeginsWith("-")) {
1411  // if the string begins with '-', display only the object info
1412  objInfo.Remove(TString::kLeading, '-');
1413  tipInfo = objInfo;
1414  }
1415  else {
1416  const char *title = selected->GetTitle();
1417  tipInfo += TString::Format("%s::%s", selected->ClassName(),
1418  selected->GetName());
1419  if (title && strlen(title))
1420  tipInfo += TString::Format("\n%s", selected->GetTitle());
1421  tipInfo += TString::Format("\n%d, %d", px, py);
1422  if (!objInfo.IsNull())
1423  tipInfo += TString::Format("\n%s", objInfo.Data());
1424  }
1425  fToolTip->SetText(tipInfo.Data());
1426  fToolTip->SetPosition(px+15, py+15);
1427  fToolTip->Reset();
1428 }
1429 
1430 ////////////////////////////////////////////////////////////////////////////////
1431 /// Show or hide menubar.
1432 
1434 {
1435  if (show) ShowFrame(fMenuBar);
1436  else HideFrame(fMenuBar);
1437 }
1438 
1439 ////////////////////////////////////////////////////////////////////////////////
1440 /// Show or hide statusbar.
1441 
1443 {
1445  UInt_t ch = fCanvas->GetWindowHeight();
1446 
1447  UInt_t h = GetHeight();
1448  UInt_t sh = fStatusBar->GetHeight()+2;
1449 
1450  if (show) {
1453  if (dh - ch >= sh) h = h + sh;
1454  else h = ch;
1455  } else {
1458  if (dh - ch < sh) h = ch;
1459  else h = h - sh;
1460  }
1461  Resize(GetWidth(), h);
1462 }
1463 
1464 ////////////////////////////////////////////////////////////////////////////////
1465 /// Show or hide side frame.
1466 
1468 {
1469  TVirtualPad *savedPad = 0;
1470  savedPad = (TVirtualPad *) gPad;
1471  gPad = Canvas();
1472 
1473  UInt_t w = GetWidth();
1475  UInt_t h = GetHeight();
1477 
1478  if (fParent && fParent != fClient->GetDefaultRoot()) {
1481  if (main && main->InheritsFrom("TRootBrowser")) {
1482  TRootBrowser *browser = (TRootBrowser *)main;
1483  if (!fEmbedded)
1484  browser->GetTabRight()->Connect("Selected(Int_t)", "TRootCanvas",
1485  this, "Activated(Int_t)");
1486  fEmbedded = kTRUE;
1487  if (show && (!fEditor || !((TGedEditor *)fEditor)->IsMapped())) {
1488  if (!browser->GetTabLeft()->GetTabTab("Pad Editor")) {
1489  if (browser->GetActFrame()) { //already in edit mode
1490  TTimer::SingleShot(200, "TRootCanvas", this, "ShowEditor(=kTRUE)");
1491  } else {
1493  if (!fEditor)
1495  else {
1496  ((TGedEditor *)fEditor)->ReparentWindow(fClient->GetRoot());
1497  ((TGedEditor *)fEditor)->MapWindow();
1498  }
1499  browser->StopEmbedding("Pad Editor");
1500  if (fEditor) {
1502  gROOT->GetListOfCleanups()->Remove((TGedEditor *)fEditor);
1503  ((TGedEditor *)fEditor)->SetCanvas(fCanvas);
1504  ((TGedEditor *)fEditor)->SetModel(fCanvas, fCanvas, kButton1Down);
1505  }
1506  }
1507  }
1508  else
1510  }
1511  if (show) browser->GetTabLeft()->SetTab("Pad Editor");
1512  }
1513  }
1514  else {
1515  if (show) {
1516  if (!fEditor) CreateEditor();
1518  if(gged && gged->GetCanvas() == fCanvas){
1519  gged->Hide();
1520  }
1523  h = h + s;
1524  }
1526  fEditor->Show();
1528  w = w + e;
1529  } else {
1532  h = h - s;
1533  }
1534  if (fEditor) fEditor->Hide();
1537  w = w - e;
1538  }
1539  Resize(w, h);
1540  }
1541  if (savedPad) gPad = savedPad;
1542 }
1543 
1544 ////////////////////////////////////////////////////////////////////////////////
1545 /// Create embedded editor.
1546 
1548 {
1551  gPad = Canvas();
1552  // next two lines are related to the old editor
1553  Int_t show = gEnv->GetValue("Canvas.ShowEditor", 0);
1554  gEnv->SetValue("Canvas.ShowEditor","true");
1559 
1560  // next line is related to the old editor
1561  if (show == 0) gEnv->SetValue("Canvas.ShowEditor","false");
1562 }
1563 
1564 ////////////////////////////////////////////////////////////////////////////////
1565 /// Show or hide toolbar.
1566 
1568 {
1569  if (show && !fToolBar) {
1570 
1571  fToolBar = new TGToolBar(fToolDock, 60, 20, kHorizontalFrame);
1573 
1574  Int_t spacing = 6, i;
1575  for (i = 0; gToolBarData[i].fPixmap; i++) {
1576  if (strlen(gToolBarData[i].fPixmap) == 0) {
1577  spacing = 6;
1578  continue;
1579  }
1580  fToolBar->AddButton(this, &gToolBarData[i], spacing);
1581  spacing = 0;
1582  }
1589 
1590  spacing = 6;
1591  for (i = 0; gToolBarData1[i].fPixmap; i++) {
1592  if (strlen(gToolBarData1[i].fPixmap) == 0) {
1593  spacing = 6;
1594  continue;
1595  }
1596  fToolBar->AddButton(this, &gToolBarData1[i], spacing);
1597  spacing = 0;
1598  }
1600  fToolDock->Layout();
1601  fToolDock->SetWindowName(Form("ToolBar: %s", GetWindowName()));
1602  fToolDock->Connect("Docked()", "TRootCanvas", this, "AdjustSize()");
1603  fToolDock->Connect("Undocked()", "TRootCanvas", this, "AdjustSize()");
1604  }
1605 
1606  if (!fToolBar) return;
1607 
1608  UInt_t h = GetHeight();
1609  UInt_t sh = fToolBarSep->GetHeight();
1610  UInt_t dh = fToolBar->GetHeight();
1611 
1612  if (show) {
1616  h = h + sh;
1617  }
1620  h = h + dh + sh;
1621  } else {
1622  if (fToolDock->IsUndocked()) {
1624  h = h + 2*sh;
1625  } else h = h - dh;
1626 
1630  h = h - sh;
1631  }
1633  h = h - sh;
1635  }
1636  Resize(GetWidth(), h);
1637 }
1638 
1639 ////////////////////////////////////////////////////////////////////////////////
1640 /// Enable or disable tooltip info.
1641 
1643 {
1644  if (show)
1646  else
1648 }
1649 
1650 ////////////////////////////////////////////////////////////////////////////////
1651 /// Returns kTRUE if the editor is shown.
1652 
1654 {
1656 }
1657 
1658 ////////////////////////////////////////////////////////////////////////////////
1659 /// Returns kTRUE if the menu bar is shown.
1660 
1662 {
1663  return (fMenuBar) && fMenuBar->IsMapped();
1664 }
1665 
1666 ////////////////////////////////////////////////////////////////////////////////
1667 /// Returns kTRUE if the status bar is shown.
1668 
1670 {
1671  return (fStatusBar) && fStatusBar->IsMapped();
1672 }
1673 
1674 ////////////////////////////////////////////////////////////////////////////////
1675 /// Returns kTRUE if the tool bar is shown.
1676 
1678 {
1679  return (fToolBar) && fToolBar->IsMapped();
1680 }
1681 
1682 ////////////////////////////////////////////////////////////////////////////////
1683 /// Returns kTRUE if the tooltips are enabled.
1684 
1686 {
1687  return (fCanvas) && fCanvas->GetShowToolTips();
1688 }
1689 
1690 ////////////////////////////////////////////////////////////////////////////////
1691 /// Keep the same canvas size while docking/undocking toolbar.
1692 
1694 {
1695  UInt_t h = GetHeight();
1696  UInt_t dh = fToolBar->GetHeight();
1697  UInt_t sh = fHorizontal1->GetHeight();
1698 
1699  if (fToolDock->IsUndocked()) {
1702  h = h - sh;
1703  }
1705  h = h - dh - sh;
1706  } else {
1709  h = h + sh;
1710  }
1712  h = h + dh + sh;
1713  }
1714  Resize(GetWidth(), h);
1715 }
1716 
1717 ////////////////////////////////////////////////////////////////////////////////
1718 /// Handle mouse button events in the canvas container.
1719 
1721 {
1722  Int_t button = event->fCode;
1723  Int_t x = event->fX;
1724  Int_t y = event->fY;
1725 
1726  if (event->fType == kButtonPress) {
1727  if (fToolTip && fCanvas->GetShowToolTips()) {
1728  fToolTip->Hide();
1729  gVirtualX->UpdateWindow(0);
1731  }
1732  fButton = button;
1733  if (button == kButton1) {
1734  if (event->fState & kKeyShiftMask)
1736  else
1738  }
1739  if (button == kButton2)
1741  if (button == kButton3) {
1743  fButton = 0; // button up is consumed by TContextMenu
1744  }
1745 
1746  } else if (event->fType == kButtonRelease) {
1747  if (button == kButton4)
1749  if (button == kButton5)
1751  if (button == kButton1)
1753  if (button == kButton2)
1755  if (button == kButton3)
1757 
1758  fButton = 0;
1759  }
1760 
1761  return kTRUE;
1762 }
1763 
1764 ////////////////////////////////////////////////////////////////////////////////
1765 /// Handle mouse button double click events in the canvas container.
1766 
1768 {
1769  Int_t button = event->fCode;
1770  Int_t x = event->fX;
1771  Int_t y = event->fY;
1772 
1773  if (button == kButton1)
1775  if (button == kButton2)
1777  if (button == kButton3)
1779 
1780  return kTRUE;
1781 }
1782 
1783 ////////////////////////////////////////////////////////////////////////////////
1784 /// Handle configure (i.e. resize) event.
1785 
1787 {
1788  if (fAutoFit) {
1789  fCanvas->Resize();
1790  fCanvas->Update();
1791  }
1792 
1793  if (fCanvas->HasFixedAspectRatio()) {
1794  // get menu height
1795  static Int_t dh = 0;
1796  if (!dh)
1797  dh = GetHeight() - fCanvasContainer->GetHeight();
1799  fCanvas->GetAspectRatio()) + dh;
1800  SetWindowSize(GetWidth(), h);
1801  }
1802  return kTRUE;
1803 }
1804 
1805 ////////////////////////////////////////////////////////////////////////////////
1806 /// Handle keyboard events in the canvas container.
1807 
1809 {
1810  static EGEventType previous_event = kOtherEvent;
1811  static UInt_t previous_keysym = 0;
1812 
1813  if (event->fType == kGKeyPress) {
1814  fButton = event->fCode;
1815  UInt_t keysym;
1816  char str[2];
1817  gVirtualX->LookupString(event, str, sizeof(str), keysym);
1818 
1819  if (str[0] == kESC){ // ESC sets the escape flag
1820  gROOT->SetEscape();
1821  fCanvas->HandleInput(kButton1Up, 0, 0);
1823  gPad->Modified();
1824  return kTRUE;
1825  }
1826  if (str[0] == 3) // ctrl-c sets the interrupt flag
1827  gROOT->SetInterrupt();
1828 
1829  // handle arrow keys
1830  if (keysym > 0x1011 && keysym < 0x1016) {
1831  Window_t dum1, dum2, wid;
1832  UInt_t mask = 0;
1833  Int_t mx, my, tx, ty;
1834  wid = gVirtualX->GetDefaultRootWindow();
1835  gVirtualX->QueryPointer(wid, dum1, dum2, mx, my, mx, my, mask);
1836  gVirtualX->TranslateCoordinates(gClient->GetDefaultRoot()->GetId(),
1838  mx, my, tx, ty, dum1);
1840  // handle case where we got consecutive same keypressed events coming
1841  // from auto-repeat on Windows (as it fires only successive keydown events)
1842  if ((previous_keysym == keysym) && (previous_event == kGKeyPress)) {
1843  switch (keysym) {
1844  case 0x1012: // left
1845  gVirtualX->Warp(--mx, my, wid); --tx;
1846  break;
1847  case 0x1013: // up
1848  gVirtualX->Warp(mx, --my, wid); --ty;
1849  break;
1850  case 0x1014: // right
1851  gVirtualX->Warp(++mx, my, wid); ++tx;
1852  break;
1853  case 0x1015: // down
1854  gVirtualX->Warp(mx, ++my, wid); ++ty;
1855  break;
1856  default:
1857  break;
1858  }
1860  }
1861  previous_keysym = keysym;
1862  }
1863  else {
1864  fCanvas->HandleInput(kKeyPress, str[0], keysym);
1865  }
1866  } else if (event->fType == kKeyRelease) {
1867  UInt_t keysym;
1868  char str[2];
1869  gVirtualX->LookupString(event, str, sizeof(str), keysym);
1870 
1871  if (keysym > 0x1011 && keysym < 0x1016) {
1872  Window_t dum1, dum2, wid;
1873  UInt_t mask = 0;
1874  Int_t mx, my, tx, ty;
1875  wid = gVirtualX->GetDefaultRootWindow();
1876  gVirtualX->QueryPointer(wid, dum1, dum2, mx, my, mx, my, mask);
1877  switch (keysym) {
1878  case 0x1012: // left
1879  gVirtualX->Warp(--mx, my, wid);
1880  break;
1881  case 0x1013: // up
1882  gVirtualX->Warp(mx, --my, wid);
1883  break;
1884  case 0x1014: // right
1885  gVirtualX->Warp(++mx, my, wid);
1886  break;
1887  case 0x1015: // down
1888  gVirtualX->Warp(mx, ++my, wid);
1889  break;
1890  default:
1891  break;
1892  }
1893  gVirtualX->TranslateCoordinates(gClient->GetDefaultRoot()->GetId(),
1895  mx, my, tx, ty, dum1);
1897  previous_keysym = keysym;
1898  }
1899  fButton = 0;
1900  }
1901  previous_event = event->fType;
1902  return kTRUE;
1903 }
1904 
1905 ////////////////////////////////////////////////////////////////////////////////
1906 /// Handle mouse motion event in the canvas container.
1907 
1909 {
1910  Int_t x = event->fX;
1911  Int_t y = event->fY;
1912 
1913  if (fButton == 0)
1915  if (fButton == kButton1) {
1916  if (event->fState & kKeyShiftMask)
1917  fCanvas->HandleInput(EEventType(8), x, y);
1918  else
1920  }
1921  if (fButton == kButton2)
1923 
1924  return kTRUE;
1925 }
1926 
1927 ////////////////////////////////////////////////////////////////////////////////
1928 /// Handle expose events.
1929 
1931 {
1932  if (event->fCount == 0) {
1933  fCanvas->Flush();
1934  }
1935 
1936  return kTRUE;
1937 }
1938 
1939 ////////////////////////////////////////////////////////////////////////////////
1940 /// Handle enter/leave events. Only leave is activated at the moment.
1941 
1943 {
1944  Int_t x = event->fX;
1945  Int_t y = event->fY;
1946 
1947  // pointer grabs create also an enter and leave event but with fCode
1948  // either kNotifyGrab or kNotifyUngrab, don't propagate these events
1949  if (event->fType == kLeaveNotify && event->fCode == kNotifyNormal)
1951 
1952  return kTRUE;
1953 }
1954 
1955 ////////////////////////////////////////////////////////////////////////////////
1956 /// Handle drop events.
1957 
1959 {
1960  static Atom_t rootObj = gVirtualX->InternAtom("application/root", kFALSE);
1961  static Atom_t uriObj = gVirtualX->InternAtom("text/uri-list", kFALSE);
1962 
1963  if (data->fDataType == rootObj) {
1964  TBufferFile buf(TBuffer::kRead, data->fDataLength, (void *)data->fData);
1965  buf.SetReadMode();
1966  TObject *obj = (TObject *)buf.ReadObjectAny(TObject::Class());
1967  if (!obj) return kTRUE;
1968  gPad->Clear();
1969  if (obj->InheritsFrom("TKey")) {
1970  TObject *object = (TObject *)gROOT->ProcessLine(Form("((TKey *)0x%lx)->ReadObj();", (ULong_t)obj));
1971  if (!object) return kTRUE;
1972  if (object->InheritsFrom("TGraph"))
1973  object->Draw("ALP");
1974  else if (object->InheritsFrom("TImage"))
1975  object->Draw("x");
1976  else if (object->IsA()->GetMethodAllAny("Draw"))
1977  object->Draw();
1978  }
1979  else if (obj->InheritsFrom("TGraph"))
1980  obj->Draw("ALP");
1981  else if (obj->IsA()->GetMethodAllAny("Draw"))
1982  obj->Draw();
1983  gPad->Modified();
1984  gPad->Update();
1985  return kTRUE;
1986  }
1987  else if (data->fDataType == uriObj) {
1988  TString sfname((char *)data->fData);
1989  if (sfname.Length() > 7) {
1990  sfname.ReplaceAll("\r\n", "");
1991  TUrl uri(sfname.Data());
1992  if (sfname.EndsWith(".bmp") ||
1993  sfname.EndsWith(".gif") ||
1994  sfname.EndsWith(".jpg") ||
1995  sfname.EndsWith(".png") ||
1996  sfname.EndsWith(".ps") ||
1997  sfname.EndsWith(".eps") ||
1998  sfname.EndsWith(".pdf") ||
1999  sfname.EndsWith(".tiff") ||
2000  sfname.EndsWith(".xpm")) {
2001  TImage *img = TImage::Open(uri.GetFile());
2002  if (img) {
2003  img->Draw("x");
2004  img->SetEditable(kTRUE);
2005  }
2006  }
2007  gPad->Modified();
2008  gPad->Update();
2009  }
2010  }
2011  return kFALSE;
2012 }
2013 
2014 ////////////////////////////////////////////////////////////////////////////////
2015 /// Handle dragging position events.
2016 
2018  Int_t /*xroot*/, Int_t /*yroot*/)
2019 {
2020  TPad *pad = fCanvas->Pick(x, y, 0);
2021  if (pad) {
2022  pad->cd();
2023  gROOT->SetSelectedPad(pad);
2024  // make sure the pad is highlighted (on Windows)
2025  pad->Update();
2026  }
2027  return action;
2028 }
2029 
2030 ////////////////////////////////////////////////////////////////////////////////
2031 /// Handle drag enter events.
2032 
2034 {
2035  static Atom_t rootObj = gVirtualX->InternAtom("application/root", kFALSE);
2036  static Atom_t uriObj = gVirtualX->InternAtom("text/uri-list", kFALSE);
2037  Atom_t ret = kNone;
2038  for (int i = 0; typelist[i] != kNone; ++i) {
2039  if (typelist[i] == rootObj)
2040  ret = rootObj;
2041  if (typelist[i] == uriObj)
2042  ret = uriObj;
2043  }
2044  return ret;
2045 }
2046 
2047 ////////////////////////////////////////////////////////////////////////////////
2048 /// Handle drag leave events.
2049 
2051 {
2052  return kTRUE;
2053 }
2054 
2055 ////////////////////////////////////////////////////////////////////////////////
2056 /// Slot handling tab switching in the browser, to properly set the canvas
2057 /// and the model to the editor.
2058 
2060 {
2061  if (fEmbedded) {
2062  TGTab *sender = (TGTab *)gTQSender;
2063  if (sender) {
2064  TGCompositeFrame *cont = sender->GetTabContainer(id);
2065  if (cont == fParent) {
2066  if (!fEditor)
2068  if (fEditor && ((TGedEditor *)fEditor)->IsMapped()) {
2069  ((TGedEditor *)fEditor)->SetCanvas(fCanvas);
2070  ((TGedEditor *)fEditor)->SetModel(fCanvas, fCanvas, kButton1Down);
2071  }
2072  }
2073  }
2074  }
2075 }
2076 
2077 ////////////////////////////////////////////////////////////////////////////////
2078 /// Save a canvas container as a C++ statement(s) on output stream out.
2079 
2080 void TRootContainer::SavePrimitive(std::ostream &out, Option_t * /*= ""*/)
2081 {
2082  out << std::endl << " // canvas container" << std::endl;
2083  out << " Int_t canvasID = gVirtualX->InitWindow((ULong_t)"
2084  << GetParent()->GetParent()->GetName() << "->GetId());" << std::endl;
2085  out << " Window_t winC = gVirtualX->GetWindowID(canvasID);" << std::endl;
2086  out << " TGCompositeFrame *";
2087  out << GetName() << " = new TGCompositeFrame(gClient,winC"
2088  << "," << GetParent()->GetName() << ");" << std::endl;
2089 }
kToolModify
@ kToolModify
Definition: TRootCanvas.cxx:141
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
kEditPaste
@ kEditPaste
Definition: TRootCanvas.cxx:97
c
#define c(i)
Definition: RSha256.hxx:101
TRootCanvas::SetStatusText
void SetStatusText(const char *txt=0, Int_t partidx=0)
Set text in status bar.
Definition: TRootCanvas.cxx:753
kMouseLeave
@ kMouseLeave
Definition: Buttons.h:23
TRootCanvas::HasToolBar
Bool_t HasToolBar() const
Returns kTRUE if the tool bar is shown.
Definition: TRootCanvas.cxx:1677
TGClient::GetDefaultRoot
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition: TGClient.cxx:236
m
auto * m
Definition: textangle.C:8
TRootCanvas::fMenuBar
TGMenuBar * fMenuBar
menubar
Definition: TRootCanvas.h:41
kButton3Double
@ kButton3Double
Definition: Buttons.h:24
kToolsBrowser
@ kToolsBrowser
Definition: TRootCanvas.cxx:129
TRootContainer
Definition: TRootCanvas.cxx:229
kFatal
const Int_t kFatal
Definition: TError.h:49
TSystem::Unlink
virtual int Unlink(const char *name)
Unlink, i.e.
Definition: TSystem.cxx:1380
TRootCanvas::fCanvasID
Int_t fCanvasID
index in fWindows array of TGX11
Definition: TRootCanvas.h:78
kWheelUp
@ kWheelUp
Definition: Buttons.h:18
kButton2
@ kButton2
Definition: GuiTypes.h:214
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
GET_MSG
Int_t GET_MSG(Long_t val)
Definition: WidgetMessageTypes.h:110
TRootCanvas::fToolBar
TGToolBar * fToolBar
icon button toolbar
Definition: TRootCanvas.h:62
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
TGFrame::GetHeight
UInt_t GetHeight() const
Definition: TGFrame.h:225
TRootCanvas::fStatusBar
TGStatusBar * fStatusBar
statusbar widget
Definition: TRootCanvas.h:55
TRootCanvas::fToolTip
TGToolTip * fToolTip
tooltip for object info
Definition: TRootCanvas.h:74
TRootCanvas::fMainFrameLayout
TGLayoutHints * fMainFrameLayout
layout for main frame
Definition: TRootCanvas.h:64
TCanvas::Clear
void Clear(Option_t *option="") override
Remove all primitives from the canvas.
Definition: TCanvas.cxx:725
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
kToolPad
@ kToolPad
Definition: TRootCanvas.cxx:147
kFileSaveAsPS
@ kFileSaveAsPS
Definition: TRootCanvas.cxx:83
TBrowser
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
TRootCanvas::fVertical2Layout
TGLayoutHints * fVertical2Layout
layout hints for separator
Definition: TRootCanvas.h:69
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
e
#define e(i)
Definition: RSha256.hxx:103
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
TRootCanvas::fButton
Int_t fButton
currently pressed button
Definition: TRootCanvas.h:80
TGMainFrame
Defines top level windows that interact with the system Window Manager.
Definition: TGFrame.h:398
TImage::SetEditable
virtual void SetEditable(Bool_t=kTRUE)
Definition: TImage.h:225
kToolMarker
@ kToolMarker
Definition: TRootCanvas.cxx:156
kOptionRefresh
@ kOptionRefresh
Definition: TRootCanvas.cxx:119
TDNDData::fDataLength
Int_t fDataLength
Length of data.
Definition: TGDNDManager.h:77
TRootCanvas::fEditorFrame
TGCompositeFrame * fEditorFrame
side frame for current pad editor
Definition: TRootCanvas.h:58
kFileQuit
@ kFileQuit
Definition: TRootCanvas.cxx:92
TCanvas::ToggleAutoExec
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
Definition: TCanvas.cxx:2435
kAnyModifier
const Mask_t kAnyModifier
Definition: GuiTypes.h:210
f
#define f(i)
Definition: RSha256.hxx:104
TCanvas::GetAutoExec
Bool_t GetAutoExec() const
Definition: TCanvas.h:150
kHelpOnGraphicsEd
@ kHelpOnGraphicsEd
Definition: TRootCanvas.cxx:136
kViewMarkers
@ kViewMarkers
Definition: TRootCanvas.cxx:109
Option_t
const char Option_t
Definition: RtypesCore.h:66
kButton2Double
@ kButton2Double
Definition: Buttons.h:24
TRootCanvas::ShowToolBar
void ShowToolBar(Bool_t show=kTRUE)
Show or hide toolbar.
Definition: TRootCanvas.cxx:1567
TRootCanvas::HandleContainerCrossing
Bool_t HandleContainerCrossing(Event_t *ev)
Handle enter/leave events. Only leave is activated at the moment.
Definition: TRootCanvas.cxx:1942
TGHorizontal3DLine
A horizontal 3D line is a line that typically separates a toolbar from the menubar.
Definition: TG3DLine.h:18
TSystem::ChangeDirectory
virtual Bool_t ChangeDirectory(const char *path)
Change directory.
Definition: TSystem.cxx:862
TRootContainer::HandleConfigureNotify
Bool_t HandleConfigureNotify(Event_t *ev)
This event is generated when the frame is resized.
Definition: TRootCanvas.cxx:238
TRootCanvas::CreateEditor
void CreateEditor()
Create embedded editor.
Definition: TRootCanvas.cxx:1547
TRootCanvas::HasStatusBar
Bool_t HasStatusBar() const
Returns kTRUE if the status bar is shown.
Definition: TRootCanvas.cxx:1669
TPad
The most important graphics class in the ROOT system.
Definition: TPad.h:26
kLeaveNotify
@ kLeaveNotify
Definition: GuiTypes.h:61
TBuffer::kRead
@ kRead
Definition: TBuffer.h:73
kPointerMotionMask
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:163
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
kToolsRecorder
@ kToolsRecorder
Definition: TRootCanvas.cxx:131
TRootCanvas::HandleContainerMotion
Bool_t HandleContainerMotion(Event_t *ev)
Handle mouse motion event in the canvas container.
Definition: TRootCanvas.cxx:1908
kButton1Motion
@ kButton1Motion
Definition: Buttons.h:20
TPad::Modified
void Modified(Bool_t flag=1) override
Definition: TPad.h:414
TRootCanvas::SetWindowTitle
void SetWindowTitle(const char *newTitle)
Change title on window.
Definition: TRootCanvas.cxx:1315
gEnv
R__EXTERN TEnv * gEnv
Definition: TEnv.h:170
TRootCanvas::HasMenuBar
Bool_t HasMenuBar() const
Returns kTRUE if the menu bar is shown.
Definition: TRootCanvas.cxx:1661
TGToolTip::SetPosition
void SetPosition(Int_t x, Int_t y)
Set popup position within specified frame (as specified in the ctor).
Definition: TGToolTip.cxx:409
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
kAnyButton
@ kAnyButton
Definition: GuiTypes.h:214
TString::Data
const char * Data() const
Definition: TString.h:369
kEditCut
@ kEditCut
Definition: TRootCanvas.cxx:95
kLHintsTop
@ kLHintsTop
Definition: TGLayout.h:27
TGDockableFrame::SetWindowName
void SetWindowName(const char *name)
Set window name so it appear as title of the undock window.
Definition: TGDockableFrame.cxx:445
TRootCanvas.h
TVirtualPadEditor::GetCanvas
virtual TCanvas * GetCanvas() const =0
TRootCanvas::fCanvasLayout
TGLayoutHints * fCanvasLayout
layout for canvas widget
Definition: TRootCanvas.h:54
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
Form
char * Form(const char *fmt,...)
kNotifyNormal
@ kNotifyNormal
Definition: GuiTypes.h:219
TGTextEditDialogs.h
kOptionResizeOpaque
@ kOptionResizeOpaque
Definition: TRootCanvas.cxx:117
kFilePrint
@ kFilePrint
Definition: TRootCanvas.cxx:90
TCanvas::Paint
void Paint(Option_t *option="") override
Paint canvas.
Definition: TCanvas.cxx:1543
TGPrintDialog
Definition: TGTextEditDialogs.h:78
kFileSaveAs
@ kFileSaveAs
Definition: TRootCanvas.cxx:80
TCanvas::ResizeOpaque
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
Definition: TCanvas.cxx:1762
TRootCanvas::fViewMenu
TGPopupMenu * fViewMenu
view menu
Definition: TRootCanvas.h:46
ERootCanvasCommands
ERootCanvasCommands
Definition: TRootCanvas.cxx:77
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
TObject::Error
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:893
TGPopupMenu::AddLabel
virtual void AddLabel(TGHotString *s, const TGPicture *p=nullptr, TGMenuEntry *before=nullptr)
Add a menu label to the menu.
Definition: TGMenu.cxx:1095
TGPopupMenu::AddSeparator
virtual void AddSeparator(TGMenuEntry *before=nullptr)
Add a menu separator to the menu.
Definition: TGMenu.cxx:1060
TCanvasImp::fCanvas
TCanvas * fCanvas
Definition: TCanvasImp.h:34
gHelpPostscript
R__EXTERN const char gHelpPostscript[]
Definition: HelpText.h:21
kToolsBuilder
@ kToolsBuilder
Definition: TRootCanvas.cxx:130
kButton1Up
@ kButton1Up
Definition: Buttons.h:19
TVirtualPadEditor::LoadEditor
static TVirtualPadEditor * LoadEditor()
Static function returning a pointer to a new pad editor.
Definition: TVirtualPadEditor.cxx:47
TGedEditor.h
TGToolBar
A toolbar is a composite frame that contains TGPictureButtons.
Definition: TGToolBar.h:33
kButton4
@ kButton4
Definition: GuiTypes.h:215
TGWindow::kEditDisable
@ kEditDisable
disable edit of this window
Definition: TGWindow.h:50
TRootCanvas::fToolsMenu
TGPopupMenu * fToolsMenu
tools menu
Definition: TRootCanvas.h:49
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
TStyle::GetOptFit
Int_t GetOptFit() const
Definition: TStyle.h:235
gHelpGraphicsEditor
R__EXTERN const char gHelpGraphicsEditor[]
Definition: HelpText.h:23
TStyle.h
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TVirtualPad::cd
virtual TVirtualPad * cd(Int_t subpadnumber=0)=0
TRootCanvas::fHorizontal1
TGHorizontal3DLine * fHorizontal1
toolbar separator
Definition: TRootCanvas.h:67
TRootContainer::HandleButton
Bool_t HandleButton(Event_t *ev)
Directly handle scroll mouse buttons (4 and 5), only pass buttons 1, 2 and 3 on to the TCanvas.
Definition: TRootCanvas.cxx:274
gTQSender
R__EXTERN void * gTQSender
Definition: TQObject.h:44
TPad::Print
void Print(const char *filename="") const override
Save Pad contents in a file in one of various formats.
Definition: TPad.cxx:4689
EEventType
EEventType
Definition: Buttons.h:15
kToolLatex
@ kToolLatex
Definition: TRootCanvas.cxx:155
kFileSaveAsRoot
@ kFileSaveAsRoot
Definition: TRootCanvas.cxx:81
TRootCanvas::HasToolTips
Bool_t HasToolTips() const
Returns kTRUE if the tooltips are enabled.
Definition: TRootCanvas.cxx:1685
TRootCanvas::fDockLayout
TGLayoutHints * fDockLayout
layout hints for dockable frame widget
Definition: TRootCanvas.h:72
TGFileInfo::SetIniDir
void SetIniDir(const char *inidir)
Set directory name.
Definition: TGFileDialog.cxx:116
TRootContainer::fCanvas
TRootCanvas * fCanvas
Definition: TRootCanvas.cxx:231
TBrowser.h
kToolPLabel
@ kToolPLabel
Definition: TRootCanvas.cxx:149
HelpText.h
kToolCutG
@ kToolCutG
Definition: TRootCanvas.cxx:157
kFileCloseCanvas
@ kFileCloseCanvas
Definition: TRootCanvas.cxx:91
TWin32SplashThread.h
TString::Contains
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:624
TImage
An abstract interface to image processing library.
Definition: TImage.h:29
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
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
TGDockableFrame.h
TGToolTip::SetText
void SetText(const char *new_text)
Set new tool tip text.
Definition: TGToolTip.cxx:390
TString::Length
Ssiz_t Length() const
Definition: TString.h:410
TRootCanvas::GetWindowGeometry
UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h)
Gets the size and position of the window containing the canvas.
Definition: TRootCanvas.cxx:739
kHelpOnMenus
@ kHelpOnMenus
Definition: TRootCanvas.cxx:135
TClass.h
TGToolTip
Definition: TGToolTip.h:24
kButton1Shift
@ kButton1Shift
Definition: Buttons.h:18
kButton1
@ kButton1
Definition: GuiTypes.h:214
TCanvas::SetSupportGL
void SetSupportGL(Bool_t support)
Definition: TCanvas.h:224
TGMainFrame::SetWindowName
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1764
TRootCanvas::AdjustSize
void AdjustSize()
Keep the same canvas size while docking/undocking toolbar.
Definition: TRootCanvas.cxx:1693
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
TVirtualPadEditor::Hide
virtual void Hide()
Definition: TVirtualPadEditor.h:50
kHelpOnPS
@ kHelpOnPS
Definition: TRootCanvas.cxx:139
TSystem::TempFileName
virtual FILE * TempFileName(TString &base, const char *dir=nullptr)
Create a secure temporary file by appending a unique 6 letter string to base.
Definition: TSystem.cxx:1496
TVirtualX.h
TRootCanvas::ProcessMessage
Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2)
Handle menu and other command generated by the user.
Definition: TRootCanvas.cxx:761
TCanvas::UseGL
Bool_t UseGL() const
Definition: TCanvas.h:223
TGVertical3DLine
A vertical 3D line is a line that can be used to separate groups of widgets.
Definition: TG3DLine.h:33
TRootControlBar.h
TRootHelpDialog::SetText
void SetText(const char *helpText)
Set help text from helpText buffer in TGTextView.
Definition: TRootHelpDialog.cxx:77
TPad::Update
void Update() override
Update pad.
Definition: TPad.cxx:2856
TColorWheel::Draw
virtual void Draw(Option_t *option="")
Paint the color wheel.
Definition: TColorWheel.cxx:120
kFileSaveAsTEX
@ kFileSaveAsTEX
Definition: TRootCanvas.cxx:89
kMouseMotion
@ kMouseMotion
Definition: Buttons.h:23
kInspectRoot
@ kInspectRoot
Definition: TRootCanvas.cxx:126
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
TCanvas.h
TGPopupMenu::DisableEntry
virtual void DisableEntry(Int_t id)
Disable entry (disabled entries appear in a sunken relieve).
Definition: TGMenu.cxx:1724
TEnv.h
kOptionCanEdit
@ kOptionCanEdit
Definition: TRootCanvas.cxx:124
TSystem::Load
virtual int Load(const char *module, const char *entry="", Bool_t system=kFALSE)
Load a shared library.
Definition: TSystem.cxx:1854
TImage::Open
static TImage * Open(const char *file, EImageFileTypes type=kUnknown)
Open a specified image file.
Definition: TImage.cxx:118
TRootCanvas::fEditClearMenu
TGPopupMenu * fEditClearMenu
clear cascade submenu
Definition: TRootCanvas.h:45
TGDNDManager.h
kViewEditor
@ kViewEditor
Definition: TRootCanvas.cxx:103
TRootCanvas::fToolBarSep
TGHorizontal3DLine * fToolBarSep
toolbar separator
Definition: TRootCanvas.h:63
TString
Basic string class.
Definition: TString.h:136
kButtonPressMask
const Mask_t kButtonPressMask
Definition: GuiTypes.h:161
TWin32SplashThread
Definition: TWin32SplashThread.h:18
TRootCanvas::fAutoFit
Bool_t fAutoFit
when true canvas container keeps same size as canvas
Definition: TRootCanvas.h:79
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
TClassTree.h
TGCanvas::GetVsbPosition
virtual Int_t GetVsbPosition() const
Get position of vertical scrollbar.
Definition: TGCanvas.cxx:2384
kDoubleBorder
@ kDoubleBorder
Definition: GuiTypes.h:385
TCanvas::SaveSource
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Definition: TCanvas.cxx:1826
TObject::InheritsFrom
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Definition: TObject.cxx:445
TGFrame::SetHeight
virtual void SetHeight(UInt_t h)
Definition: TGFrame.h:247
TCanvas::OpaqueResizing
Bool_t OpaqueResizing() const override
Definition: TCanvas.h:178
TFile.h
TGToolBar.h
TRootCanvas::ShowMenuBar
void ShowMenuBar(Bool_t show=kTRUE)
Show or hide menubar.
Definition: TRootCanvas.cxx:1433
TGCanvas::SetVsbPosition
virtual void SetVsbPosition(Int_t newPos)
Set position of vertical scrollbar.
Definition: TGCanvas.cxx:2408
TRootCanvas::Iconify
void Iconify()
Definition: TRootCanvas.h:115
bool
TSystem::WorkingDirectory
virtual const char * WorkingDirectory()
Return working directory.
Definition: TSystem.cxx:871
TRootCanvas::fFileSaveMenu
TGPopupMenu * fFileSaveMenu
save cascade submenu
Definition: TRootCanvas.h:43
kOptionAutoResize
@ kOptionAutoResize
Definition: TRootCanvas.cxx:114
kLeaveWindowMask
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:168
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
TStyle::SetOptFit
void SetOptFit(Int_t fit=1)
The type of information about fit parameters printed in the histogram statistics box can be selected ...
Definition: TStyle.cxx:1541
kToolArc
@ kToolArc
Definition: TRootCanvas.cxx:142
TRootCanvas::InitWindow
Int_t InitWindow()
Called by TCanvas ctor to get window indetifier.
Definition: TRootCanvas.cxx:1251
object
TRootCanvas::fVertical1
TGVertical3DLine * fVertical1
toolbar vertical separator
Definition: TRootCanvas.h:65
id
XFontStruct * id
Definition: TGX11.cxx:109
TGFileInfo::fFileTypeIdx
Int_t fFileTypeIdx
selected file type, index in fFileTypes
Definition: TGFileDialog.h:49
TCanvas::OpaqueMoving
Bool_t OpaqueMoving() const override
Definition: TCanvas.h:177
TCanvas::HandleInput
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Definition: TCanvas.cxx:1223
TGFileDialog.h
kOptionResizeCanvas
@ kOptionResizeCanvas
Definition: TRootCanvas.cxx:115
TImage.h
TRootContainer::HandleExpose
Bool_t HandleExpose(Event_t *ev)
Definition: TRootCanvas.cxx:245
TGFrame::GetOptions
virtual UInt_t GetOptions() const
Definition: TGFrame.h:197
TVirtualPadEditor::GetPadEditor
static TVirtualPadEditor * GetPadEditor(Bool_t load=kTRUE)
Returns the pad editor dialog. Static method.
Definition: TVirtualPadEditor.cxx:74
TRootBrowser::GetActFrame
TGFrame * GetActFrame() const
Definition: TRootBrowser.h:137
TROOT.h
TGMenuBar::AddPopup
virtual void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
Add popup menu to menu bar.
Definition: TGMenu.cxx:418
TRootCanvas::HandleContainerExpose
Bool_t HandleContainerExpose(Event_t *ev)
Handle expose events.
Definition: TRootCanvas.cxx:1930
TRootCanvas
This class creates a main window with menubar, scrollbars and a drawing area.
Definition: TRootCanvas.h:34
kViewToolTips
@ kViewToolTips
Definition: TRootCanvas.cxx:106
TGStatusBar
Provides a StatusBar widget.
Definition: TGStatusBar.h:21
gClient
#define gClient
Definition: TGClient.h:157
TRootCanvas::fEditMenu
TGPopupMenu * fEditMenu
edit menu
Definition: TRootCanvas.h:44
TCanvas::cd
TVirtualPad * cd(Int_t subpadnumber=0) override
Set current canvas & pad.
Definition: TCanvas.cxx:706
TRootCanvas::TRootContainer
friend class TRootContainer
Definition: TRootCanvas.h:36
kLHintsBottom
@ kLHintsBottom
Definition: TGLayout.h:29
TDNDData::fDataType
Atom_t fDataType
Data type description.
Definition: TGDNDManager.h:74
TRootContainer::HandleCrossing
Bool_t HandleCrossing(Event_t *ev)
Definition: TRootCanvas.cxx:247
TApplication.h
TGDockableFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *hints)
Add frame to dockable frame container. Frame and hints are NOT adopted.
Definition: TGDockableFrame.cxx:276
TObject::GetName
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:359
TRootContainer::TRootContainer
TRootContainer(TRootCanvas *c, Window_t id, const TGWindow *parent)
Create a canvas container.
Definition: TRootCanvas.cxx:256
TRootCanvas::fToolDock
TGDockableFrame * fToolDock
dockable frame holding the toolbar
Definition: TRootCanvas.h:71
TRootCanvas::fMenuBarItemLayout
TGLayoutHints * fMenuBarItemLayout
layout hints for menu in menubar
Definition: TRootCanvas.h:52
TPluginHandler
Definition: TPluginManager.h:101
kWheelDown
@ kWheelDown
Definition: Buttons.h:18
TGFrame::AddInput
void AddInput(UInt_t emask)
Add events specified in the emask to the events the frame should handle.
Definition: TGFrame.cxx:339
kNone
const Handle_t kNone
Definition: GuiTypes.h:88
kViewIconify
@ kViewIconify
Definition: TRootCanvas.cxx:110
kToolLine
@ kToolLine
Definition: TRootCanvas.cxx:143
kViewOpenGL
@ kViewOpenGL
Definition: TRootCanvas.cxx:112
TGFrame::DeleteWindow
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:276
TGToolTip::Reset
void Reset()
Reset tool tip popup delay timer.
Definition: TGToolTip.cxx:263
kClassesTree
@ kClassesTree
Definition: TRootCanvas.cxx:127
TGCompositeFrame::ChangeOptions
virtual void ChangeOptions(UInt_t options)
Change composite frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:1043
TRootCanvas::ShowEditor
void ShowEditor(Bool_t show=kTRUE)
Show or hide side frame.
Definition: TRootCanvas.cxx:1467
TPad::cd
TVirtualPad * cd(Int_t subpadnumber=0) override
Set Current pad.
Definition: TPad.cxx:604
TRootBrowser::GetTabLeft
TGTab * GetTabLeft() const
Definition: TRootBrowser.h:140
TGFileInfo::fOverwrite
Bool_t fOverwrite
if true overwrite the file with existing name on save
Definition: TGFileDialog.h:50
TG3DLine.h
TColorWheel
Draw the ROOT Color Wheel.
Definition: TColorWheel.h:23
TApplication::ReturnFromRun
Bool_t ReturnFromRun() const
Definition: TApplication.h:148
kSunkenFrame
@ kSunkenFrame
Definition: GuiTypes.h:383
TMath::Nint
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Definition: TMath.h:713
TGMainFrame::SendCloseMessage
virtual void SendCloseMessage()
Send close message to self.
Definition: TGFrame.cxx:1720
kOptionHistTitle
@ kOptionHistTitle
Definition: TRootCanvas.cxx:122
TGMainFrame::SetClassHints
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition: TGFrame.cxx:1832
TBuffer::SetReadMode
void SetReadMode()
Set buffer in read mode.
Definition: TBuffer.cxx:302
TVirtualPadEditor.h
TRootCanvas::fHorizontal1Layout
TGLayoutHints * fHorizontal1Layout
layout hints for separator
Definition: TRootCanvas.h:70
TDNDData::fData
void * fData
Actual data.
Definition: TGDNDManager.h:76
TCanvas::MoveOpaque
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Definition: TCanvas.cxx:1535
TRootCanvas::ReallyDelete
void ReallyDelete()
Really delete the canvas and this GUI.
Definition: TRootCanvas.cxx:688
TCanvas::GetShowToolTips
Bool_t GetShowToolTips() const
Definition: TCanvas.h:149
gStyle
R__EXTERN TStyle * gStyle
Definition: TStyle.h:412
kFileSaveAsGIF
@ kFileSaveAsGIF
Definition: TRootCanvas.cxx:86
TClassTree
Draw inheritance tree and their relations for a list of classes.
Definition: TClassTree.h:22
TSystem.h
kToolPText
@ kToolPText
Definition: TRootCanvas.cxx:150
kButton1Double
@ kButton1Double
Definition: Buttons.h:24
kOtherEvent
@ kOtherEvent
Definition: GuiTypes.h:64
kKeyRelease
@ kKeyRelease
Definition: GuiTypes.h:60
TGClient::GetDisplayHeight
UInt_t GetDisplayHeight() const
Get display height.
Definition: TGClient.cxx:277
gToolBarData
static ToolBarData_t gToolBarData[]
Definition: TRootCanvas.cxx:182
TStyle::GetOptTitle
Int_t GetOptTitle() const
Definition: TStyle.h:237
kToolArrow
@ kToolArrow
Definition: TRootCanvas.cxx:144
h
#define h(i)
Definition: RSha256.hxx:106
kGKeyPress
@ kGKeyPress
Definition: GuiTypes.h:60
TMarker.h
kFileSaveAsEPS
@ kFileSaveAsEPS
Definition: TRootCanvas.cxx:84
kButton3
@ kButton3
Definition: GuiTypes.h:214
TGWindow::GetName
virtual const char * GetName() const
Return unique name, used in SavePrimitive methods.
Definition: TGWindow.cxx:336
TGCompositeFrame::MapSubwindows
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1164
TRootCanvas::RaiseWindow
void RaiseWindow()
Put canvas window on top of the window stack.
Definition: TRootCanvas.cxx:1307
kOptionAutoExec
@ kOptionAutoExec
Definition: TRootCanvas.cxx:120
TRootCanvas::HandleDNDPosition
Atom_t HandleDNDPosition(Int_t x, Int_t y, Atom_t action, Int_t xroot, Int_t yroot)
Handle dragging position events.
Definition: TRootCanvas.cxx:2017
TRootContainer::SavePrimitive
void SavePrimitive(std::ostream &out, Option_t *="")
Save a canvas container as a C++ statement(s) on output stream out.
Definition: TRootCanvas.cxx:2080
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
TCanvas::ToggleToolBar
virtual void ToggleToolBar()
Toggle toolbar.
Definition: TCanvas.cxx:2455
TString::Remove
TString & Remove(Ssiz_t pos)
Definition: TString.h:673
Atom_t
Handle_t Atom_t
WM token.
Definition: GuiTypes.h:37
TRootCanvas::fMainFrame
TGCompositeFrame * fMainFrame
main frame containing canvas and side frame
Definition: TRootCanvas.h:60
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
kToolEllipse
@ kToolEllipse
Definition: TRootCanvas.cxx:146
TRootCanvas::SetWindowPosition
void SetWindowPosition(Int_t x, Int_t y)
Set canvas position (units in pixels).
Definition: TRootCanvas.cxx:1282
TSystem::Exec
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition: TSystem.cxx:655
TRootContainer::HandleDoubleClick
Bool_t HandleDoubleClick(Event_t *ev)
Definition: TRootCanvas.cxx:236
TRootCanvas::ShowToolTips
void ShowToolTips(Bool_t show=kTRUE)
Enable or disable tooltip info.
Definition: TRootCanvas.cxx:1642
kViewToolbar
@ kViewToolbar
Definition: TRootCanvas.cxx:104
kHelpOnBrowser
@ kHelpOnBrowser
Definition: TRootCanvas.cxx:137
TRootContainer::HandleMotion
Bool_t HandleMotion(Event_t *ev)
Definition: TRootCanvas.cxx:243
TGCompositeFrame::HideFrame
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1190
kButtonPress
@ kButtonPress
Definition: GuiTypes.h:60
kCM_BUTTON
@ kCM_BUTTON
Definition: WidgetMessageTypes.h:34
Long_t
long Long_t
Definition: RtypesCore.h:54
TRootCanvas::HandleContainerKey
Bool_t HandleContainerKey(Event_t *ev)
Handle keyboard events in the canvas container.
Definition: TRootCanvas.cxx:1808
kLHintsRight
@ kLHintsRight
Definition: TGLayout.h:26
kButtonReleaseMask
const Mask_t kButtonReleaseMask
Definition: GuiTypes.h:162
TRootCanvas::fVertical1Layout
TGLayoutHints * fVertical1Layout
layout hints for separator
Definition: TRootCanvas.h:68
TVirtualPadEditor::Show
virtual void Show()
Definition: TVirtualPadEditor.h:49
TGFileInfo
Definition: TGFileDialog.h:39
kButtonRelease
@ kButtonRelease
Definition: GuiTypes.h:60
kToolCurlyLine
@ kToolCurlyLine
Definition: TRootCanvas.cxx:153
TBufferFile::ReadObjectAny
void * ReadObjectAny(const TClass *cast) override
Read object from I/O buffer.
Definition: TBufferFile.cxx:2348
TGLayoutHints
This class describes layout hints used by the layout classes.
Definition: TGLayout.h:50
TRootHelpDialog.h
TCanvasImp
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition: TCanvasImp.h:30
TGDockableFrame
A frame with handles that allow it to be undocked (i.e.
Definition: TGDockableFrame.h:82
gApplication
R__EXTERN TApplication * gApplication
Definition: TApplication.h:165
StrDup
char * StrDup(const char *str)
Duplicate the string str.
Definition: TString.cxx:2515
kViewX3D
@ kViewX3D
Definition: TRootCanvas.cxx:111
TTimer::SingleShot
static void SingleShot(Int_t milliSec, const char *receiver_class, void *receiver, const char *method)
This static function calls a slot after a given time interval.
Definition: TTimer.cxx:256
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
gGLManager
#define gGLManager
Definition: TVirtualGL.h:162
kEditClearPad
@ kEditClearPad
Definition: TRootCanvas.cxx:98
TGViewPort
Definition: TGCanvas.h:158
Window_t
Handle_t Window_t
Window handle.
Definition: GuiTypes.h:29
TString::BeginsWith
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
Definition: TString.h:615
TRootBrowser::GetTabRight
TGTab * GetTabRight() const
Definition: TRootBrowser.h:141
TGTab.h
kFixedSize
@ kFixedSize
Definition: GuiTypes.h:390
kEditCopy
@ kEditCopy
Definition: TRootCanvas.cxx:96
kHelpOnObjects
@ kHelpOnObjects
Definition: TRootCanvas.cxx:138
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
TRootCanvas::fViewWithMenu
TGPopupMenu * fViewWithMenu
view with... cascade submenu
Definition: TRootCanvas.h:47
y
Double_t y[n]
Definition: legend1.C:17
TApplication::Terminate
virtual void Terminate(Int_t status=0)
TCanvas::GetWindowHeight
UInt_t GetWindowHeight() const
Definition: TCanvas.h:160
kEditClearCanvas
@ kEditClearCanvas
Definition: TRootCanvas.cxx:99
TGPopupMenu::Associate
virtual void Associate(const TGWindow *w)
Definition: TGMenu.h:206
ULong_t
unsigned long ULong_t
Definition: RtypesCore.h:55
TDNDData
Drag and drop data container.
Definition: TGDNDManager.h:64
kLHintsExpandY
@ kLHintsExpandY
Definition: TGLayout.h:31
kOptionStatistics
@ kOptionStatistics
Definition: TRootCanvas.cxx:121
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
TCanvas::SetName
void SetName(const char *name="") override
Set canvas name. In case name is an empty string, a default name is set.
Definition: TCanvas.cxx:2062
kButton2Motion
@ kButton2Motion
Definition: Buttons.h:20
TGCompositeFrame::MustCleanup
virtual Int_t MustCleanup() const
Definition: TGFrame.h:361
kButton3Down
@ kButton3Down
Definition: Buttons.h:17
TSystem::Sleep
virtual void Sleep(UInt_t milliSec)
Sleep milliSec milli seconds.
Definition: TSystem.cxx:439
TGClient.h
TCanvas::ToggleToolTips
virtual void ToggleToolTips()
Toggle tooltip display.
Definition: TCanvas.cxx:2477
kFDSave
@ kFDSave
Definition: TGFileDialog.h:22
kHelpAbout
@ kHelpAbout
Definition: TRootCanvas.cxx:133
TCanvas::ToggleEventStatus
virtual void ToggleEventStatus()
Toggle event statusbar.
Definition: TCanvas.cxx:2444
TObject::Warning
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:879
gSaveAsTypes
static const char * gSaveAsTypes[]
Definition: TRootCanvas.cxx:165
TUrl
This class represents a WWW compatible URL.
Definition: TUrl.h:33
TRootCanvas::fEditor
TVirtualPadEditor * fEditor
pointer to currently loaded pad editor
Definition: TRootCanvas.h:76
TRootCanvas::fOptionMenu
TGPopupMenu * fOptionMenu
option menu
Definition: TRootCanvas.h:48
kKeyPressMask
const Mask_t kKeyPressMask
Definition: GuiTypes.h:159
TStyle::SetOptStat
void SetOptStat(Int_t stat=1)
The type of information printed in the histogram statistics box can be selected via the parameter mod...
Definition: TStyle.cxx:1589
TStyle::SetOptTitle
void SetOptTitle(Int_t tit=1)
Definition: TStyle.h:318
gOpenTypes
static const char * gOpenTypes[]
Definition: TRootCanvas.cxx:161
TRootCanvas::CreateCanvas
void CreateCanvas(const char *name)
Create the actual canvas.
Definition: TRootCanvas.cxx:332
TFile
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
Definition: TFile.h:54
TGWidget.h
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
TPluginHandler::ExecPlugin
Longptr_t ExecPlugin(int nargs, const T &... params)
Definition: TPluginManager.h:165
unsigned int
TRootCanvas::fCanvasWindow
TGCanvas * fCanvasWindow
canvas widget
Definition: TRootCanvas.h:39
TCanvas::Pick
TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj) override
Search for an object at pixel position px,py.
Definition: TCanvas.h:180
TUrl::GetFile
const char * GetFile() const
Definition: TUrl.h:69
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
kArrowKeyPress
@ kArrowKeyPress
Definition: Buttons.h:21
TRootCanvas::HandleDNDDrop
Bool_t HandleDNDDrop(TDNDData *data)
Handle drop events.
Definition: TRootCanvas.cxx:1958
gSystem
R__EXTERN TSystem * gSystem
Definition: TSystem.h:559
kEditUndo
@ kEditUndo
Definition: TRootCanvas.cxx:100
kFitPanel
@ kFitPanel
Definition: TRootCanvas.cxx:128
TRootCanvas::HandleContainerButton
Bool_t HandleContainerButton(Event_t *ev)
Handle mouse button events in the canvas container.
Definition: TRootCanvas.cxx:1720
TRootCanvas::Close
void Close()
Called via TCanvasImp interface by TCanvas.
Definition: TRootCanvas.cxx:671
TCanvasImp::TCanvas
friend class TCanvas
Definition: TCanvasImp.h:31
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
TGFileInfo::fIniDir
char * fIniDir
on input: initial directory, on output: new directory
Definition: TGFileDialog.h:47
kHelpOnCanvas
@ kHelpOnCanvas
Definition: TRootCanvas.cxx:134
TRootCanvas::SetWindowSize
void SetWindowSize(UInt_t w, UInt_t h)
Set size of canvas (units in pixels).
Definition: TRootCanvas.cxx:1290
TGWindow::GetParent
const TGWindow * GetParent() const
Definition: TGWindow.h:76
TObject::Draw
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
Definition: TObject.cxx:197
gErrorIgnoreLevel
R__EXTERN Int_t gErrorIgnoreLevel
Definition: TError.h:127
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
TPluginHandler::LoadPlugin
Int_t LoadPlugin()
Load the plugin library for this handler.
Definition: TPluginManager.cxx:254
kButton1Down
@ kButton1Down
Definition: Buttons.h:17
TRootCanvas::PrintCanvas
void PrintCanvas()
Print the canvas.
Definition: TRootCanvas.cxx:1342
kExposureMask
const Mask_t kExposureMask
Definition: GuiTypes.h:165
TString::IsNull
Bool_t IsNull() const
Definition: TString.h:407
TRootCanvas::fIconPic
const TGPicture * fIconPic
icon picture
Definition: TRootCanvas.h:73
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
TMarker::DisplayMarkerTypes
static void DisplayMarkerTypes()
Display the table of markers with their numbers.
Definition: TMarker.cxx:85
TRootCanvas::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: TRootCanvas.cxx:1402
TVirtualGL.h
TSystem::TempDirectory
virtual const char * TempDirectory() const
Return a user configured or systemwide directory to create temporary files in.
Definition: TSystem.cxx:1481
TPluginManager.h
ToolBarData_t
Definition: TGToolBar.h:23
TGFrame::SetWidth
virtual void SetWidth(UInt_t w)
Definition: TGFrame.h:246
TCanvas
The Canvas class.
Definition: TCanvas.h:23
TGDockableFrame::DockContainer
void DockContainer(Int_t del=kTRUE)
Dock container back to TGDockableFrame.
Definition: TGDockableFrame.cxx:325
TRootCanvas::fCanvasContainer
TRootContainer * fCanvasContainer
container in canvas widget
Definition: TRootCanvas.h:40
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
TGWindow::GetMainFrame
virtual const TGWindow * GetMainFrame() const
Returns top level main frame.
Definition: TGWindow.cxx:152
TInterpreter.h
TGDockableFrame::EnableHide
void EnableHide(Bool_t onoff)
Enable hiding.
Definition: TGDockableFrame.cxx:432
gHelpAbout
R__EXTERN const char gHelpAbout[]
Definition: HelpText.h:17
TPad::HasFixedAspectRatio
Bool_t HasFixedAspectRatio() const override
Definition: TPad.h:264
TRootCanvas::HasEditor
Bool_t HasEditor() const
Returns kTRUE if the editor is shown.
Definition: TRootCanvas.cxx:1653
TRootCanvas::HandleDNDLeave
Bool_t HandleDNDLeave()
Handle drag leave events.
Definition: TRootCanvas.cxx:2050
kC_COMMAND
@ kC_COMMAND
Definition: WidgetMessageTypes.h:31
TCanvas::SetCanvasImp
void SetCanvasImp(TCanvasImp *i)
Definition: TCanvas.h:201
TGFrame::Move
virtual void Move(Int_t x, Int_t y)
Move frame.
Definition: TGFrame.cxx:593
TGWindow::kEditEnable
@ kEditEnable
allow edit of this window
Definition: TGWindow.h:49
TCanvas::Resize
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Definition: TCanvas.cxx:1668
TRootCanvas::fStatusBarLayout
TGLayoutHints * fStatusBarLayout
layout hints for statusbar
Definition: TRootCanvas.h:56
TRootContainer::SetEditable
void SetEditable(Bool_t)
Switch ON/OFF edit mode.
Definition: TRootCanvas.cxx:250
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TBufferFile.h
TRootCanvas::GetCheight
UInt_t GetCheight() const
Return height of canvas container.
Definition: TRootCanvas.cxx:730
TGToolTip.h
TRootCanvas::fHelpMenu
TGPopupMenu * fHelpMenu
help menu
Definition: TRootCanvas.h:50
gHelpBrowser
R__EXTERN const char gHelpBrowser[]
Definition: HelpText.h:18
kFileOpen
@ kFileOpen
Definition: TRootCanvas.cxx:79
TGFrame::HandleConfigureNotify
virtual Bool_t HandleConfigureNotify(Event_t *event)
This event is generated when the frame is resized.
Definition: TGFrame.cxx:443
kKeyReleaseMask
const Mask_t kKeyReleaseMask
Definition: GuiTypes.h:160
TGPopupMenu
This class creates a popup menu object.
Definition: TGMenu.h:110
TGFrame::SetDNDTarget
void SetDNDTarget(Bool_t onoff)
Definition: TGFrame.h:270
kESC
@ kESC
Definition: Buttons.h:22
TRootCanvas::FitCanvas
void FitCanvas()
Fit canvas container to current window size.
Definition: TRootCanvas.cxx:1325
Event_t
Event structure.
Definition: GuiTypes.h:174
kEditStyle
@ kEditStyle
Definition: TRootCanvas.cxx:94
TGToolBar::AddButton
virtual TGButton * AddButton(const TGWindow *w, ToolBarData_t *button, Int_t spacing=0)
Add button to toolbar.
Definition: TGToolBar.cxx:92
GET_SUBMSG
Int_t GET_SUBMSG(Long_t val)
Definition: WidgetMessageTypes.h:111
name
char name[80]
Definition: TGX11.cxx:110
TRootCanvas::fEmbedded
Bool_t fEmbedded
true if embedded in any other frame (e.g. in the browser)
Definition: TRootCanvas.h:77
kButton5
@ kButton5
Definition: GuiTypes.h:215
TGMainFrame::fDNDTypeList
Atom_t * fDNDTypeList
handles DND types
Definition: TGFrame.h:414
TGCanvas.h
TGCanvas::SetContainer
virtual void SetContainer(TGFrame *f)
Definition: TGCanvas.h:222
kFileSaveAsJPG
@ kFileSaveAsJPG
Definition: TRootCanvas.cxx:87
gPad
#define gPad
Definition: TVirtualPad.h:287
TROOT::GetBinDir
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Definition: TROOT.cxx:2894
TRootCanvas::fMenuBarHelpLayout
TGLayoutHints * fMenuBarHelpLayout
layout hint for help menu in menubar
Definition: TRootCanvas.h:53
TString::kLeading
@ kLeading
Definition: TString.h:267
kFileSaveAsPNG
@ kFileSaveAsPNG
Definition: TRootCanvas.cxx:88
kLHintsExpandX
@ kLHintsExpandX
Definition: TGLayout.h:30
TRootCanvas::TRootCanvas
TRootCanvas(const TRootCanvas &)=delete
kViewFonts
@ kViewFonts
Definition: TRootCanvas.cxx:108
kOptionInterrupt
@ kOptionInterrupt
Definition: TRootCanvas.cxx:118
kStructureNotifyMask
const Mask_t kStructureNotifyMask
Definition: GuiTypes.h:166
kButton2Up
@ kButton2Up
Definition: Buttons.h:19
TGCompositeFrame::TGCompositeFrame
TGCompositeFrame(const TGCompositeFrame &)=delete
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
TStyle::GetOptStat
Int_t GetOptStat() const
Definition: TStyle.h:236
kToolDiamond
@ kToolDiamond
Definition: TRootCanvas.cxx:145
TRootCanvas::Activated
void Activated(Int_t id)
Slot handling tab switching in the browser, to properly set the canvas and the model to the editor.
Definition: TRootCanvas.cxx:2059
kFileSaveAsC
@ kFileSaveAsC
Definition: TRootCanvas.cxx:82
TRootCanvas::fToolBarLayout
TGLayoutHints * fToolBarLayout
layout for toolbar widget
Definition: TRootCanvas.h:61
TRootCanvas::fMenuBarLayout
TGLayoutHints * fMenuBarLayout
menubar layout hints
Definition: TRootCanvas.h:51
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
TRootCanvas::fVertical2
TGVertical3DLine * fVertical2
toolbar vertical separator
Definition: TRootCanvas.h:66
kButton2Down
@ kButton2Down
Definition: Buttons.h:17
kToolCurlyArc
@ kToolCurlyArc
Definition: TRootCanvas.cxx:154
kToolPsText
@ kToolPsText
Definition: TRootCanvas.cxx:151
TGMenuBar
The TGMenu.h header contains all different menu classes.
Definition: TGMenu.h:282
gThreadXAR
R__EXTERN Int_t(* gThreadXAR)(const char *xact, Int_t nb, void **ar, Int_t *iret)
Definition: TVirtualPad.h:289
TRootCanvas::SetCanvasSize
void SetCanvasSize(UInt_t w, UInt_t h)
Set size of canvas container. Units in pixels.
Definition: TRootCanvas.cxx:1264
TVirtualPadEditor
Abstract base class used by ROOT graphics editor.
Definition: TVirtualPadEditor.h:27
TGWindow::fEditDisabled
UInt_t fEditDisabled
flags used for "guibuilding"
Definition: TGWindow.h:32
kViewEventStatus
@ kViewEventStatus
Definition: TRootCanvas.cxx:105
TRootBrowser::kLeft
@ kLeft
Definition: TRootBrowser.h:121
TRootCanvas::CloseWindow
void CloseWindow()
In case window is closed via WM we get here.
Definition: TRootCanvas.cxx:714
TGCanvas::GetViewPort
TGViewPort * GetViewPort() const
Definition: TGCanvas.h:217
Class
void Class()
Definition: Class.C:29
TRootContainer::HandleKey
Bool_t HandleKey(Event_t *ev)
Definition: TRootCanvas.cxx:241
TGuiBuilder.h
TRootCanvas::fFileMenu
TGPopupMenu * fFileMenu
file menu
Definition: TRootCanvas.h:42
TGTab::GetTabTab
TGTabElement * GetTabTab(Int_t tabIndex) const
Return the tab element of tab with index tabIndex.
Definition: TGTab.cxx:663
TRootCanvas::~TRootCanvas
virtual ~TRootCanvas()
Delete ROOT basic canvas.
Definition: TRootCanvas.cxx:621
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TPad::SaveAs
void SaveAs(const char *filename="", Option_t *option="") const override
Save Pad contents in a file in one of various formats.
Definition: TPad.cxx:5632
kToolGraph
@ kToolGraph
Definition: TRootCanvas.cxx:152
TGClient::GetRoot
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:226
TGCanvas
A frame containing two scrollbars (a horizontal and a vertical) and a viewport.
Definition: TGCanvas.h:192
kArrowKeyRelease
@ kArrowKeyRelease
Definition: Buttons.h:21
TCanvas::Flush
void Flush()
Flush canvas buffers.
Definition: TCanvas.cxx:1132
TGToolTip::Hide
void Hide()
Hide tool tip window.
Definition: TGToolTip.cxx:250
TRootCanvas::GetCwidth
UInt_t GetCwidth() const
Return width of canvas container.
Definition: TRootCanvas.cxx:722
TRootApplication.h
kViewColors
@ kViewColors
Definition: TRootCanvas.cxx:107
TObject::ClassName
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:130
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
TPad::GetAspectRatio
Double_t GetAspectRatio() const override
Definition: TPad.h:218
TGMenu.h
kCM_MENU
@ kCM_MENU
Definition: WidgetMessageTypes.h:32
TRootCanvas::ShowStatusBar
void ShowStatusBar(Bool_t show=kTRUE)
Show or hide statusbar.
Definition: TRootCanvas.cxx:1442
TVirtualPadEditor::SetGlobal
virtual void SetGlobal(Bool_t)
Definition: TVirtualPadEditor.h:52
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1257
kToolPave
@ kToolPave
Definition: TRootCanvas.cxx:148
TBufferFile
The concrete implementation of TBuffer for writing/reading to/from a ROOT file or socket.
Definition: TBufferFile.h:47
TSystem::ProcessEvents
virtual Bool_t ProcessEvents()
Process pending events (GUI, timers, sockets).
Definition: TSystem.cxx:418
TColorWheel.h
TGCompositeFrame::ShowFrame
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1204
kFileSaveAsPDF
@ kFileSaveAsPDF
Definition: TRootCanvas.cxx:85
TRootCanvas::HandleContainerConfigure
Bool_t HandleContainerConfigure(Event_t *ev)
Handle configure (i.e. resize) event.
Definition: TRootCanvas.cxx:1786
TGDockableFrame::IsUndocked
Bool_t IsUndocked() const
Definition: TGDockableFrame.h:128
kOptionMoveOpaque
@ kOptionMoveOpaque
Definition: TRootCanvas.cxx:116
kFileNewCanvas
@ kFileNewCanvas
Definition: TRootCanvas.cxx:78
EGEventType
EGEventType
Definition: GuiTypes.h:59
kOptionFitParams
@ kOptionFitParams
Definition: TRootCanvas.cxx:123
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
TGedEditor
Definition: TGedEditor.h:31
TCanvasImp::Canvas
TCanvas * Canvas() const
Definition: TCanvasImp.h:55
TGWindow::fParent
const TGWindow * fParent
Parent window.
Definition: TGWindow.h:28
TRootCanvas::HandleDNDEnter
Atom_t HandleDNDEnter(Atom_t *typelist)
Handle drag enter events.
Definition: TRootCanvas.cxx:2033
kKeyShiftMask
const Mask_t kKeyShiftMask
Definition: GuiTypes.h:195
TCanvas::Update
void Update() override
Update canvas pad buffers.
Definition: TCanvas.cxx:2502
TCanvas::GetShowEditor
Bool_t GetShowEditor() const
Definition: TCanvas.h:148
TRootCanvas::HandleContainerDoubleClick
Bool_t HandleContainerDoubleClick(Event_t *ev)
Handle mouse button double click events in the canvas container.
Definition: TRootCanvas.cxx:1767
TList
A doubly linked list.
Definition: TList.h:44
TGMainFrame::SetWMPosition
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1855
TMath.h
kButton3Up
@ kButton3Up
Definition: Buttons.h:19
TRootHelpDialog
A TRootHelpDialog is used to display help text (or any text in a dialog window).
Definition: TRootHelpDialog.h:22
gToolBarData1
static ToolBarData_t gToolBarData1[]
Definition: TRootCanvas.cxx:197
main
int main(int argc, char *argv[])
Definition: cef_main.cxx:54
gROOT
#define gROOT
Definition: TROOT.h:404
TGFileDialog
This class creates a file selection dialog.
Definition: TGFileDialog.h:65
TPad::SetGLDevice
virtual void SetGLDevice(Int_t dev)
Definition: TPad.h:358
kFDOpen
@ kFDOpen
Definition: TGFileDialog.h:21
kEditRedo
@ kEditRedo
Definition: TRootCanvas.cxx:101
TGuiBuilder::Instance
static TGuiBuilder * Instance()
return an instance of TGuiBuilder object
Definition: TGuiBuilder.cxx:139
int
TRootBrowser
This class creates a ROOT object browser, constituted by three main tabs.
Definition: TRootBrowser.h:54
TError.h
TRootCanvas::fEditorLayout
TGLayoutHints * fEditorLayout
layout for editor frame
Definition: TRootCanvas.h:59
TGFileInfo::fFilename
char * fFilename
selected file name
Definition: TGFileDialog.h:46
TCanvas::ToggleEditor
virtual void ToggleEditor()
Toggle editor.
Definition: TCanvas.cxx:2466
TGMainFrame::GetWindowName
const char * GetWindowName() const
Definition: TGFrame.h:476
TGWindow::IsMapped
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
Definition: TGWindow.cxx:295