111 fClearColor->Connect(
"ColorSelected(Pixel_t)",
"TGLViewerEditor",
this,
"DoClearColor(Pixel_t)");
112 fIgnoreSizesOnUpdate->Connect(
"Toggled(Bool_t)",
"TGLViewerEditor",
this,
"DoIgnoreSizesOnUpdate()");
113 fResetCamerasOnUpdate->Connect(
"Toggled(Bool_t)",
"TGLViewerEditor",
this,
"DoResetCamerasOnUpdate()");
114 fUpdateScene->Connect(
"Pressed()",
"TGLViewerEditor",
this,
"DoUpdateScene()");
115 fCameraHome->Connect(
"Pressed()",
"TGLViewerEditor",
this,
"DoCameraHome()");
116 fMaxSceneDrawTimeHQ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateMaxDrawTimes()");
117 fMaxSceneDrawTimeLQ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateMaxDrawTimes()");
118 fPointSizeScale->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
119 fLineWidthScale->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
120 fPointSmooth->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
121 fLineSmooth ->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
122 fWFLineWidth->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
123 fOLLineWidth->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
125 fCameraCenterExt->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoCameraCenterExt()");
126 fCaptureCenter->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoCaptureCenter()");
127 fDrawCameraCenter->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoDrawCameraCenter()");
128 fCameraCenterX->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateCameraCenter()");
129 fCameraCenterY->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateCameraCenter()");
130 fCameraCenterZ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateCameraCenter()");
132 fCaptureAnnotate->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoAnnotation()");
134 fAxesContainer->Connect(
"Clicked(Int_t)",
"TGLViewerEditor",
this,
"UpdateViewerAxes(Int_t)");
136 fReferenceOn->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"UpdateViewerReference()");
137 fReferencePosX->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateViewerReference()");
138 fReferencePosY->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateViewerReference()");
139 fReferencePosZ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateViewerReference()");
141 fCamMode->Connect(
"Selected(Int_t)",
"TGLViewerEditor",
this,
"DoCameraOverlay()");
142 fCamOverlayOn->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoCameraOverlay()");
145 fRotateSceneOn->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"SetRotatorMode()");
147 fSceneRotDt->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
148 fARotDt ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
149 fARotWPhi ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
150 fARotATheta->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
151 fARotWTheta->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
152 fARotADolly->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
153 fARotWDolly->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
155 fASavImageGUIBaseName->Connect(
"TextChanged(char*",
"TGLViewerEditor",
this,
"DoASavImageGUIBaseName(char*)");
156 fASavImageGUIOutMode->Connect(
"Clicked(Int_t)",
"TGLViewerEditor",
this,
"DoASavImageGUIOutMode(Int_t)");
158 fStereoZeroParallax ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateStereo()");
159 fStereoEyeOffsetFac ->Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateStereo()");
161 fStereoZeroParallax ->Connect(
"ValueChanged(Long_t)",
"TGLViewerEditor",
this,
"UpdateStereo()");
162 fStereoEyeOffsetFac ->Connect(
"ValueChanged(Long_t)",
"TGLViewerEditor",
this,
"UpdateStereo()");
239 Bool_t rotate_standard = !
fViewer->GetAutoRotator()->GetRotateScene();
241 SetLabeledNEntryState(
fSceneRotDt, ! rotate_standard);
242 SetLabeledNEntryState(
fARotDt, rotate_standard);
243 SetLabeledNEntryState(
fARotWPhi, rotate_standard);
244 SetLabeledNEntryState(
fARotATheta, rotate_standard);
245 SetLabeledNEntryState(
fARotWTheta, rotate_standard);
246 SetLabeledNEntryState(
fARotADolly, rotate_standard);
247 SetLabeledNEntryState(
fARotWDolly, rotate_standard);
337 if (
fViewer->CurrentCamera().IsPerspective())
409 for (
Int_t i = 1; i < 4; i++) {
472 fMaxSceneDrawTimeHQ->GetNumberEntry()->SetToolTipText(
"Maximum time spent in scene drawing\nin high-quality mode [ms].");
475 fMaxSceneDrawTimeLQ->GetNumberEntry()->SetToolTipText(
"Maximum time spent in scene drawing\nin low-quality mode (during rotation etc).");
486 fLightSet->Connect(
"Changed()",
"TGLViewerEditor",
this,
"ViewerRedraw()");
583 fClipSet->Connect(
"Changed()",
"TGLViewerEditor",
this,
"ViewerRedraw()");
602 fRotateSceneOn->SetToolTipText(
"This covers a very specific use-case and is most likely not what you need.\nProceed at your own risk. Sorry about that.");
630 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoRotatorStart()");
634 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoRotatorStop()");
660 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoASavImageStart()");
664 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoASavImageStop()");
710 fViewer->GetGuideState(
fAxesType, axesDepthTest, referenceOn, referencePos);
712 for (
Int_t i = 1; i < 4; i++) {
731 if (
fViewer->CurrentCamera().IsOrthographic())
823 fViewer->GetAutoRotator()->Stop();
832 r->SetImageGUIBaseName(t);
841 r->SetImageGUIOutMode(
m);
850 if (
r->GetImageAutoSave())
852 Warning(
"DoASavImageStart",
"AutoSave in progress.");
856 r->StartImageAutoSaveWithGUISettings();
865 if (!
r->GetImageAutoSave())
867 Warning(
"DoASavImageStop",
"AutoSave not in progress.");
871 r->StopImageAutoSave();
908 ::Error(
"FindLabelForNEntry",
"parameter 'entry' is null");
915 if (
TList *
const parents = grandpa->GetList()) {
916 TIter next1(parents);
919 if (
TList *
const children = parent->GetList()) {
920 TIter next2(children);
922 if ((label =
dynamic_cast<TGLabel *
>(candidate->fFrame)))
945 ::Error(
"SetLabeledNEntryState",
"parameter 'entry' is null");
950 if (
TGLabel *
const label = FindLabelForNEntry(entry))
ULong_t Pixel_t
Pixel value.
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
Error("WriteTObject","The current directory (%s) is not associated with a file. The object (%s) has not been written.", GetName(), objname)
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
static Int_t GetColor(const char *hexcolor)
static ULong_t Number2Pixel(Int_t ci)
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
TGCompositeFrame(const TGCompositeFrame &)=delete
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void MapWindow() override
map window
void UnmapWindow() override
unmap window
A composite frame with a border and a title.
A composite frame that layout their children in horizontal way.
Automatically rotates GL camera.
A GL overlay element which displays camera furstum.
void SetShowPerspective(Bool_t x)
Int_t GetPerspectiveMode() const
void SetShowOrthographic(Bool_t x)
Int_t GetOrthographicMode() const
Bool_t GetShowPerspective() const
Bool_t GetShowOrthographic() const
void SetPerspectiveMode(EMode m)
void SetOrthographicMode(EMode m)
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Double_t * GetCenterVec()
Bool_t GetExternalCenter()
void SetExternalCenter(Bool_t x)
Set camera center diffrent than scene center, if enable is kTRUE.
void SetCenterVec(Double_t x, Double_t y, Double_t z)
Set camera center vector.
GUI sub-editor for TGLClipSet.
Sub-editor for TGLLightSet.
TGButtonGroup * fAxesContainer
void DoDrawCameraCenter()
Draw camera center.
void DoUpdateScene()
UpdateScene was clicked.
TGCompositeFrame * fGuidesFrame
void DoCameraHome()
CameraHome was clicked.
void DoCaptureCenter()
Capture camera-center via picking.
void DoCameraCenterExt()
Set external camera center.
void DoASavImageGUIBaseName(const char *t)
Update base-name.
TGLLightSetSubEditor * fLightSet
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.
void UpdateCameraCenter()
Update current camera with GUI state.
TGNumberEntry * fPointSizeScale
void DoClearColor(Pixel_t color)
Clear-color was changed.
void UpdatePointLineStuff()
Slot for point-sizes and line-widths.
TGCompositeFrame * fClipFrame
TGCheckButton * fPointSmooth
TGCheckButton * fReferenceOn
TGNumberEntry * fARotWDolly
TGNumberEntry * fCameraCenterY
void SetGuides()
Configuration of guides GUI called from SetModel().
void DoRotatorStart()
Start auto-rotator.
TGNumberEntry * fStereoEyeOffsetFac
void UpdateViewerReference()
Update viewer with GUI state.
void CreateClippingTab()
Create GUI controls - clip type (none/plane/box) and plane/box properties.
TGCheckButton * fLineSmooth
void SetModel(TObject *obj) override
Sets model or disables/hides viewer.
TGNumberEntry * fMaxSceneDrawTimeLQ
TGCheckButton * fRotateSceneOn
void DoRotatorStop()
Stop auto-rotator.
TGNumberEntry * fARotATheta
TGCheckButton * fDrawCameraCenter
TGNumberEntry * fSceneRotDt
void UpdateStereo()
Update stereo related variables.
void UpdateMaxDrawTimes()
Slot for fMaxSceneDrawTimeHQ and fMaxSceneDrawTimeLQ.
TGNumberEntry * fReferencePosY
TGGroupFrame * fRefContainer
void UpdateReferencePosState()
Enable/disable reference position (x/y/z) number edits based on reference check box.
TGCheckButton * fResetCamerasOnUpdate
TGLClipSetSubEditor * fClipSet
TGCheckButton * fIgnoreSizesOnUpdate
TGCheckButton * fCameraCenterExt
TGNumberEntry * fCameraCenterX
TGNumberEntry * fReferencePosZ
TGRadioButton * fAxesEdge
TGNumberEntry * fCameraCenterZ
void DoIgnoreSizesOnUpdate()
ResetCamerasOnUpdate was toggled.
void DoASavImageGUIOutMode(Int_t m)
Update output mode.
TGNumberEntry * fARotADolly
TGLViewerEditor(const TGLViewerEditor &)
TGCheckButton * fCamOverlayOn
TGTextButton * fUpdateScene
void CreateExtrasTab()
Create Extra Tab controls - camera rotator and stereo.
TGCompositeFrame * fStereoFrame
void DoASavImageStop()
Stop auto-rotator image auto-save.
void CreateGuidesTab()
Create "Guides" tab.
void CreateStyleTab()
Creates "Style" tab.
TGButtonGroup * fASavImageGUIOutMode
TGNumberEntry * fReferencePosX
TGRadioButton * fAxesOrigin
void DoAnnotation()
Create annotation via picking.
virtual void ViewerRedraw()
Initiate redraw of the viewer.
TGNumberEntry * fOLLineWidth
TGNumberEntry * fARotWPhi
TGRadioButton * fAxesNone
void DoCameraOverlay()
Update viewer with GUI state.
TGColorSelect * fClearColor
TGNumberEntry * fMaxSceneDrawTimeHQ
TGCheckButton * fCaptureAnnotate
TGNumberEntry * fWFLineWidth
void DoASavImageStart()
Start auto-rotator image auto-save.
void DoResetCamerasOnUpdate()
ResetCamerasOnUpdate was toggled.
TGGroupFrame * fCamContainer
TGNumberEntry * fStereoFrustumAsymFac
TGTextButton * fCameraHome
~TGLViewerEditor() override
TGNumberEntry * fARotWTheta
void UpdateViewerAxes(Int_t id)
Update viewer with GUI state.
TGNumberEntry * fLineWidthScale
TGCheckButton * fAxesDepthTest
TGTextEntry * fASavImageGUIBaseName
TGNumberEntry * fStereoZeroParallax
void UpdateRotator()
Update rotator related variables.
void ConnectSignals2Slots()
Connect signals to slots.
TGTextButton * fCaptureCenter
Base GL viewer object - used by both standalone and embedded (in pad) GL.
This class handles GUI labels.
virtual void Disable(Bool_t on=kTRUE)
This class describes layout hints used by the layout classes.
A listbox is a box, possibly with scrollbar, containing entries.
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
TGNumberEntry is a number entry input widget with up/down buttons.
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
Yield an action as soon as it is clicked.
A TGTextEntry is a one line text input widget.
ROOT GUI Window base class.
const TGWindow * GetParent() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
TGedFrame(const TGedFrame &)=delete
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
Mother of all ROOT objects.