Logo ROOT   6.08/07
Reference Guide
TGLViewerEditor.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Alja Mrak-Tadel, Matevz Tadel, Timur Pocheptsov 08/03/2006
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, 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_TGLViewerEditor
13 #define ROOT_TGLViewerEditor
14 
15 #include <memory>
16 
17 #ifndef ROOT_TGedFrame
18 #include "TGedFrame.h"
19 #endif
20 
21 #ifndef ROOT_TGLUtil
22 #include "TGLUtil.h"
23 #endif
24 
25 class TGCheckButton;
26 class TGNumberEntry;
27 class TGButtonGroup;
28 class TGroupFrame;
29 class TGRadioButton;
30 class TGColorSelect;
31 class TGComboBox;
32 class TGButton;
33 class TGTextEntry;
34 class TGLViewer;
35 class TGTab;
36 
39 
40 class TGLViewerEditor : public TGedFrame
41 {
42 private:
43  //Pointers to manipulate with tabs
47 
49 
55 
58 
65 
66  //"Guides" tab's controls
73 
75 
82 
88 
92 
94 
95  //'Extras' tab.
98 
102 
105 
109 
110  // Model
113 
114  void ConnectSignals2Slots();
115 
118 
119  void CreateStyleTab();
120  void CreateGuidesTab();
121  void CreateClippingTab();
122  void CreateExtrasTab();
123 
125 
126 public:
127  TGLViewerEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30,
130 
131  virtual void ViewerRedraw();
132 
133  virtual void SetModel(TObject* obj);
134 
135  void SetGuides();
136  void DoClearColor(Pixel_t color);
137  void DoIgnoreSizesOnUpdate();
138  void DoResetCamerasOnUpdate();
139  void DoUpdateScene();
140  void DoCameraHome();
141  void UpdateMaxDrawTimes();
142  void UpdatePointLineStuff();
143  void DoCameraCenterExt();
144  void DoCaptureCenter();
145  void DoAnnotation();
146  void DoDrawCameraCenter();
147  void UpdateCameraCenter();
148  // Axis manipulation
149  void UpdateViewerAxes(Int_t id);
150  void UpdateViewerReference();
151  void DoCameraOverlay();
152  // Extras
153  void SetRotatorMode();
154  void UpdateRotator();
155  void DoRotatorStart();
156  void DoRotatorStop();
157  void DoASavImageGUIBaseName(const char* t);
159  void DoASavImageStart();
160  void DoASavImageStop();
161  void UpdateStereo();
162 
163  void DetachFromPad(){fIsInPad = kFALSE;}
164 
165  static TGNumberEntry* MakeLabeledNEntry(TGCompositeFrame* p, const char* name,
166  Int_t labelw, Int_t nd=7, Int_t s=5);
167 
168  ClassDef(TGLViewerEditor, 0); //GUI for editing TGLViewer attributes
169 };
170 
171 #endif
void UpdateCameraCenter()
Update current camera with GUI state.
TGNumberEntry * fReferencePosY
TGGroupFrame * fRefContainer
TGRadioButton * fAxesOrigin
TGNumberEntry * fCameraCenterY
void UpdateStereo()
Update stereo related variables.
TGNumberEntry * fStereoZeroParallax
TGCompositeFrame * fClipFrame
TGTextEntry * fASavImageGUIBaseName
Definition: TGTab.h:66
virtual void ViewerRedraw()
Initiate redraw of the viewer.
TGCompositeFrame * fStereoFrame
TGCheckButton * fResetCamerasOnUpdate
void UpdateViewerAxes(Int_t id)
Update viewer with GUI state.
TGCheckButton * fCameraCenterExt
TGNumberEntry * fARotWPhi
TGTextButton * fCameraHome
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TGCheckButton * fDrawCameraCenter
const Bool_t kFALSE
Definition: Rtypes.h:92
void DoAnnotation()
Create annotation via picking.
GUI editor for TGLViewer.
void CreateClippingTab()
Create GUI controls - clip type (none/plane/box) and plane/box properties.
virtual void SetModel(TObject *obj)
Sets model or disables/hides viewer.
TGNumberEntry * fCameraCenterZ
void DoASavImageGUIBaseName(const char *t)
Update base-name.
TGNumberEntry * fLineWidthScale
TGButtonGroup * fASavImageGUIOutMode
GUI sub-editor for TGLClipSet.
TGCheckButton * fReferenceOn
TGNumberEntry * fWFLineWidth
void DoASavImageGUIOutMode(Int_t m)
Update output mode.
void ConnectSignals2Slots()
Connect signals to slots.
TGColorSelect * fClearColor
void DoCameraOverlay()
Update viewer with GUI state.
#define ClassDef(name, id)
Definition: Rtypes.h:254
ULong_t Pixel_t
Definition: GuiTypes.h:41
static Pixel_t GetDefaultFrameBackground()
Get default frame background.
Definition: TGFrame.cxx:665
void UpdatePointLineStuff()
Slot for point-sizes and line-widths.
TGTextButton * fCaptureCenter
void UpdateRotator()
Update rotator related variables.
Sub-editor for TGLLightSet.
TGCheckButton * fLineSmooth
TGNumberEntry * fSceneRotDt
void CreateExtrasTab()
Create Extra Tab controls - camera rotator and stereo.
TGNumberEntry * fARotDt
void SetGuides()
Configuration of guides GUI called from SetModel().
TGLLightSetSubEditor * fLightSet
void DoIgnoreSizesOnUpdate()
ResetCamerasOnUpdate was toggled.
TGNumberEntry * fReferencePosX
void DoResetCamerasOnUpdate()
ResetCamerasOnUpdate was toggled.
TGNumberEntry * fMaxSceneDrawTimeHQ
void CreateGuidesTab()
Create "Guides" tab.
void DoCameraCenterExt()
Set external camera center.
TGTextButton * fUpdateScene
TGNumberEntry * fPointSizeScale
TGNumberEntry * fARotADolly
void DoUpdateScene()
UpdateScene was clicked.
void DoRotatorStop()
Stop auto-rotator.
TGCheckButton * fPointSmooth
TGNumberEntry * fCameraCenterX
unsigned int UInt_t
Definition: RtypesCore.h:42
TMarker * m
Definition: textangle.C:8
TGLClipSetSubEditor * fClipSet
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:53
TGComboBox * fCamMode
TGCompositeFrame * fGuidesFrame
TGCheckButton * fIgnoreSizesOnUpdate
TGNumberEntry * fARotWTheta
void DoASavImageStop()
Stop auto-rotator image auto-save.
void DoCaptureCenter()
Capture camera-center via picking.
void DoDrawCameraCenter()
Draw camera center.
void DoClearColor(Pixel_t color)
Clear-color was changed.
TGButtonGroup * fAxesContainer
TGCheckButton * fRotateSceneOn
TGCheckButton * fAxesDepthTest
TGNumberEntry * fReferencePosZ
TGGroupFrame * fCamContainer
static TGNumberEntry * MakeLabeledNEntry(TGCompositeFrame *p, const char *name, Int_t labelw, Int_t nd=7, Int_t s=5)
Helper function to create fixed width TGLabel and TGNumberEntry in same row.
TGLViewerEditor & operator=(const TGLViewerEditor &)
TGRadioButton * fAxesEdge
TGNumberEntry * fStereoEyeOffsetFac
Mother of all ROOT objects.
Definition: TObject.h:37
TGLViewerEditor(const TGLViewerEditor &)
void UpdateMaxDrawTimes()
Slot for fMaxSceneDrawTimeHQ and fMaxSceneDrawTimeLQ.
TGNumberEntry * fARotATheta
TGNumberEntry * fStereoFrustumAsymFac
TGNumberEntry * fOLLineWidth
TGNumberEntry * fARotWDolly
TGCheckButton * fCaptureAnnotate
void DoASavImageStart()
Start auto-rotator image auto-save.
TGNumberEntry * fMaxSceneDrawTimeLQ
TGRadioButton * fAxesNone
void DoCameraHome()
CameraHome was clicked.
void CreateStyleTab()
Creates "Style" tab.
void DoRotatorStart()
Start auto-rotator.
TGCheckButton * fCamOverlayOn
char name[80]
Definition: TGX11.cxx:109
void UpdateViewerReference()
Update viewer with GUI state.
TGLViewer * fViewer
void UpdateReferencePosState()
Enable/disable reference position (x/y/z) number edits based on reference check box.