Logo ROOT  
Reference Guide
TGLSAViewer.cxx
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Timur Pocheptsov / Richard Maunder
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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 #include <memory>
13 
14 #include "TRootHelpDialog.h"
15 #include "TPluginManager.h"
16 #include "TApplication.h"
17 #include "TGClient.h"
18 #include "TGCanvas.h"
19 #include "HelpText.h"
20 #include "GuiTypes.h"
21 #include "TG3DLine.h"
22 #include "TSystem.h"
23 #include "TGFrame.h"
24 #include "TGMenu.h"
25 #include "TGSplitter.h"
26 #include "TGButton.h"
27 #include "snprintf.h"
28 
29 #include "TVirtualPad.h"
30 #include "TGedEditor.h"
31 #include "TRootEmbeddedCanvas.h"
32 #include "TString.h"
33 #include "TGFileDialog.h"
34 #include "TVirtualX.h"
35 
36 #include "TGLOutput.h"
37 #include "TGLFormat.h"
38 
39 #include "TGLLogicalShape.h"
40 #include "TGLPhysicalShape.h"
41 #include "TGLPShapeObj.h"
42 #include "TGLClip.h"
43 #include "TROOT.h"
44 
45 #ifdef WIN32
46 #include "TWin32SplashThread.h"
47 #endif
48 
49 #include "TGLWidget.h"
50 #include "TGLSAViewer.h"
51 #include "TGLSAFrame.h"
52 #include "TGLEventHandler.h"
53 
54 
55 const char * TGLSAViewer::fgHelpText1 = "\
56 DIRECT SCENE INTERACTIONS\n\n\
57  Press:\n\
58  \tw --- wireframe mode\n\
59  \te --- switch between dark / light color-set\n\
60  \tr --- filled polygons mode\n\
61  \tt --- outline mode\n\
62  \tj --- ZOOM in\n\
63  \tk --- ZOOM out\n\
64  \ta --- switch on/off arc-ball camera rotation control\n\
65  \tArrow Keys --- PAN (TRUCK) across scene\n\
66  \tHome --- reset current camera\n\
67  \tCtrl-Home --- switch external/automatic camera center\n\
68 \n\
69  LEFT mouse button -- ROTATE (ORBIT) the scene by holding the mouse button and moving\n\
70  the mouse (perspective camera, needs to be enabled in menu for orthographic cameras).\n\
71  By default, the scene will be rotated about its center. To select arbitrary center\n\
72  bring up the viewer-editor (e.g., shift-click into empty background) and use\n\
73  'Camera center' controls in the 'Guides' tab.\n\
74 \n\
75  MIDDLE mouse button or arrow keys -- PAN (TRUCK) the camera.\n\
76 \n\
77  RIGHT mouse button action depends on camera type:\n\
78  orthographic -- zoom,\n\
79  perspective -- move camera forwards / backwards\n\
80 \n\
81  By pressing Ctrl and Shift keys the mouse precision can be changed:\n\
82  Shift -- 10 times less precise\n\
83  Ctrl -- 10 times more precise\n\
84  Ctrl Shift -- 100 times more precise\n\
85 \n\
86  Mouse wheel action depends on camera type:\n\
87  orthographic -- zoom,\n\
88  perspective -- change field-of-view (focal length)\n\
89 \n\
90  To invert direction of mouse and key actions from scene-centric\n\
91  to viewer-centric, set in your .rootrc file:\n\
92  OpenGL.EventHandler.ViewerCentricControls: 1\n\
93 \n\
94  Double click will show GUI editor of the viewer (if assigned).\n\
95 \n\
96  RESET the camera via the button in viewer-editor or Home key.\n\
97 \n\
98  SELECT a shape with Shift+Left mouse button click.\n\
99 \n\
100  SELECT the viewer with Shift+Left mouse button click on a free space.\n\
101 \n\
102  MOVE a selected shape using Shift+Mid mouse drag.\n\
103 \n\
104  Invoke the CONTEXT menu with Shift+Right mouse click.\n\n"
105  "Secondary selection and direct render object interaction is initiated\n\
106  by Alt+Left mouse click (Mod1, actually). Only few classes support this option.\n\
107  When 'Alt' is taken by window manager, try Alt-Ctrl-Left.\n\
108 \n\
109 CAMERA\n\
110 \n\
111  The \"Camera\" menu is used to select the different projections from \n\
112  the 3D world onto the 2D viewport. There are three perspective cameras:\n\
113 \n\
114  \tPerspective (Floor XOZ)\n\
115  \tPerspective (Floor YOZ)\n\
116  \tPerspective (Floor XOY)\n\
117 \n\
118  In each case the floor plane (defined by two axes) is kept level.\n\
119 \n\
120  There are also four orthographic cameras:\n\
121 \n\
122  \tOrthographic (XOY)\n\
123  \tOrthographic (XOZ)\n\
124  \tOrthographic (ZOY)\n\
125  \tOrthographic (ZOX)\n\
126 \n\
127  In each case the first axis is placed horizontal, the second vertical e.g.\n\
128  XOY means X horizontal, Y vertical.\n\n";
129 
130 const char * TGLSAViewer::fgHelpText2 = "\
131 SHAPES COLOR AND MATERIAL\n\
132 \n\
133  The selected shape's color can be modified in the Shapes-Color tabs.\n\
134  Shape's color is specified by the percentage of red, green, blue light\n\
135  it reflects. A surface can reflect DIFFUSE, AMBIENT and SPECULAR light.\n\
136  A surface can also emit light. The EMISSIVE parameter allows to define it.\n\
137  The surface SHININESS can also be modified.\n\
138 \n\
139 SHAPES GEOMETRY\n\
140 \n\
141  The selected shape's location and geometry can be modified in the Shapes-Geom\n\
142  tabs by entering desired values in respective number entry controls.\n\
143 \n\
144 SCENE CLIPPING\n\
145 \n\
146  In the Scene-Clipping tabs select a 'Clip Type': None, Plane, Box\n\
147 \n\
148  For 'Plane' and 'Box' the lower pane shows the relevant parameters:\n\
149 \n\
150 \tPlane: Equation coefficients of form aX + bY + cZ + d = 0\n\
151 \tBox: Center X/Y/Z and Length X/Y/Z\n\n"
152  "For Box checking the 'Show / Edit' checkbox shows the clip box (in light blue)\n\
153  in viewer. It also attaches the current manipulator to the box - enabling\n\
154  direct editing in viewer.\n\
155 \n\
156 MANIPULATORS\n\
157 \n\
158  A widget attached to the selected object - allowing direct manipulation\n\
159  of the object with respect to its local axes.\n\
160 \n\
161  There are three modes, toggled with keys while manipulator is active, that is,\n\
162  mouse pointer is above it (switches color to yellow):\n\
163  \tMode\t\tWidget Component Style\t\tKey\n\
164  \t----\t\t----------------------\t\t---\n\
165  \tTranslation\tLocal axes with arrows\t\tv\n\
166  \tScale\t\tLocal axes with boxes\t\tx\n\
167  \tRotate\t\tLocal axes rings\t\tc\n\
168 \n\
169  Each widget has three axis components - red (X), green (Y) and blue (Z).\n\
170  The component turns yellow, indicating an active state, when the mouse is moved\n\
171  over it. Left click and drag on the active component to adjust the objects\n\
172  translation, scale or rotation.\n\
173  Some objects do not support all manipulations (e.g. clipping planes cannot be \n\
174  scaled). If a manipulation is not permitted the component it drawn in grey and \n\
175  cannot be selected/dragged.\n";
176 
177 
178 /** \class TGLSAViewer
179 \ingroup opengl
180 The top level standalone GL-viewer - created via plugin manager.
181 */
182 
184 
186 
187 const Int_t TGLSAViewer::fgInitX = 0;
188 const Int_t TGLSAViewer::fgInitY = 0;
189 const Int_t TGLSAViewer::fgInitW = 780;
190 const Int_t TGLSAViewer::fgInitH = 670;
191 
192 // A lot of raw pointers/naked new-expressions - good way to discredit C++ (or C++ programmer
193 // ROOT has system to cleanup - I'll try to use it
194 
195 const char *gGLSaveAsTypes[] = {"Encapsulated PostScript", "*.eps",
196  "PDF", "*.pdf",
197  "GIF", "*.gif",
198  "Animated GIF", "*.gif+",
199  "JPEG", "*.jpg",
200  "PNG", "*.png",
201  0, 0};
202 
203 ////////////////////////////////////////////////////////////////////////////////
204 /// Construct a standalone viewer, bound to supplied 'pad'.
205 
207  TGLViewer(pad, fgInitX, fgInitY, fgInitW, fgInitH),
208  fFrame(0),
209  fFormat(format),
210  fFileMenu(0),
211  fFileSaveMenu(0),
212  fCameraMenu(0),
213  fHelpMenu(0),
214  fLeftVerticalFrame(0),
215  fRightVerticalFrame(0),
216  fDirName("."),
217  fTypeIdx(0),
218  fOverwrite(kFALSE),
219  fMenuBar(0),
220  fMenuBut(0),
221  fHideMenuBar(kFALSE),
222  fMenuHidingTimer(0),
223  fMenuHidingShowMenu(kTRUE),
224  fDeleteMenuBar(kFALSE)
225 {
226  fFrame = new TGLSAFrame(*this);
227 
228  CreateMenus();
229  CreateFrames();
230 
231  fFrame->SetWindowName("ROOT's GL viewer");
232  fFrame->SetClassHints("GLViewer", "GLViewer");
236 
240 
241  // set recursive cleanup, but exclude fGedEditor
242  // destructor of fGedEditor has own way of handling child nodes
247 
248  Show();
249 }
250 
251 ////////////////////////////////////////////////////////////////////////////////
252 /// Construct an embedded standalone viewer, bound to supplied 'pad'.
253 /// If format is passed, it gets adopted by the viewer as it might
254 /// need to be reused several times when recreating the GL-widget.
255 ///
256 /// Modified version of the previous constructor for embedding the
257 /// viewer into another frame (parent).
258 
260  TGLFormat* format) :
261  TGLViewer(pad, fgInitX, fgInitY, fgInitW, fgInitH),
262  fFrame(0),
263  fFormat(format),
264  fFileMenu(0),
265  fCameraMenu(0),
266  fHelpMenu(0),
267  fLeftVerticalFrame(0),
268  fRightVerticalFrame(0),
269  fTypeIdx(0),
270  fMenuBar(0),
271  fMenuBut(0),
272  fHideMenuBar(kFALSE),
273  fMenuHidingTimer(0),
274  fMenuHidingShowMenu(kTRUE),
275  fDeleteMenuBar(kFALSE)
276 {
277  fGedEditor = ged;
278  fFrame = new TGLSAFrame(parent, *this);
279 
280  CreateMenus();
281  CreateFrames();
282 
287 
288  // set recursive cleanup, but exclude fGedEditor
289  // destructor of fGedEditor has own way of handling child nodes
290  if (fLeftVerticalFrame)
291  {
296  }
297 
298  Show();
299 }
300 
301 ////////////////////////////////////////////////////////////////////////////////
302 /// Destroy standalone viewer object.
303 
305 {
307 
309 
310  delete fHelpMenu;
311  delete fCameraMenu;
312  delete fFileSaveMenu;
313  delete fFileMenu;
314  if(fDeleteMenuBar) {
315  delete fMenuBar;
316  }
317  delete fFormat;
318  delete fFrame;
319  fGLWidget = 0;
320 }
321 
322 ////////////////////////////////////////////////////////////////////////////////
323 /// Return the main-frame.
324 
326 {
327  return fFrame;
328 }
329 
330 ////////////////////////////////////////////////////////////////////////////////
331 /// Create a GLwidget, it is an error if it is already created.
332 /// This is needed for frame-swapping on mac.
333 
335 {
336  if (fGLWidget) {
337  Error("CreateGLWidget", "Widget already exists.");
338  return;
339  }
340 
341  if (fFormat == 0)
342  fFormat = new TGLFormat;
343 
346 
348  fFrame->Layout();
349 
350  fGLWidget->MapWindow();
351 }
352 
353 ////////////////////////////////////////////////////////////////////////////////
354 /// Destroy the GLwidget, it is an error if it does not exist.
355 /// This is needed for frame-swapping on mac.
356 
358 {
359  if (fGLWidget == 0) {
360  Error("DestroyGLWidget", "Widget does not exist.");
361  return;
362  }
363 
366 
369  fGLWidget = 0;
370 }
371 
372 ////////////////////////////////////////////////////////////////////////////////
373 ///File/Camera/Help menus.
374 
376 {
378  fFileMenu->AddEntry("&Hide Menus", kGLHideMenus);
379  fFileMenu->AddEntry("&Edit Object", kGLEditObject);
381  fFileMenu->AddEntry("&Close Viewer", kGLCloseViewer);
384  fFileSaveMenu->AddEntry("viewer.&eps", kGLSaveEPS);
385  fFileSaveMenu->AddEntry("viewer.&pdf", kGLSavePDF);
386  fFileSaveMenu->AddEntry("viewer.&gif", kGLSaveGIF);
387  fFileSaveMenu->AddEntry("viewer.g&if+", kGLSaveAnimGIF);
388  fFileSaveMenu->AddEntry("viewer.&jpg", kGLSaveJPG);
389  fFileSaveMenu->AddEntry("viewer.p&ng", kGLSavePNG);
390  fFileMenu->AddPopup("&Save", fFileSaveMenu);
391  fFileMenu->AddEntry("Save &As...", kGLSaveAS);
393  fFileMenu->AddEntry("&Quit ROOT", kGLQuitROOT);
395 
397  fCameraMenu->AddEntry("Perspective (Floor XOZ)", kGLPerspXOZ);
398  fCameraMenu->AddEntry("Perspective (Floor YOZ)", kGLPerspYOZ);
399  fCameraMenu->AddEntry("Perspective (Floor XOY)", kGLPerspXOY);
400  fCameraMenu->AddEntry("Orthographic (XOY)", kGLXOY);
401  fCameraMenu->AddEntry("Orthographic (XOZ)", kGLXOZ);
402  fCameraMenu->AddEntry("Orthographic (ZOY)", kGLZOY);
403  fCameraMenu->AddEntry("Orthographic (ZOX)", kGLZOX);
404  fCameraMenu->AddEntry("Orthographic (XnOY)", kGLXnOY);
405  fCameraMenu->AddEntry("Orthographic (XnOZ)", kGLXnOZ);
406  fCameraMenu->AddEntry("Orthographic (ZnOY)", kGLZnOY);
407  fCameraMenu->AddEntry("Orthographic (ZnOX)", kGLZnOX);
409  fCameraMenu->AddEntry("Ortho allow rotate", kGLOrthoRotate);
410  fCameraMenu->AddEntry("Ortho allow dolly", kGLOrthoDolly);
412 
414  fHelpMenu->AddEntry("Help on GL Viewer...", kGLHelpViewer);
416  fHelpMenu->AddEntry("&About ROOT...", kGLHelpAbout);
418 
419  // Create menubar
420  fMenuBar = new TGMenuBar(fFrame);
421  fMenuBar->AddPopup("&File", fFileMenu, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
422  fMenuBar->AddPopup("&Camera", fCameraMenu, new TGLayoutHints(kLHintsTop | kLHintsLeft, 0, 4, 0, 0));
425  gVirtualX->SelectInput(fMenuBar->GetId(),
429 
430  fMenuBut = new TGButton(fFrame);
432  fMenuBut->Resize(20, 4);
433  fMenuBut->SetBackgroundColor(0x80A0C0);
435 }
436 
437 ////////////////////////////////////////////////////////////////////////////////
438 /// Internal frames creation.
439 
441 {
442  TGCompositeFrame* compositeFrame = fFrame;
443  if (fGedEditor == 0)
444  {
445  compositeFrame = new TGCompositeFrame(fFrame, 100, 100, kHorizontalFrame | kRaisedFrame);
446  fFrame->AddFrame(compositeFrame, new TGLayoutHints(kLHintsExpandX | kLHintsExpandY));
447 
448  fLeftVerticalFrame = new TGVerticalFrame(compositeFrame, 195, 10, kFixedWidth);
449  compositeFrame->AddFrame(fLeftVerticalFrame, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 2, 2, 2, 2));
450 
451  const TGWindow* cw = fFrame->GetClient()->GetRoot();
453 
454  fGedEditor = new TGedEditor();
460 
461  TGVSplitter *splitter = new TGVSplitter(compositeFrame);
462  splitter->SetFrame(fLeftVerticalFrame, kTRUE);
463  compositeFrame->AddFrame(splitter, new TGLayoutHints(kLHintsLeft | kLHintsExpandY, 0,1,2,2) );
464  }
465 
466  // SunkenFrame introduces 1-pixel offset - in TGFrame.cxx:163
467  //
468  // TGVerticalFrame *rightVerticalFrame = new TGVerticalFrame(compositeFrame, 10, 10, kSunkenFrame);
469  // compositeFrame->AddFrame(rightVerticalFrame, new TGLayoutHints(kLHintsRight | kLHintsExpandX | kLHintsExpandY,0,2,2,2));
470  fRightVerticalFrame = new TGVerticalFrame(compositeFrame, 10, 10);
472 
473  fEventHandler = new TGLEventHandler(0, this);
474  CreateGLWidget();
475 }
476 
477 ////////////////////////////////////////////////////////////////////////////////
478 /// Update GUI components for embedded viewer selection change.
479 /// Override from TGLViewer.
480 
482 {
483  TGLPhysicalShape *selected = const_cast<TGLPhysicalShape*>(GetSelected());
484 
485  if (selected) {
486  fPShapeWrap->fPShape = selected;
489  else
491  } else {
492  fPShapeWrap->fPShape = 0;
494  }
495 }
496 
497 ////////////////////////////////////////////////////////////////////////////////
498 /// Show the viewer
499 
501 {
502  fFrame->MapRaised();
504  RequestDraw();
505 }
506 
507 ////////////////////////////////////////////////////////////////////////////////
508 /// Close the viewer - destructed.
509 
511 {
512  // Commit suicide when contained GUI is closed.
513  delete this;
514 }
515 
516 ////////////////////////////////////////////////////////////////////////////////
517 /// Delete the menu bar.
518 
520 {
522 }
523 
524 ////////////////////////////////////////////////////////////////////////////////
525 /// Deactivate menu entries for closing the GL window and exiting ROOT.
526 
528 {
531 }
532 
533 ////////////////////////////////////////////////////////////////////////////////
534 /// Enable hiding of menu bar.
535 
537 {
538  if (fHideMenuBar)
539  return;
540 
542 
543  fMenuBar->Connect("ProcessedEvent(Event_t*)", "TGLSAViewer", this, "HandleMenuBarHiding(Event_t*)");
544  fMenuBut->Connect("ProcessedEvent(Event_t*)", "TGLSAViewer", this, "HandleMenuBarHiding(Event_t*)");
545 
548  fFrame->Layout();
549 
550  fMenuHidingTimer = new TTimer;
551  fMenuHidingTimer->Connect("Timeout()", "TGLSAViewer", this, "MenuHidingTimeout()");
552 
554 }
555 
556 ////////////////////////////////////////////////////////////////////////////////
557 /// Disable hiding of menu bar.
558 
560 {
561  if (!fHideMenuBar)
562  return;
563 
565 
566  fMenuBar->Disconnect("ProcessedEvent(Event_t*)", this, "HandleMenuBarHiding(Event_t*)");
567  fMenuBut->Disconnect("ProcessedEvent(Event_t*)", this, "HandleMenuBarHiding(Event_t*)");
568 
571  fFrame->Layout();
572 
574  delete fMenuHidingTimer;
575  fMenuHidingTimer = 0;
576 
578 }
579 
580 ////////////////////////////////////////////////////////////////////////////////
581 /// Maybe switch menu-bar / menu-button.
582 
584 {
585  TGFrame *f = (TGFrame*) gTQSender;
586 
587  if (f == fMenuBut)
588  {
589  if (ev->fType == kEnterNotify)
591  else
593  }
594  else if (f == fMenuBar)
595  {
596  if (ev->fType == kLeaveNotify &&
597  (ev->fX < 0 || ev->fX >= (Int_t) f->GetWidth() ||
598  ev->fY < 0 || ev->fY >= (Int_t) f->GetHeight()))
599  {
600  if (fMenuBar->GetCurrent() == 0)
602  else
603  fMenuBar->GetCurrent()->Connect("ProcessedEvent(Event_t*)", "TGLSAViewer", this, "HandleMenuBarHiding(Event_t*)");
604  }
605  else
606  {
608  }
609  }
610  else
611  {
612  f->Disconnect("ProcessedEvent(Event_t*)", this);
614  }
615 }
616 
617 ////////////////////////////////////////////////////////////////////////////////
618 /// Reset the timer for menu-bar hiding.
619 
621 {
622  // This happens, mysteriously.
623  if (fMenuHidingTimer == 0)
624  return;
625 
627 
628  fMenuHidingShowMenu = show_menu;
629 
633 }
634 
635 ////////////////////////////////////////////////////////////////////////////////
636 /// Action for menu-hiding timeout.
637 
639 {
641  if (fMenuHidingShowMenu) {
644  } else {
647  }
648  fFrame->Layout();
649 }
650 
651 ////////////////////////////////////////////////////////////////////////////////
652 /// Set global timeout for menu-hiding in mili-seconds.
653 /// Static function.
654 
656 {
657  fgMenuHidingTimeout = timeout;
658 }
659 
660 ////////////////////////////////////////////////////////////////////////////////
661 /// Process GUI message capture by the main GUI frame (TGLSAFrame).
662 
664 {
665  switch (GET_MSG(msg)) {
666  case kC_COMMAND:
667  switch (GET_SUBMSG(msg)) {
668  case kCM_BUTTON:
669  case kCM_MENU:
670  switch (parm1) {
671  case kGLHelpAbout: {
672 #ifdef R__UNIX
673  TString rootx = TROOT::GetBinDir() + "/root -a &";
674  gSystem->Exec(rootx);
675 #else
676 #ifdef WIN32
678 #else
679  char str[32];
680  snprintf(str,32, "About ROOT %s...", gROOT->GetVersion());
681  hd = new TRootHelpDialog(this, str, 600, 400);
682  hd->SetText(gHelpAbout);
683  hd->Popup();
684 #endif
685 #endif
686  break;
687  }
688  case kGLHelpViewer: {
689  TRootHelpDialog * hd = new TRootHelpDialog(fFrame, "Help on GL Viewer...", 660, 400);
690  hd->AddText(fgHelpText1);
691  hd->AddText(fgHelpText2);
692  hd->Popup();
693  break;
694  }
695  case kGLPerspYOZ:
697  break;
698  case kGLPerspXOZ:
700  break;
701  case kGLPerspXOY:
703  break;
704  case kGLXOY:
706  break;
707  case kGLXOZ:
709  break;
710  case kGLZOY:
712  break;
713  case kGLZOX:
715  break;
716  case kGLXnOY:
718  break;
719  case kGLXnOZ:
721  break;
722  case kGLZnOY:
724  break;
725  case kGLZnOX:
727  break;
728  case kGLOrthoRotate:
730  break;
731  case kGLOrthoDolly:
733  break;
734  case kGLSaveEPS:
735  SavePicture("viewer.eps");
736  break;
737  case kGLSavePDF:
738  SavePicture("viewer.pdf");
739  break;
740  case kGLSaveGIF:
741  SavePicture("viewer.gif");
742  break;
743  case kGLSaveAnimGIF:
744  SavePicture("viewer.gif+");
745  break;
746  case kGLSaveJPG:
747  SavePicture("viewer.jpg");
748  break;
749  case kGLSavePNG:
750  SavePicture("viewer.png");
751  break;
752  case kGLSaveAS:
753  {
754  TGFileInfo fi;
756  fi.SetIniDir(fDirName);
757  fi.fFileTypeIdx = fTypeIdx;
758  fi.fOverwrite = fOverwrite;
759  new TGFileDialog(gClient->GetDefaultRoot(), fFrame, kFDSave, &fi);
760  if (!fi.fFilename) return kTRUE;
761  TString ft(fi.fFileTypes[fi.fFileTypeIdx+1]);
762  fDirName = fi.fIniDir;
763  fTypeIdx = fi.fFileTypeIdx;
764  fOverwrite = fi.fOverwrite;
765 
766  TString file = fi.fFilename;
767  Bool_t match = kFALSE;
768  const char** fin = gGLSaveAsTypes; ++fin;
769  while (*fin != 0)
770  {
771  if (file.EndsWith(*fin + 1))
772  {
773  match = kTRUE;
774  break;
775  }
776  fin += 2;
777  }
778  if ( ! match)
779  {
780  file += ft(ft.Index("."), ft.Length());
781  }
782  SavePicture(file);
783  }
784  break;
785  case kGLHideMenus:
786  if (fHideMenuBar)
788  else
790  break;
791  case kGLEditObject:
793  break;
794  case kGLCloseViewer:
795  // Exit needs to be delayed to avoid bad drawable X ids - GUI
796  // will all be changed in future anyway
797  TTimer::SingleShot(50, "TGLSAFrame", fFrame, "SendCloseMessage()");
798  break;
799  case kGLQuitROOT:
800  if (!gApplication->ReturnFromRun())
801  delete this;
803  break;
804  default:
805  break;
806  }
807  default:
808  break;
809  }
810  default:
811  break;
812  }
813 
814  return kTRUE;
815 }
816 
817 ////////////////////////////////////////////////////////////////////////////////
818 /// Toggle state of the 'Edit Object' menu entry.
819 
821 {
824  else
827 }
828 
829 ////////////////////////////////////////////////////////////////////////////////
830 /// Toggle state of the 'Ortho allow rotate' menu entry.
831 
833 {
836  else
845 }
846 
847 ////////////////////////////////////////////////////////////////////////////////
848 /// Toggle state of the 'Ortho allow dolly' menu entry.
849 
851 {
854  else
860 }
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
TGLViewer::fGedEditor
TGedEditor * fGedEditor
event handler
Definition: TGLViewer.h:120
Event_t::fType
EGEventType fType
of event (see EGEventType)
Definition: GuiTypes.h:175
TGLSAViewer::kGLPerspXOY
@ kGLPerspXOY
Definition: TGLSAViewer.h:42
TGClient::GetDefaultRoot
const TGWindow * GetDefaultRoot() const
Returns the root (i.e.
Definition: TGClient.cxx:236
TGLSAViewer::kGLHideMenus
@ kGLHideMenus
Definition: TGLSAViewer.h:48
TGLSAViewer::fHelpMenu
TGPopupMenu * fHelpMenu
Definition: TGLSAViewer.h:57
TGPopupMenu::IsEntryChecked
virtual Bool_t IsEntryChecked(Int_t id)
Return true if menu item is checked.
Definition: TGMenu.cxx:1845
GET_MSG
Int_t GET_MSG(Long_t val)
Definition: WidgetMessageTypes.h:110
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
TGLSAViewer::kGLHelpViewer
@ kGLHelpViewer
Definition: TGLSAViewer.h:41
Event_t::fY
Int_t fY
pointer x, y coordinates in event window
Definition: GuiTypes.h:178
Event_t::fX
Int_t fX
Definition: GuiTypes.h:178
TGLViewer::fOrthoZnOYCamera
TGLOrthoCamera fOrthoZnOYCamera
Definition: TGLViewer.h:94
TGWindow
ROOT GUI Window base class.
Definition: TGWindow.h:23
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:100
TGLViewer::kCameraOrthoZnOX
@ kCameraOrthoZnOX
Definition: TGLViewer.h:63
kFixedWidth
@ kFixedWidth
Definition: GuiTypes.h:387
TGCompositeFrame::GetList
virtual TList * GetList() const
Definition: TGFrame.h:310
TGLSAViewer::fMenuBut
TGButton * fMenuBut
Definition: TGLSAViewer.h:68
TList::AddFirst
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
Definition: TList.cxx:100
snprintf
#define snprintf
Definition: civetweb.c:1540
TGFrame::ChangeOptions
virtual void ChangeOptions(UInt_t options)
Change frame options. Options is an OR of the EFrameTypes.
Definition: TGFrame.cxx:321
TGLSAViewer::kGLOrthoRotate
@ kGLOrthoRotate
Definition: TGLSAViewer.h:45
TGLViewer::kCameraPerspXOZ
@ kCameraPerspXOZ
Definition: TGLViewer.h:61
TGLOrthoCamera::SetEnableRotate
void SetEnableRotate(Bool_t x)
Definition: TGLOrthoCamera.h:80
f
#define f(i)
Definition: RSha256.hxx:104
TGLSAViewer::DisableMenuBarHiding
void DisableMenuBarHiding()
Disable hiding of menu bar.
Definition: TGLSAViewer.cxx:559
TGFrame::SetBackgroundColor
virtual void SetBackgroundColor(Pixel_t back)
Set background color (override from TGWindow base class).
Definition: TGFrame.cxx:312
TGLSAViewer::fMenuBar
TGMenuBar * fMenuBar
Definition: TGLSAViewer.h:67
TGLViewer::fOrthoXOZCamera
TGLOrthoCamera fOrthoXOZCamera
Definition: TGLViewer.h:89
kLeaveNotify
@ kLeaveNotify
Definition: GuiTypes.h:61
kPointerMotionMask
const Mask_t kPointerMotionMask
Definition: GuiTypes.h:163
TGLSAFrame.h
TGedEditor::SetModel
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event, Bool_t force=kFALSE)
Activate object editors according to the selected object.
Definition: TGedEditor.cxx:345
TGLPhysicalShape.h
TGLViewer::fPad
TVirtualPad * fPad
Definition: TGLViewer.h:78
gVirtualX
#define gVirtualX
Definition: TVirtualX.h:338
kLHintsTop
@ kLHintsTop
Definition: TGLayout.h:27
ClassImp
#define ClassImp(name)
Definition: Rtypes.h:364
TGLSAViewer::kGLZnOX
@ kGLZnOX
Definition: TGLSAViewer.h:44
TGMenuBar::GetCurrent
virtual TGMenuTitle * GetCurrent() const
Definition: TGMenu.h:326
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
TGLSAViewer::kGLEditObject
@ kGLEditObject
Definition: TGLSAViewer.h:48
TGLSAViewer
The top level standalone GL-viewer - created via plugin manager.
Definition: TGLSAViewer.h:38
TGPopupMenu::AddSeparator
virtual void AddSeparator(TGMenuEntry *before=nullptr)
Add a menu separator to the menu.
Definition: TGMenu.cxx:1060
TGedEditor.h
TGLSAViewer::kGLZnOY
@ kGLZnOY
Definition: TGLSAViewer.h:44
TGLSAViewer::kGLOrthoDolly
@ kGLOrthoDolly
Definition: TGLSAViewer.h:45
TGLPShapeObj.h
TGLSAViewer::ResetMenuHidingTimer
void ResetMenuHidingTimer(Bool_t show_menu)
Reset the timer for menu-bar hiding.
Definition: TGLSAViewer.cxx:620
TGLSAViewer::fFormat
TGLFormat * fFormat
Definition: TGLSAViewer.h:53
TGLSAViewer::TGLSAViewer
TGLSAViewer(const TGLSAViewer &)
gTQSender
R__EXTERN void * gTQSender
Definition: TQObject.h:44
TGLSAViewer::fFileMenu
TGPopupMenu * fFileMenu
Definition: TGLSAViewer.h:54
TGLSAViewer::fgInitX
static const Int_t fgInitX
Definition: TGLSAViewer.h:80
TGLSAViewer::fDirName
TString fDirName
Definition: TGLSAViewer.h:64
TGLViewer::fOrthoZOYCamera
TGLOrthoCamera fOrthoZOYCamera
Definition: TGLViewer.h:90
Int_t
int Int_t
Definition: RtypesCore.h:45
TGLSAViewer::DeleteMenuBar
void DeleteMenuBar()
Delete the menu bar.
Definition: TGLSAViewer.cxx:519
TGFileInfo::SetIniDir
void SetIniDir(const char *inidir)
Set directory name.
Definition: TGFileDialog.cxx:116
HelpText.h
TGLLogicalShape::GetExternal
TObject * GetExternal() const
Definition: TGLLogicalShape.h:83
TWin32SplashThread.h
TGLFormat.h
TGLSAViewer::kGLHelpAbout
@ kGLHelpAbout
Definition: TGLSAViewer.h:41
TGLWidget::SetEventHandler
void SetEventHandler(TGEventHandler *eh)
Set event-handler. All events are passed to this object.
Definition: TGLWidget.cxx:558
kEnterNotify
@ kEnterNotify
Definition: GuiTypes.h:61
TTimer::TurnOff
virtual void TurnOff()
Remove timer from system timer list.
Definition: TTimer.cxx:229
TGLSAViewer::MenuHidingTimeout
void MenuHidingTimeout()
Action for menu-hiding timeout.
Definition: TGLSAViewer.cxx:638
TString::Length
Ssiz_t Length() const
Definition: TString.h:410
TGMainFrame::SetWindowName
void SetWindowName(const char *name=0)
Set window name. This is typically done via the window manager.
Definition: TGFrame.cxx:1764
TVirtualX.h
TGLViewer::SavePicture
Bool_t SavePicture()
Save current image using the default file name which can be set via SetPictureFileName() and defaults...
Definition: TGLViewer.cxx:782
TGLSAViewer::fDeleteMenuBar
Bool_t fDeleteMenuBar
Definition: TGLSAViewer.h:73
TGLSAViewer::fFrame
TGLSAFrame * fFrame
Definition: TGLSAViewer.h:52
TString
Basic string class.
Definition: TString.h:136
TGFrame
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition: TGFrame.h:80
TWin32SplashThread
Definition: TWin32SplashThread.h:18
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
TGLViewer::kCameraOrthoZOX
@ kCameraOrthoZOX
Definition: TGLViewer.h:62
TGLViewer::fGLWidget
TGLWidget * fGLWidget
Definition: TGLViewer.h:185
TGLSAViewer::kGLSavePDF
@ kGLSavePDF
Definition: TGLSAViewer.h:46
TString.h
TGFrame::MapWindow
virtual void MapWindow()
map window
Definition: TGFrame.h:204
TGLPShapeObj::fPShape
TGLPhysicalShape * fPShape
Definition: TGLPShapeObj.h:23
bool
kLeaveWindowMask
const Mask_t kLeaveWindowMask
Definition: GuiTypes.h:168
TGLWidget::Create
static TGLWidget * Create(const TGWindow *parent, Bool_t selectInput, Bool_t shareDefault, const TGLPaintDevice *shareDevice, UInt_t width, UInt_t height)
Static constructor for creating widget with default pixel format.
Definition: TGLWidget.cxx:83
TGFileInfo::fFileTypeIdx
Int_t fFileTypeIdx
selected file type, index in fFileTypes
Definition: TGFileDialog.h:49
TGFileDialog.h
TGLSAViewer::ToggleOrthoDolly
void ToggleOrthoDolly()
Toggle state of the 'Ortho allow dolly' menu entry.
Definition: TGLSAViewer.cxx:850
TGLViewer::RequestDraw
void RequestDraw(Short_t LOD=TGLRnrCtx::kLODMed)
Post request for redraw of viewer at level of detail 'LOD' Request is directed via cross thread gVirt...
Definition: TGLViewer.cxx:437
TROOT.h
kMWMInputModeless
@ kMWMInputModeless
Definition: TGFrame.h:57
TGMenuBar::AddPopup
virtual void AddPopup(TGHotString *s, TGPopupMenu *menu, TGLayoutHints *l, TGPopupMenu *before=0)
Add popup menu to menu bar.
Definition: TGMenu.cxx:418
TGLSAViewer::fHideMenuBar
Bool_t fHideMenuBar
Definition: TGLSAViewer.h:69
TGLViewer::TGLEventHandler
friend class TGLEventHandler
Definition: TGLViewer.h:57
gClient
#define gClient
Definition: TGClient.h:157
TGLSAViewer::kGLSaveAnimGIF
@ kGLSaveAnimGIF
Definition: TGLSAViewer.h:46
TApplication.h
TList::First
virtual TObject * First() const
Return the first object in the list. Returns 0 when list is empty.
Definition: TList.cxx:659
TGLSAViewer::SetMenuHidingTimeout
static void SetMenuHidingTimeout(Long_t timeout)
Set global timeout for menu-hiding in mili-seconds.
Definition: TGLSAViewer.cxx:655
TGLSAViewer::kGLSavePNG
@ kGLSavePNG
Definition: TGLSAViewer.h:46
TGLSAViewer::kGLSaveJPG
@ kGLSaveJPG
Definition: TGLSAViewer.h:47
TGLSAViewer::kGLSaveGIF
@ kGLSaveGIF
Definition: TGLSAViewer.h:46
TGFrame::DeleteWindow
virtual void DeleteWindow()
Delete window.
Definition: TGFrame.cxx:276
TGLViewer::SetCurrentCamera
void SetCurrentCamera(ECameraType camera)
Set current active camera - 'cameraType' one of: kCameraPerspX, kCameraPerspY, kCameraPerspZ,...
Definition: TGLViewer.cxx:1791
TTimer
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
TGFileInfo::fOverwrite
Bool_t fOverwrite
if true overwrite the file with existing name on save
Definition: TGFileDialog.h:50
TG3DLine.h
TGClient::SetRoot
void SetRoot(TGWindow *root=nullptr)
Sets the current root (i.e.
Definition: TGClient.cxx:246
TGLEventHandler.h
TGLOrthoCamera::SetDollyToZoom
void SetDollyToZoom(Bool_t x)
Definition: TGLOrthoCamera.h:89
TApplication::ReturnFromRun
Bool_t ReturnFromRun() const
Definition: TApplication.h:149
TGLViewer
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:55
TGLViewer::kCameraPerspYOZ
@ kCameraPerspYOZ
Definition: TGLViewer.h:61
TGMainFrame::SetClassHints
void SetClassHints(const char *className, const char *resourceName)
Set the windows class and resource name.
Definition: TGFrame.cxx:1832
TGLSAFrame
Standalone GL Viewer GUI main frame.
Definition: TGLSAFrame.h:29
TGLSAViewer::~TGLSAViewer
~TGLSAViewer()
Destroy standalone viewer object.
Definition: TGLSAViewer.cxx:304
kLHintsNormal
@ kLHintsNormal
Definition: TGLayout.h:32
TGLViewer::fPShapeWrap
TGLPShapeObj * fPShapeWrap
GED editor.
Definition: TGLViewer.h:121
kFixedHeight
@ kFixedHeight
Definition: GuiTypes.h:389
TSystem.h
TGLFormat
Encapsulation of format / contents of an OpenGL buffer.
Definition: TGLFormat.h:36
TGLSAViewer::fLeftVerticalFrame
TGCompositeFrame * fLeftVerticalFrame
Definition: TGLSAViewer.h:60
TGLSAViewer::kGLQuitROOT
@ kGLQuitROOT
Definition: TGLSAViewer.h:47
TGLViewer::kCameraOrthoXOZ
@ kCameraOrthoXOZ
Definition: TGLViewer.h:62
TGLSAViewer::HandleMenuBarHiding
void HandleMenuBarHiding(Event_t *ev)
Maybe switch menu-bar / menu-button.
Definition: TGLSAViewer.cxx:583
TGCompositeFrame::MapSubwindows
virtual void MapSubwindows()
Map all sub windows that are part of the composite frame.
Definition: TGFrame.cxx:1164
TGVerticalFrame
A composite frame that layout their children in vertical way.
Definition: TGFrame.h:375
TGFrame::Resize
virtual void Resize(UInt_t w=0, UInt_t h=0)
Resize the frame.
Definition: TGFrame.cxx:605
GuiTypes.h
TGedEditor::DisconnectFromCanvas
virtual void DisconnectFromCanvas()
Disconnect this editor from the Selected signal of fCanvas.
Definition: TGedEditor.cxx:318
TGLSAViewer::fCameraMenu
TGPopupMenu * fCameraMenu
Definition: TGLSAViewer.h:56
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:101
TSystem::Exec
virtual Int_t Exec(const char *shellcmd)
Execute a command.
Definition: TSystem.cxx:655
TGCompositeFrame::HideFrame
virtual void HideFrame(TGFrame *f)
Hide sub frame.
Definition: TGFrame.cxx:1190
TGFrame.h
kCM_BUTTON
@ kCM_BUTTON
Definition: WidgetMessageTypes.h:34
Long_t
long Long_t
Definition: RtypesCore.h:54
TGLSAViewer::kGLXOZ
@ kGLXOZ
Definition: TGLSAViewer.h:43
TGLSAViewer::kGLXnOY
@ kGLXnOY
Definition: TGLSAViewer.h:44
kLHintsRight
@ kLHintsRight
Definition: TGLayout.h:26
TGLViewer::kCameraOrthoZnOY
@ kCameraOrthoZnOY
Definition: TGLViewer.h:63
TGFileInfo
Definition: TGFileDialog.h:39
TGLayoutHints
This class describes layout hints used by the layout classes.
Definition: TGLayout.h:50
TGLSAViewer::Close
void Close()
Close the viewer - destructed.
Definition: TGLSAViewer.cxx:510
TRootHelpDialog.h
TGLSAViewer.h
TGLSAViewer::fOverwrite
Bool_t fOverwrite
Definition: TGLSAViewer.h:66
TGFrame::MapRaised
virtual void MapRaised()
map raised
Definition: TGFrame.h:205
gApplication
R__EXTERN TApplication * gApplication
Definition: TApplication.h:166
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
TGLSAViewer::CreateGLWidget
virtual void CreateGLWidget()
Create a GLwidget, it is an error if it is already created.
Definition: TGLSAViewer.cxx:334
TVirtualPad.h
TGLViewer::fOrthoXnOYCamera
TGLOrthoCamera fOrthoXnOYCamera
Definition: TGLViewer.h:92
gGLSaveAsTypes
const char * gGLSaveAsTypes[]
Definition: TGLSAViewer.cxx:195
TGLSAViewer::EnableMenuBarHiding
void EnableMenuBarHiding()
Enable hiding of menu bar.
Definition: TGLSAViewer.cxx:536
TApplication::Terminate
virtual void Terminate(Int_t status=0)
TGPopupMenu::Associate
virtual void Associate(const TGWindow *w)
Definition: TGMenu.h:206
kLHintsExpandY
@ kLHintsExpandY
Definition: TGLayout.h:31
TGLPhysicalShape::GetLogical
const TGLLogicalShape * GetLogical() const
Definition: TGLPhysicalShape.h:96
TTimer::SetTime
void SetTime(Long_t milliSec)
Definition: TTimer.h:90
TGClient.h
kFDSave
@ kFDSave
Definition: TGFileDialog.h:22
kFocusChangeMask
const Mask_t kFocusChangeMask
Definition: GuiTypes.h:169
TGCompositeFrame::RemoveFrame
virtual void RemoveFrame(TGFrame *f)
Remove frame from composite frame.
Definition: TGFrame.cxx:1149
TGLViewer::fOrthoXnOZCamera
TGLOrthoCamera fOrthoXnOZCamera
Definition: TGLViewer.h:93
TGLSAViewer::fTypeIdx
Int_t fTypeIdx
Definition: TGLSAViewer.h:65
kKeyPressMask
const Mask_t kKeyPressMask
Definition: GuiTypes.h:159
TGLSAViewer::fFileSaveMenu
TGPopupMenu * fFileSaveMenu
Definition: TGLSAViewer.h:55
kRaisedFrame
@ kRaisedFrame
Definition: GuiTypes.h:384
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
TGLViewer::fOrthoXOYCamera
TGLOrthoCamera fOrthoXOYCamera
Definition: TGLViewer.h:88
TGLWidget.h
TGLSAViewer::kGLCloseViewer
@ kGLCloseViewer
Definition: TGLSAViewer.h:47
TGLViewer::kCameraOrthoZOY
@ kCameraOrthoZOY
Definition: TGLViewer.h:62
TGLSAViewer::fgMenuHidingTimeout
static Long_t fgMenuHidingTimeout
Definition: TGLSAViewer.h:75
TRootEmbeddedCanvas.h
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
TGLSAViewer::DisableCloseMenuEntries
void DisableCloseMenuEntries()
Deactivate menu entries for closing the GL window and exiting ROOT.
Definition: TGLSAViewer.cxx:527
gSystem
R__EXTERN TSystem * gSystem
Definition: TSystem.h:559
TGObject::GetClient
TGClient * GetClient() const
Definition: TGObject.h:38
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
TGLViewer::kCameraOrthoXnOY
@ kCameraOrthoXnOY
Definition: TGLViewer.h:63
TGFileInfo::fIniDir
char * fIniDir
on input: initial directory, on output: new directory
Definition: TGFileDialog.h:47
TGLSAViewer::GetFrame
TGCompositeFrame * GetFrame() const
Return the main-frame.
Definition: TGLSAViewer.cxx:325
TGLOutput.h
TGPopupMenu::DeleteEntry
virtual void DeleteEntry(Int_t id)
Delete entry with specified id from menu.
Definition: TGMenu.cxx:1926
TGLSAViewer::fMenuHidingShowMenu
Bool_t fMenuHidingShowMenu
Definition: TGLSAViewer.h:71
TGFileInfo::fFileTypes
const char ** fFileTypes
file types used to filter selectable files
Definition: TGFileDialog.h:48
kButton1Down
@ kButton1Down
Definition: Buttons.h:17
kExposureMask
const Mask_t kExposureMask
Definition: GuiTypes.h:165
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
TGLSAViewer::fRightVerticalFrame
TGCompositeFrame * fRightVerticalFrame
Definition: TGLSAViewer.h:62
TPluginManager.h
TGFrame::UnmapWindow
virtual void UnmapWindow()
unmap window
Definition: TGFrame.h:206
TGLSAViewer::ProcessFrameMessage
Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t)
Process GUI message capture by the main GUI frame (TGLSAFrame).
Definition: TGLSAViewer.cxx:663
TList::Remove
virtual TObject * Remove(TObject *obj)
Remove object from the list.
Definition: TList.cxx:822
TGLSAViewer::fMenuHidingTimer
TTimer * fMenuHidingTimer
Definition: TGLSAViewer.h:70
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
TGLSAViewer::SelectionChanged
virtual void SelectionChanged()
Update GUI components for embedded viewer selection change.
Definition: TGLSAViewer.cxx:481
gHelpAbout
R__EXTERN const char gHelpAbout[]
Definition: HelpText.h:17
file
Definition: file.py:1
kC_COMMAND
@ kC_COMMAND
Definition: WidgetMessageTypes.h:31
TGLSAViewer::kGLSaveEPS
@ kGLSaveEPS
Definition: TGLSAViewer.h:46
TGLClip.h
TGMainFrame::SetMWMHints
void SetMWMHints(UInt_t value, UInt_t funcs, UInt_t input)
Set decoration style for MWM-compatible wm (mwm, ncdwm, fvwm?).
Definition: TGFrame.cxx:1842
TGLLogicalShape.h
kMWMFuncAll
@ kMWMFuncAll
Definition: TGFrame.h:49
TObject
Mother of all ROOT objects.
Definition: TObject.h:37
TGedEditor::GetTGCanvas
TGCanvas * GetTGCanvas() const
Definition: TGedEditor.h:72
TGLSAViewer::kGLZOY
@ kGLZOY
Definition: TGLSAViewer.h:43
TGSplitter.h
TGLSAViewer::fgHelpText1
static const char * fgHelpText1
Definition: TGLSAViewer.h:85
TGButton.h
kMWMDecorAll
@ kMWMDecorAll
Definition: TGFrame.h:63
TGPopupMenu
This class creates a popup menu object.
Definition: TGMenu.h:110
Event_t
Event structure.
Definition: GuiTypes.h:174
GET_SUBMSG
Int_t GET_SUBMSG(Long_t val)
Definition: WidgetMessageTypes.h:111
TGLSAViewer::fgInitY
static const Int_t fgInitY
Definition: TGLSAViewer.h:81
TGLPhysicalShape
Concrete physical shape - a GL drawable.
Definition: TGLPhysicalShape.h:32
kDeepCleanup
@ kDeepCleanup
Definition: TGFrame.h:42
TGCanvas.h
TGLSAViewer::kGLXOY
@ kGLXOY
Definition: TGLSAViewer.h:43
TRootHelpDialog::AddText
void AddText(const char *helpText)
Add help text from helpText buffer to already existing text in TGTextView.
Definition: TRootHelpDialog.cxx:85
TGLSAViewer::kGLXnOZ
@ kGLXnOZ
Definition: TGLSAViewer.h:44
TROOT::GetBinDir
static const TString & GetBinDir()
Get the binary directory in the installation. Static utility function.
Definition: TROOT.cxx:2912
kLHintsExpandX
@ kLHintsExpandX
Definition: TGLayout.h:30
kStructureNotifyMask
const Mask_t kStructureNotifyMask
Definition: GuiTypes.h:166
TGCompositeFrame::SetCleanup
virtual void SetCleanup(Int_t mode=kLocalCleanup)
Turn on automatic cleanup of child frames in dtor.
Definition: TGFrame.cxx:1072
TGLSAViewer::CreateMenus
void CreateMenus()
File/Camera/Help menus.
Definition: TGLSAViewer.cxx:375
TGLSAViewer::CreateFrames
void CreateFrames()
Internal frames creation.
Definition: TGLSAViewer.cxx:440
TGLSAViewer::DestroyGLWidget
virtual void DestroyGLWidget()
Destroy the GLwidget, it is an error if it does not exist.
Definition: TGLSAViewer.cxx:357
TGMenuBar
The TGMenu.h header contains all different menu classes.
Definition: TGMenu.h:282
kEnterWindowMask
const Mask_t kEnterWindowMask
Definition: GuiTypes.h:167
TGLSAViewer::fgHelpText2
static const char * fgHelpText2
Definition: TGLSAViewer.h:86
TGButton
A button abstract base class.
Definition: TGButton.h:68
TGVSplitter
Definition: TGSplitter.h:53
TTimer::TurnOn
virtual void TurnOn()
Add the timer to the system timer list.
Definition: TTimer.cxx:241
TGLViewer::kCameraOrthoXOY
@ kCameraOrthoXOY
Definition: TGLViewer.h:62
TGLSAViewer::kGLPerspYOZ
@ kGLPerspYOZ
Definition: TGLSAViewer.h:42
TGLViewer::GetSelected
const TGLPhysicalShape * GetSelected() const
Return selected physical shape.
Definition: TGLViewer.cxx:2083
TGCompositeFrame
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
TGClient::GetRoot
const TGWindow * GetRoot() const
Returns current root (i.e.
Definition: TGClient.cxx:226
TTimer::Reset
void Reset()
Reset the timer.
Definition: TTimer.cxx:157
TGLSAViewer::ToggleOrthoRotate
void ToggleOrthoRotate()
Toggle state of the 'Ortho allow rotate' menu entry.
Definition: TGLSAViewer.cxx:832
TGLViewer::fEventHandler
TGEventHandler * fEventHandler
select record from last overlay select
Definition: TGLViewer.h:119
TGLViewer::kCameraOrthoXnOZ
@ kCameraOrthoXnOZ
Definition: TGLViewer.h:63
splitter
REAL splitter
Definition: triangle.c:616
TGCompositeFrame::AddFrame
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1117
TGMenu.h
kCM_MENU
@ kCM_MENU
Definition: WidgetMessageTypes.h:32
TGLSAViewer::kGLSaveAS
@ kGLSaveAS
Definition: TGLSAViewer.h:47
TGLSAViewer::fgInitW
static const Int_t fgInitW
Definition: TGLSAViewer.h:82
TGLViewer::kCameraPerspXOY
@ kCameraPerspXOY
Definition: TGLViewer.h:61
TGCompositeFrame::Layout
virtual void Layout()
Layout the elements of the composite frame.
Definition: TGFrame.cxx:1257
TGLSAViewer::Show
void Show()
Show the viewer.
Definition: TGLSAViewer.cxx:500
TGCompositeFrame::ShowFrame
virtual void ShowFrame(TGFrame *f)
Show sub frame.
Definition: TGFrame.cxx:1204
TGLSAViewer::ToggleEditObject
void ToggleEditObject()
Toggle state of the 'Edit Object' menu entry.
Definition: TGLSAViewer.cxx:820
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
TGLSAViewer::fgInitH
static const Int_t fgInitH
Definition: TGLSAViewer.h:83
TGMainFrame::SetWMPosition
void SetWMPosition(Int_t x, Int_t y)
Give the window manager a window position hint.
Definition: TGFrame.cxx:1855
TRootHelpDialog
A TRootHelpDialog is used to display help text (or any text in a dialog window).
Definition: TRootHelpDialog.h:22
gROOT
#define gROOT
Definition: TROOT.h:406
TGFileDialog
This class creates a file selection dialog.
Definition: TGFileDialog.h:65
TGLSAViewer::kGLPerspXOZ
@ kGLPerspXOZ
Definition: TGLSAViewer.h:42
int
TGFileInfo::fFilename
char * fFilename
selected file name
Definition: TGFileDialog.h:46
TGLSAViewer::kGLZOX
@ kGLZOX
Definition: TGLSAViewer.h:43