Logo ROOT   6.10/09
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 #include "TGedFrame.h"
18 
19 #include "TGLUtil.h"
20 
21 class TGCheckButton;
22 class TGNumberEntry;
23 class TGButtonGroup;
24 class TGroupFrame;
25 class TGRadioButton;
26 class TGColorSelect;
27 class TGComboBox;
28 class TGButton;
29 class TGTextEntry;
30 class TGLViewer;
31 class TGTab;
32 
35 
36 class TGLViewerEditor : public TGedFrame
37 {
38 private:
39  //Pointers to manipulate with tabs
43 
45 
51 
54 
61 
62  //"Guides" tab's controls
69 
71 
78 
84 
88 
90 
91  //'Extras' tab.
94 
98 
101 
105 
106  // Model
109 
110  void ConnectSignals2Slots();
111 
114 
115  void CreateStyleTab();
116  void CreateGuidesTab();
117  void CreateClippingTab();
118  void CreateExtrasTab();
119 
121 
122 public:
123  TGLViewerEditor(const TGWindow *p=0, Int_t width=140, Int_t height=30,
126 
127  virtual void ViewerRedraw();
128 
129  virtual void SetModel(TObject* obj);
130 
131  void SetGuides();
132  void DoClearColor(Pixel_t color);
133  void DoIgnoreSizesOnUpdate();
134  void DoResetCamerasOnUpdate();
135  void DoUpdateScene();
136  void DoCameraHome();
137  void UpdateMaxDrawTimes();
138  void UpdatePointLineStuff();
139  void DoCameraCenterExt();
140  void DoCaptureCenter();
141  void DoAnnotation();
142  void DoDrawCameraCenter();
143  void UpdateCameraCenter();
144  // Axis manipulation
145  void UpdateViewerAxes(Int_t id);
146  void UpdateViewerReference();
147  void DoCameraOverlay();
148  // Extras
149  void SetRotatorMode();
150  void UpdateRotator();
151  void DoRotatorStart();
152  void DoRotatorStop();
153  void DoASavImageGUIBaseName(const char* t);
155  void DoASavImageStart();
156  void DoASavImageStop();
157  void UpdateStereo();
158 
159  void DetachFromPad(){fIsInPad = kFALSE;}
160 
161  static TGNumberEntry* MakeLabeledNEntry(TGCompositeFrame* p, const char* name,
162  Int_t labelw, Int_t nd=7, Int_t s=5);
163 
164  ClassDef(TGLViewerEditor, 0); //GUI for editing TGLViewer attributes
165 };
166 
167 #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:62
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
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:297
ULong_t Pixel_t
Definition: GuiTypes.h:39
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
const Bool_t kFALSE
Definition: RtypesCore.h:92
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
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.