54 fIgnoreSizesOnUpdate(0),
55 fResetCamerasOnUpdate(0),
58 fMaxSceneDrawTimeHQ(0),
59 fMaxSceneDrawTimeLQ(0),
60 fPointSizeScale(0), fLineWidthScale(0),
61 fPointSmooth(0), fLineSmooth(0),
62 fWFLineWidth(0), fOLLineWidth(0),
85 fARotDt(0), fARotWPhi(0), fARotATheta(0), fARotWTheta(0), fARotADolly(0), fARotWDolly(0),
86 fASavImageGUIBaseName(0), fASavImageGUIOutMode(0),
87 fStereoZeroParallax(0), fStereoEyeOffsetFac(0), fStereoFrustumAsymFac(0),
112 fClearColor->
Connect(
"ColorSelected(Pixel_t)",
"TGLViewerEditor",
this,
"DoClearColor(Pixel_t)");
122 fLineSmooth ->
Connect(
"Clicked()",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
123 fWFLineWidth->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
124 fOLLineWidth->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdatePointLineStuff()");
142 fCamMode->
Connect(
"Selected(Int_t)",
"TGLViewerEditor",
this,
"DoCameraOverlay()");
149 fARotDt ->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
150 fARotWPhi ->
Connect(
"ValueSet(Long_t)",
"TGLViewerEditor",
this,
"UpdateRotator()");
242 SetLabeledNEntryState(
fSceneRotDt, ! rotate_standard);
243 SetLabeledNEntryState(
fARotDt, rotate_standard);
244 SetLabeledNEntryState(
fARotWPhi, rotate_standard);
245 SetLabeledNEntryState(
fARotATheta, rotate_standard);
246 SetLabeledNEntryState(
fARotWTheta, rotate_standard);
247 SetLabeledNEntryState(
fARotADolly, rotate_standard);
248 SetLabeledNEntryState(
fARotWDolly, rotate_standard);
410 for (
Int_t i = 1; i < 4; i++) {
584 fClipSet->
Connect(
"Changed()",
"TGLViewerEditor",
this,
"ViewerRedraw()");
603 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.");
631 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoRotatorStart()");
635 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoRotatorStop()");
661 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoASavImageStart()");
665 b->Connect(
"Clicked()",
"TGLViewerEditor",
this,
"DoASavImageStop()");
713 for (
Int_t i = 1; i < 4; i++) {
833 r->SetImageGUIBaseName(t);
842 r->SetImageGUIOutMode(
m);
851 if (
r->GetImageAutoSave())
853 Warning(
"DoASavImageStart",
"AutoSave in progress.");
857 r->StartImageAutoSaveWithGUISettings();
866 if (!
r->GetImageAutoSave())
868 Warning(
"DoASavImageStop",
"AutoSave not in progress.");
872 r->StopImageAutoSave();
909 ::Error(
"FindLabelForNEntry",
"parameter 'entry' is null");
916 if (
TList *
const parents = grandpa->GetList()) {
917 TIter next1(parents);
920 if (
TList *
const children = parent->GetList()) {
921 TIter next2(children);
923 if ((label =
dynamic_cast<TGLabel *
>(candidate->fFrame)))
946 ::Error(
"SetLabeledNEntryState",
"parameter 'entry' is null");
951 if (
TGLabel *
const label = FindLabelForNEntry(entry))
ULong_t Pixel_t
Pixel value.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
void Warning(const char *location, const char *msgfmt,...)
Use this function in warning situations.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t button
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Like a checkbutton but instead of the check mark there is color area with a little down arrow.
void SetColor(Pixel_t color, Bool_t emit=kTRUE)
Set color.
void Enable(Bool_t on=kTRUE)
Set state of widget as enabled.
A combobox (also known as a drop down listbox) allows the selection of one item out of a list of item...
virtual Int_t GetSelected() const
virtual void AddEntry(TGString *s, Int_t id)
virtual TGListBox * GetListBox() const
virtual void Select(Int_t id, Bool_t emit=kTRUE)
Make the selected item visible in the combo box window and emit signals according to the second param...
The base class for composite widgets (menu bars, list boxes, etc.).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
virtual TList * GetList() const
void MapSubwindows() override
Map all sub windows that are part of the composite frame.
virtual void ShowFrame(TGFrame *f)
Show sub frame.
virtual void HideFrame(TGFrame *f)
Hide sub frame.
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the 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.
void Stop()
Stop the auto-rotator.
Bool_t GetRotateScene() const
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...
virtual Bool_t IsPerspective() const
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.
virtual Bool_t IsOrthographic() const
GUI sub-editor for TGLClipSet.
void SetModel(TGLClipSet *m)
Set model object.
void SetColor(Int_t r, Int_t g, Int_t b, Int_t a=255)
Set color with Int_t values.
Color_t GetColorIndex() const
Returns color-index representing the color.
Sub-editor for TGLLightSet.
void SetModel(TGLLightSet *m)
New model was set, refresh data.
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).
void SetOLLineW(Float_t w)
TGLRnrCtx & RnrCtx() const
void SetWFLineW(Float_t w)
GUI editor for TGLViewer.
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.
void SetDrawCameraCenter(Bool_t x)
Draw camera look at and rotation point.
void SetMaxSceneDrawTimeLQ(Float_t t)
void SetStereoFrustumAsymFac(Float_t f)
Float_t GetStereoEyeOffsetFac() const
EPushAction GetPushAction() const
Bool_t GetSmoothPoints() const
TGLCameraOverlay * GetCameraOverlay() const
Bool_t GetSmoothLines() const
Float_t GetStereoZeroParallax() const
Float_t GetMaxSceneDrawTimeLQ() const
Bool_t GetDrawCameraCenter()
Float_t GetPointScale() const
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...
void SetGuideState(Int_t axesType, Bool_t axesDepthTest, Bool_t referenceOn, const Double_t *referencePos)
Set the state of guides (axes & reference markers) from arguments.
TGLLightSet * GetLightSet() const
void SetIgnoreSizesOnUpdate(Bool_t v)
TGLCamera & CurrentCamera() const
Float_t GetStereoFrustumAsymFac() const
void SetStereoEyeOffsetFac(Float_t f)
TGLClipSet * GetClipSet() const
Bool_t IsUsingDefaultColorSet() const
Check if the viewer is using the default color set.
void SetSmoothPoints(Bool_t s)
void UpdateScene(Bool_t redraw=kTRUE)
Force update of pad-scenes.
void SetLineScale(Float_t s)
void SetMaxSceneDrawTimeHQ(Float_t t)
void SetPointScale(Float_t s)
void SetStereoZeroParallax(Float_t f)
void SetSmoothLines(Bool_t s)
Float_t GetLineScale() const
Bool_t GetIgnoreSizesOnUpdate() const
TGLAutoRotator * GetAutoRotator()
Get the auto-rotator for this viewer.
Bool_t GetResetCamerasOnUpdate() const
Float_t GetMaxSceneDrawTimeHQ() const
void GetGuideState(Int_t &axesType, Bool_t &axesDepthTest, Bool_t &referenceOn, Double_t *referencePos) const
Fetch the state of guides (axes & reference markers) into arguments.
void SetResetCamerasOnUpdate(Bool_t v)
void ResetCurrentCamera()
Resets position/rotation of current camera to default values.
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.
TGNumberEntryField * GetNumberEntry() const
Get the number entry field.
virtual void SetLimits(ELimit limits=TGNumberFormat::kNELNoLimits, Double_t min=0, Double_t max=1)
virtual void SetState(Bool_t enable=kTRUE)
Set the active state.
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
Yield an action as soon as it is clicked.
virtual void SetTextColor(Pixel_t color, Bool_t global=kFALSE)
Changes text color.
A TGTextEntry is a one line text input widget.
virtual void SetDefaultSize(UInt_t w, UInt_t h)
Set the default / minimal size of the widget.
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
virtual void SetText(const char *text, Bool_t emit=kTRUE)
Sets text entry to text, clears the selection and moves the cursor to the end of the line.
ROOT GUI Window base class.
const TGWindow * GetParent() const
virtual Bool_t IsMapped()
Returns kTRUE if window is mapped on screen, kFALSE otherwise.
Base frame for implementing GUI - a service class.
virtual TGVerticalFrame * CreateEditorTabSubFrame(const char *name)
Create a vertical frame to be used by 'owner' in extra tab 'name'.
Bool_t fInit
init flag for setting signals/slots
virtual void MakeTitle(const char *title)
Create attribute frame title.
TObject * Last() const override
Return the last object in the list. Returns 0 when list is empty.
Mother of all ROOT objects.
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.