Logo ROOT  
Reference Guide
TGLSAViewer.h
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Richard Maunder / Timur Pocheptsov
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, 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#ifndef ROOT_TGLSAViewer
13#define ROOT_TGLSAViewer
14
15#include "TGLViewer.h"
16#include "TString.h"
17
18class TGLSAFrame;
19class TGLFormat;
20class TGWindow;
21class TGFrame;
23class TGPopupMenu;
24class TGButton;
25
26class TGedEditor;
27class TGLEventHandler;
28class TGMenuBar;
29
30//______________________________________________________________________________
31//
32// TGLSAViewer
33//
34// The top-level standalone GL viewer.
35
36
37class TGLSAViewer : public TGLViewer
38{
39public:
49
50private:
51 // GUI components
58
59 // Ged
61
63
72
74
76
77 void ResetMenuHidingTimer(Bool_t show_menu);
78
79 // Initial window positioning
80 static const Int_t fgInitX;
81 static const Int_t fgInitY;
82 static const Int_t fgInitW;
83 static const Int_t fgInitH;
84
85 static const char *fgHelpText1;
86 static const char *fgHelpText2;
87
88 void CreateMenus();
89 void CreateFrames();
90
91 // non-copyable class
94
95public:
96 TGLSAViewer(TVirtualPad* pad, TGLFormat* format=0);
97 TGLSAViewer(const TGWindow* parent, TVirtualPad *pad, TGedEditor *ged=0,
98 TGLFormat* format=0);
100
101 virtual void CreateGLWidget();
102 virtual void DestroyGLWidget();
103
104 virtual const char* GetName() const { return "GLViewer"; }
105
106 virtual void SelectionChanged();
107
108 void Show();
109 void Close();
110 void DeleteMenuBar();
112 void EnableMenuBarHiding();
114 void MenuHidingTimeout();
115
117
118 // GUI events - editors, frame etc
120
121 TGCompositeFrame* GetFrame() const;
123
124 TGLFormat* GetFormat() const { return fFormat; }
125
126 void ToggleEditObject();
127 void ToggleOrthoRotate();
128 void ToggleOrthoDolly();
129
130 static void SetMenuHidingTimeout(Long_t timeout);
131
132 ClassDef(TGLSAViewer, 0); // Standalone GL viewer.
133};
134
135#endif
136
int Int_t
Definition: RtypesCore.h:45
long Long_t
Definition: RtypesCore.h:54
bool Bool_t
Definition: RtypesCore.h:63
#define ClassDef(name, id)
Definition: Rtypes.h:325
A button abstract base class.
Definition: TGButton.h:68
The base class for composite widgets (menu bars, list boxes, etc.).
Definition: TGFrame.h:287
A subclasses of TGWindow, and is used as base class for some simple widgets (buttons,...
Definition: TGFrame.h:80
Base-class and default implementation of event-handler for TGLViewer.
Encapsulation of format / contents of an OpenGL buffer.
Definition: TGLFormat.h:36
Standalone GL Viewer GUI main frame.
Definition: TGLSAFrame.h:29
The top level standalone GL-viewer - created via plugin manager.
Definition: TGLSAViewer.h:38
void Show()
Show the viewer.
Bool_t fDeleteMenuBar
Definition: TGLSAViewer.h:73
static void SetMenuHidingTimeout(Long_t timeout)
Set global timeout for menu-hiding in mili-seconds.
void ToggleOrthoDolly()
Toggle state of the 'Ortho allow dolly' menu entry.
~TGLSAViewer()
Destroy standalone viewer object.
TGPopupMenu * fFileMenu
Definition: TGLSAViewer.h:54
virtual void CreateGLWidget()
Create a GLwidget, it is an error if it is already created.
static const Int_t fgInitH
Definition: TGLSAViewer.h:83
Bool_t ProcessFrameMessage(Long_t msg, Long_t parm1, Long_t)
Process GUI message capture by the main GUI frame (TGLSAFrame).
void EnableMenuBarHiding()
Enable hiding of menu bar.
TGLSAViewer(const TGLSAViewer &)
TString fDirName
Definition: TGLSAViewer.h:64
TGCompositeFrame * fRightVerticalFrame
Definition: TGLSAViewer.h:62
TGMenuBar * fMenuBar
Definition: TGLSAViewer.h:67
TGLFormat * GetFormat() const
Definition: TGLSAViewer.h:124
TGPopupMenu * fHelpMenu
Definition: TGLSAViewer.h:57
void ResetMenuHidingTimer(Bool_t show_menu)
Reset the timer for menu-bar hiding.
void CreateMenus()
File/Camera/Help menus.
void ToggleOrthoRotate()
Toggle state of the 'Ortho allow rotate' menu entry.
void CreateFrames()
Internal frames creation.
Int_t fTypeIdx
Definition: TGLSAViewer.h:65
void DeleteMenuBar()
Delete the menu bar.
void HandleMenuBarHiding(Event_t *ev)
Maybe switch menu-bar / menu-button.
static const char * fgHelpText2
Definition: TGLSAViewer.h:86
TTimer * fMenuHidingTimer
Definition: TGLSAViewer.h:70
void MenuHidingTimeout()
Action for menu-hiding timeout.
static Long_t fgMenuHidingTimeout
Definition: TGLSAViewer.h:75
TGLSAViewer & operator=(const TGLSAViewer &)
void Close()
Close the viewer - destructed.
void DisableMenuBarHiding()
Disable hiding of menu bar.
Bool_t fOverwrite
Definition: TGLSAViewer.h:66
virtual void SelectionChanged()
Update GUI components for embedded viewer selection change.
static const Int_t fgInitX
Definition: TGLSAViewer.h:80
Bool_t fHideMenuBar
Definition: TGLSAViewer.h:69
virtual void DestroyGLWidget()
Destroy the GLwidget, it is an error if it does not exist.
static const Int_t fgInitW
Definition: TGLSAViewer.h:82
TGLFormat * fFormat
Definition: TGLSAViewer.h:53
TGPopupMenu * fFileSaveMenu
Definition: TGLSAViewer.h:55
TGCompositeFrame * GetLeftVerticalFrame() const
Definition: TGLSAViewer.h:122
void ToggleEditObject()
Toggle state of the 'Edit Object' menu entry.
TGCompositeFrame * GetFrame() const
Return the main-frame.
TGButton * fMenuBut
Definition: TGLSAViewer.h:68
TGPopupMenu * fCameraMenu
Definition: TGLSAViewer.h:56
TGCompositeFrame * fLeftVerticalFrame
Definition: TGLSAViewer.h:60
virtual const char * GetName() const
Returns name of object.
Definition: TGLSAViewer.h:104
void DisableCloseMenuEntries()
Deactivate menu entries for closing the GL window and exiting ROOT.
TGLSAFrame * fFrame
Definition: TGLSAViewer.h:52
static const char * fgHelpText1
Definition: TGLSAViewer.h:85
static const Int_t fgInitY
Definition: TGLSAViewer.h:81
Bool_t fMenuHidingShowMenu
Definition: TGLSAViewer.h:71
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:55
The TGMenu.h header contains all different menu classes.
Definition: TGMenu.h:282
This class creates a popup menu object.
Definition: TGMenu.h:110
ROOT GUI Window base class.
Definition: TGWindow.h:23
Basic string class.
Definition: TString.h:136
Handles synchronous and a-synchronous timer events.
Definition: TTimer.h:51
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition: TVirtualPad.h:51
Event structure.
Definition: GuiTypes.h:174