Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGL5DDataSetEditor.cxx
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Bertrand Bellenot 2009
3
4/*************************************************************************
5 * Copyright (C) 1995-2009, 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#include <string>
12#include <map>
13
14#include "TGDoubleSlider.h"
15#include "TGColorSelect.h"
16#include "TGNumberEntry.h"
17#include "TVirtualPad.h"
18#include "TGListBox.h"
19#include "TGSlider.h"
20#include "TGButton.h"
21#include "TGLabel.h"
22#include "TString.h"
23#include "TColor.h"
24#include "TAxis.h"
25
26#include "TGL5DDataSetEditor.h"
27#include "TGL5DPainter.h"
28#include "TGLUtil.h"
29#include "TGL5D.h"
30
31/** \class TGL5DDataSetEditor
32\ingroup opengl
33GUI editor for OpenGL 5D Painter.
34Exception safety and ROOT's GUI are two
35mutually exclusive things. So, only ROOT's GUI here.
36*/
37
38namespace {
39
40typedef TGL5DPainter::SurfIter_t SurfIter_t;
41typedef std::map<Int_t, SurfIter_t> IterMap_t;
42typedef IterMap_t::iterator IterMapIter_t;
43
44}
45
46//
47//Pimpl.
48//
50public:
51 IterMap_t fIterators;
53 {
54 return fIterators.find(index) != fIterators.end();
55 }
56};
57
58
59////////////////////////////////////////////////////////////////////////////////
60
62 UInt_t options, Pixel_t back) :
63 TGedFrame(p, width, height, options | kVerticalFrame, back),
64 //"Grid" tab.
65 fNCellsXEntry(nullptr),
66 fNCellsYEntry(nullptr),
67 fNCellsZEntry(nullptr),
68 fXRangeSlider(nullptr),
69 fXRangeSliderMin(nullptr),
70 fXRangeSliderMax(nullptr),
71 fYRangeSlider(nullptr),
72 fYRangeSliderMin(nullptr),
73 fYRangeSliderMax(nullptr),
74 fZRangeSlider(nullptr),
75 fZRangeSliderMin(nullptr),
76 fZRangeSliderMax(nullptr),
77 fCancelGridBtn(nullptr),
78 fOkGridBtn(nullptr),
79 //"Surfaces" tab.
80 fV4MinEntry(nullptr),
81 fV4MaxEntry(nullptr),
82 fHighlightCheck(nullptr),
83 fIsoList(nullptr),
84 fVisibleCheck(nullptr),
85 fShowCloud(nullptr),
86 fSurfColorSelect(nullptr),
87 fSurfAlphaSlider(nullptr),
88 fSurfRemoveBtn(nullptr),
89 fNewIsoEntry(nullptr),
90 fAddNewIsoBtn(nullptr),
91 //"Style" tab's widgets.
92 fShowBoxCut(),
93 fNumberOfPlanes(nullptr),
94 fAlpha(nullptr),
95 fLogScale(nullptr),
96 fSlideRange(nullptr),
97 fApplyAlpha(nullptr),
98 fApplyPlanes(nullptr),
99 //Model.
100 fDataSet(nullptr),
101 fPainter(nullptr),
102 fHidden(nullptr),
103 fSelectedSurface(-1)
104{
105 //Constructor.
108 CreateIsoTab();
109
111}
112
113//______________________________________________________________________________
114
116{
117 //Destructor.
118 delete fHidden;
119}
120
121////////////////////////////////////////////////////////////////////////////////
122///Connect signals to slots.
123
125{
126 //Controls from "Style" tab.
127 fShowBoxCut->Connect("Toggled(Bool_t)", "TGL5DDataSetEditor", this, "BoxCutToggled()");
128 fAlpha->Connect("ValueChanged(Long_t)", "TGL5DDataSetEditor", this, "AlphaChanged()");
129 fAlpha->Connect("ValueSet(Long_t)", "TGL5DDataSetEditor", this, "AlphaChanged()");
130 fNumberOfPlanes->Connect("ValueChanged(Long_t)", "TGL5DDataSetEditor", this, "NContoursChanged()");
131 fNumberOfPlanes->Connect("ValueSet(Long_t)", "TGL5DDataSetEditor", this, "NContoursChanged()");
132 fApplyPlanes->Connect("Clicked()", "TGL5DDataSetEditor", this, "ApplyPlanes()");
133 fApplyAlpha->Connect("Clicked()", "TGL5DDataSetEditor", this, "ApplyAlpha()");
134
135 //Controls from "Grid" tab.
136 fNCellsXEntry->Connect("ValueSet(Long_t)", "TGL5DDataSetEditor", this, "GridParametersChanged()");
137 fNCellsXEntry->Connect("ValueChanged(Long_t)", "TGL5DDataSetEditor", this, "GridParametersChanged()");
138
139 fNCellsYEntry->Connect("ValueSet(Long_t)", "TGL5DDataSetEditor", this, "GridParametersChanged()");
140 fNCellsZEntry->Connect("ValueSet(Long_t)", "TGL5DDataSetEditor", this, "GridParametersChanged()");
141
142 fXRangeSlider->Connect("PositionChanged()", "TGL5DDataSetEditor", this, "XSliderChanged()");
143 fXRangeSliderMin->Connect("ReturnPressed()", "TGL5DDataSetEditor", this, "XSliderSetMin()");
144 fXRangeSliderMax->Connect("ReturnPressed()", "TGL5DDataSetEditor", this, "XSliderSetMax()");
145
146 fYRangeSlider->Connect("PositionChanged()", "TGL5DDataSetEditor", this, "YSliderChanged()");
147 fYRangeSliderMin->Connect("ReturnPressed()", "TGL5DDataSetEditor", this, "YSliderSetMin()");
148 fYRangeSliderMax->Connect("ReturnPressed()", "TGL5DDataSetEditor", this, "YSliderSetMax()");
149
150 fZRangeSlider->Connect("PositionChanged()", "TGL5DDataSetEditor", this, "ZSliderChanged()");
151 fZRangeSliderMin->Connect("ReturnPressed()", "TGL5DDataSetEditor", this, "ZSliderSetMin()");
152 fZRangeSliderMax->Connect("ReturnPressed()", "TGL5DDataSetEditor", this, "ZSliderSetMax()");
153
154 fCancelGridBtn->Connect("Pressed()", "TGL5DDataSetEditor", this, "RollbackGridParameters()");
155 fOkGridBtn->Connect("Pressed()", "TGL5DDataSetEditor", this, "ApplyGridParameters()");
156
157 //Controls from "Surfaces" tab.
158 fIsoList->Connect("Selected(Int_t)", "TGL5DDataSetEditor", this, "SurfaceSelected(Int_t)");
159 fIsoList->GetContainer()->RemoveInput(kKeyPressMask);
160
161 fHighlightCheck->Connect("Clicked()", "TGL5DDataSetEditor", this, "HighlightClicked()");
162 fVisibleCheck->Connect("Clicked()", "TGL5DDataSetEditor", this, "VisibleClicked()");
163 fSurfColorSelect->Connect("ColorSelected(Pixel_t)", "TGL5DDataSetEditor", this, "ColorChanged(Pixel_t)");
164 fSurfAlphaSlider->Connect("PositionChanged(Int_t)", "TGL5DDataSetEditor", this, "AlphaChanged(Int_t)");
165 fSurfRemoveBtn->Connect("Pressed()", "TGL5DDataSetEditor", this, "RemoveSurface()");
166
167 fAddNewIsoBtn->Connect("Pressed()", "TGL5DDataSetEditor", this, "AddNewSurface()");
168
169 fInit = kFALSE;
170}
171
172
173namespace
174{
175
176// Auxiliary functions.
177
178////////////////////////////////////////////////////////////////////////////////
179
182 const TString &maxToolTip)
183{
184 TGCompositeFrame *frame = new TGCompositeFrame(parent, 80, 20, kHorizontalFrame);
185
188 minEntry->SetToolTipText(minToolTip.Data());
189 minEntry->Resize(57, 20);
190 frame->AddFrame(minEntry, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
191
194 maxEntry->SetToolTipText(maxToolTip.Data());
195 maxEntry->Resize(57, 20);
196 frame->AddFrame(maxEntry, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
197 parent->AddFrame(frame, new TGLayoutHints(kLHintsTop, 5, 0, 0, 0));
198}
199
200////////////////////////////////////////////////////////////////////////////////
201
203{
205 TGLabel *label = new TGLabel(frame, text);
206 frame->AddFrame(label, new TGLayoutHints(kLHintsLeft | kLHintsBottom, 0, 0, 0));
207 p->AddFrame(frame, new TGLayoutHints(kLHintsLeft, 0, 0, 1, 0));
208
209 return frame;
210}
211
212////////////////////////////////////////////////////////////////////////////////
213
215{
218 sliderFrame->AddFrame(sliderLabel,
219 new TGLayoutHints(kLHintsCenterY | kLHintsLeft, 2, 2, 2, 2));
221 slider->Resize(110, 20);
222
224 parent->AddFrame(sliderFrame, new TGLayoutHints(kLHintsTop, 2, 2, 2, 2));
225
226 return slider;
227}
228
229}
230
231////////////////////////////////////////////////////////////////////////////////
232/// Creates "Style" tab.
233
235{
237 //MakeTitle("Update behaviour");
238 fShowBoxCut = new TGCheckButton(this, "Show Box Cut");
239 fShowBoxCut->SetToolTipText("Box cut. When attached to a plot, cuts away a part of it");
241
242 MakeTitle("isosurfaces");
243 f = new TGHorizontalFrame(this, 200, 50);
244 f->AddFrame(new TGLabel(f, "Number:"), new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));
247 fNumberOfPlanes->GetNumberEntry()->SetToolTipText("Set number of isosurfaces");
248 f->AddFrame(fNumberOfPlanes, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2));
249 fApplyPlanes = new TGTextButton(f, " Apply ");
250 f->AddFrame(fApplyPlanes, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
252 //fApplyPlanes->SetState(kButtonDisabled);
253
254 MakeTitle("Alpha");
255 f = new TGHorizontalFrame(this, 200, 50);
256 f->AddFrame(new TGLabel(f, "Value:"), new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 5, 2, 2, 2));
259 fAlpha->GetNumberEntry()->SetToolTipText("Value of alpha parameter");
260 f->AddFrame(fAlpha, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2));
261 fApplyAlpha = new TGTextButton(f, " Apply ");
262 f->AddFrame(fApplyAlpha, new TGLayoutHints(kLHintsLeft | kLHintsCenterY, 2, 2, 2, 2));
265
266 fLogScale = new TGCheckButton(this, "Log Scale");
268
269 AddFrame(new TGLabel(this, "Slide Range:"), new TGLayoutHints(kLHintsLeft, 5, 2, 2, 2));
272}
273
274////////////////////////////////////////////////////////////////////////////////
275///Tab, containing controls to set
276///the ranges and number of cells in a grid.
277
279{
281 //1. The first part of the tab - "Grid parameters" group.
282 TGGroupFrame *gridGroup = new TGGroupFrame(tabFrame, "Grid parameters", kVerticalFrame);
283 //2. Numeric entries.
284 const UInt_t min = 10, max = 300;
285 const UInt_t nDigits = 4;
286
287 TGHorizontalFrame *frame = make_labeled_hframe(gridGroup, "Cells along X:");
290 min, max);
291 frame->AddFrame(fNCellsXEntry,
293 //
294 frame = make_labeled_hframe(gridGroup, "Cells along Y:");
297 min, max);
298 frame->AddFrame(fNCellsYEntry,
300 //
301 frame = make_labeled_hframe(gridGroup, "Cells along Z:");
304 min, max);
305 frame->AddFrame(fNCellsZEntry,
307 tabFrame->AddFrame(gridGroup, new TGLayoutHints(kLHintsTop | kLHintsLeft | kLHintsExpandX, 2, 3, 3, 0));
308
309 //3. The second part - "Ranges" group.
311 //4. Sliders and number entry fields.
313 make_slider_range_entries(rangeGroup, fXRangeSliderMin, "Set the minimum value of the x-axis",
314 fXRangeSliderMax, "Set the maximum value of the x-axis");
316 make_slider_range_entries(rangeGroup, fYRangeSliderMin, "Set the minimum value of the y-axis",
317 fYRangeSliderMax, "Set the maximum value of the y-axis");
319 make_slider_range_entries(rangeGroup, fZRangeSliderMin, "Set the minimum value of the z-axis",
320 fZRangeSliderMax, "Set the maximum value of the z-axis");
321
323
324 //5. Buttons.
328 fOkGridBtn = new TGTextButton(horizontalFrame, " Apply ");
330 tabFrame->AddFrame(horizontalFrame, new TGLayoutHints(kLHintsTop | kLHintsCenterX, 2, 3, 0, 0));
331}
332
333////////////////////////////////////////////////////////////////////////////////
334///Tab, containing controls to work with iso-surfaces.
335
337{
339
340 //1. The first group - contains V4 range (read only number entries with min and max).
342
343 make_slider_range_entries(v4Group, fV4MinEntry, "Minimum value of V4",
344 fV4MaxEntry, "Maximum value of V4");
345
346 tabFrame->AddFrame(v4Group, new TGLayoutHints(kLHintsTop | kLHintsCenterX | kLHintsExpandX, 2, 3, 0, 0));
347 //
350
351 //2. The second group - contains controls to select surface and
352 //manipulate its parameters.
354
355 fHighlightCheck = new TGCheckButton(isoGroup, "Highlight selected");
356 fHighlightCheck->SetToolTipText("Highlight selected surface");
358 isoGroup->AddFrame(fHighlightCheck, new TGLayoutHints(kLHintsLeft, 4, 1, 1, 1));
359
361 fIsoList = new TGListBox(hf);
362 fIsoList->Resize(120, 120);
363 hf->AddFrame(fIsoList, new TGLayoutHints(kLHintsTop | kLHintsLeft, 5, 5, 5, 5));
364 isoGroup->AddFrame(hf, new TGLayoutHints(kLHintsLeft, 2, 1, 1, 1));
365
366 fVisibleCheck = new TGCheckButton(isoGroup, "Visible");
367 fVisibleCheck->SetToolTipText("Show/hide surface");
368 isoGroup->AddFrame(fVisibleCheck, new TGLayoutHints(kLHintsLeft, 4, 1, 1, 1));
369
370 fShowCloud = new TGCheckButton(isoGroup, "Show cloud");
371 fShowCloud->SetToolTipText("Show/hide cloud for surface");
372 isoGroup->AddFrame(fShowCloud, new TGLayoutHints(kLHintsLeft, 4, 1, 1, 1));
373
374 //Sorry, Matevz :) I stole this from TGLViewerEditor :))
376 TGLabel* lab = new TGLabel(hf, "Color");
377 hf->AddFrame(lab, new TGLayoutHints(kLHintsLeft|kLHintsBottom, 1, 4, 8, 3));
378 fSurfColorSelect = new TGColorSelect(hf, 0, -1);
379 hf->AddFrame(fSurfColorSelect, new TGLayoutHints(kLHintsLeft, 1, 1, 8, 1));
380 isoGroup->AddFrame(hf, new TGLayoutHints(kLHintsLeft, 2, 1, 1, 1));
381
382 TGHorizontalFrame *frame = make_labeled_hframe(isoGroup, "Opacity: ");
383 fSurfAlphaSlider = new TGHSlider(frame, 80);
384 fSurfAlphaSlider->SetRange(0, 100);
386
387 fSurfRemoveBtn = new TGTextButton(isoGroup, " Remove surface ");
388 isoGroup->AddFrame(fSurfRemoveBtn, new TGLayoutHints(kLHintsLeft, 2, 2, 2, 2));
390
391 //3. Group with controls to add new iso-surface.
392 TGGroupFrame *newGroup = new TGGroupFrame(tabFrame, "New iso-surface", kVerticalFrame);
395 hf->AddFrame(fNewIsoEntry, new TGLayoutHints(kLHintsLeft | kLHintsExpandX, 2, 2, 2, 2));
396 fNewIsoEntry->Resize(60, 20);
397 fAddNewIsoBtn = new TGTextButton(hf, " Add ");
399 newGroup->AddFrame(hf, new TGLayoutHints(kLHintsLeft, 0, 0, 0, 0));
400
401 tabFrame->AddFrame(newGroup, new TGLayoutHints(kLHintsTop | kLHintsExpandX, 2, 3, 0, 0));
402}
403
404////////////////////////////////////////////////////////////////////////////////
405///Set model or disables/hides viewer.
406
408{
409 fPainter = nullptr;
411
412 if ((fDataSet = dynamic_cast<TGL5DDataSet *>(obj))) {
414
418
421
422 if (fInit)
424 }
425
426 if (needUpdate && gPad)
427 gPad->Update();
428}
429
430namespace {
431
434{
435 slider->SetRange(r.first, r.second);
436 slider->SetPosition(a->GetBinLowEdge(1), a->GetBinUpEdge(a->GetLast()));
437
438 eMin->SetNumber(a->GetBinLowEdge(1));
439 eMin->SetLimits(TGNumberFormat::kNELLimitMinMax, r.first, r.second);
440 eMax->SetNumber(a->GetBinUpEdge(a->GetLast()));
441 eMax->SetLimits(TGNumberFormat::kNELLimitMinMax, r.first, r.second);
442}
443
444}
445
446////////////////////////////////////////////////////////////////////////////////
447///Set "Style" tab's controls from model.
448
455
456////////////////////////////////////////////////////////////////////////////////
457///Set "Grid" tab's controls from model.
458
478
479////////////////////////////////////////////////////////////////////////////////
480///Set "Surfaces" tab's controls from model.
481
483{
485 //V4 range.
486 fV4MinEntry->SetNumber(v4R.first);
487 fV4MaxEntry->SetNumber(v4R.second);
488
490 fHidden->fIterators.clear();
491
492 SurfIter_t curr = fPainter->SurfacesBegin();
493
494 for (Int_t ind = 0; curr != fPainter->SurfacesEnd(); ++curr, ++ind) {
495 TString entry(TString::Format("Level: %f", curr->f4D));
496 fIsoList->AddEntry(entry.Data(), ind);
497 fIsoList->Layout();
498 curr->fHighlight = kFALSE;
499 //I'm saving list's iterators here.
500 //If list modified (surface removed)
501 //- corresponding iterator must be removed,
502 //all other iterators are still valid (thanks to std::list).
503 //If surface added, new iterator must be added at the end.
505 }
506
508 fNewIsoEntry->SetNumber(v4R.first);
509
510 fSelectedSurface = -1;
511}
512
513////////////////////////////////////////////////////////////////////////////////
514///Some of controls in a "Grid" tab was modified.
515
520
521////////////////////////////////////////////////////////////////////////////////
522///Grid parameters were changed, enable "Cancel" and "Apply" buttons.
523
529
530////////////////////////////////////////////////////////////////////////////////
531///Disable "Cancel" and "Apply" buttons.
532
538
539////////////////////////////////////////////////////////////////////////////////
540///Surface was selected in a list box, enable some controls.
541
543{
545// fShowCloud->SetState(kButtonUp);
546// fSurfColorBtn->SetState(kButtonUp);
548}
549
550////////////////////////////////////////////////////////////////////////////////
551///Disable surface controls.
552
560
561////////////////////////////////////////////////////////////////////////////////
562///X slider in a "Grid" tab.
563
571
572////////////////////////////////////////////////////////////////////////////////
573///Y slider in a "Grid" tab.
574
582
583////////////////////////////////////////////////////////////////////////////////
584///Z slider in a "Grid" tab.
585
593
594////////////////////////////////////////////////////////////////////////////////
595///Value in a number entry was modified.
596
606
607////////////////////////////////////////////////////////////////////////////////
608///Value in a number entry was modified.
609
619
620
621////////////////////////////////////////////////////////////////////////////////
622///Value in a number entry was modified.
623
633
634////////////////////////////////////////////////////////////////////////////////
635///Value in a number entry was modified.
636
646
647////////////////////////////////////////////////////////////////////////////////
648///Value in a number entry was modified.
649
660
661////////////////////////////////////////////////////////////////////////////////
662///Value in a number entry was modified.
663
673
674////////////////////////////////////////////////////////////////////////////////
675///"Cancel" button was pressed in a "Grid" tab.
676///Return old values.
677
683
684////////////////////////////////////////////////////////////////////////////////
685///"Apply" button was pressed in a "Grid" tab.
686///Modify all meshes.
687
708
709////////////////////////////////////////////////////////////////////////////////
710///Check, if selected surface must be highlighted.
711
713{
714 if (fSelectedSurface == -1)
715 return;
716
718
719 if (gPad)
720 gPad->Update();
721}
722
723////////////////////////////////////////////////////////////////////////////////
724///Surface was selected in a list box.
725///Enable surface controls and set them into
726///correct state.
727
729{
730 if (id >= 0) {
731 //Check, if the index is valid.
732 if (!fHidden->IsValid(id)) {
733 Error("SurfaceSelected", "Got wrong index %d", id);
734 return;
735 }
736
737 if (fSelectedSurface != -1) {
738 //Previously selected surface IS ALWAYS
739 //valid index, so no index check here.
741 }
742
744
745
746 SurfIter_t surf = fHidden->fIterators[fSelectedSurface = id];
747 surf->fHighlight = fHighlightCheck->IsOn();
748 //Surface is visible/invisible - check/uncheck.
749 fVisibleCheck->SetOn(!surf->fHide);
752
753 if (gPad)
754 gPad->Update();
755 } else if (fSelectedSurface != -1) {
756 //Deselect.
758 fSelectedSurface = -1;
759 DisableSurfaceControls();//No surface is selected, no working controls.
760 if (gPad)
761 gPad->Update();
762 }
763}
764
765////////////////////////////////////////////////////////////////////////////////
766///Hide/show selected surface.
767
769{
770 //In principle, this control can be enabled,
771 //only if some surface was selected and
772 //fSelectedSurface != -1. But I do not trust to
773 //ROOT's GUI so I have a check.
774 if (fSelectedSurface != -1) {
776 if (gPad)
777 gPad->Update();
778 }
779}
780
781////////////////////////////////////////////////////////////////////////////////
782///Change the color of the selected surface.
783
785{
786 if (fSelectedSurface != -1) {
788 if (gPad)
789 gPad->Update();
790 }
791}
792
793////////////////////////////////////////////////////////////////////////////////
794///Change transparency of selected surface.
795
797{
798 if (fSelectedSurface != -1) {
799 fHidden->fIterators[fSelectedSurface]->fAlpha = alpha;
800 if (gPad)
801 gPad->Update();
802 }
803}
804
805////////////////////////////////////////////////////////////////////////////////
806///Remove selected surface.
807
809{
810 if (fSelectedSurface != -1) {
811
812 SurfIter_t it = fHidden->fIterators[fSelectedSurface];
815 fIsoList->Layout();
818 fSelectedSurface = -1;
819
820 if (gPad)
821 gPad->Update();
822 }
823}
824
825////////////////////////////////////////////////////////////////////////////////
826///Add new iso-surface.
827
829{
832
833 if (gPad)
834 gPad->Update();
835}
836
837////////////////////////////////////////////////////////////////////////////////
838/// Slot connected to the "Apply" button for alpha value.
839
841{
842 if (fPainter) {
846
847 //Update other tabs and change controls' states.
849 }
850
851 if (gPad)
852 gPad->Update();
853}
854
855
856////////////////////////////////////////////////////////////////////////////////
857/// Slot connected to the Apply Planes button.
858
860{
861 if (fPainter) {
862 //fApplyPlanes->SetState(kButtonDisabled);
865
866 //Update other tabs and change controls' states.
868 }
869
870 if (gPad)
871 gPad->Update();
872}
873
874////////////////////////////////////////////////////////////////////////////////
875/// Slot connected to the Show BoxCut check button.
876
878{
879 if (fPainter)
881 if (gPad)
882 gPad->Update();
883}
884
885////////////////////////////////////////////////////////////////////////////////
886/// Slot connected to the Alpha entry.
887
892
893////////////////////////////////////////////////////////////////////////////////
894/// Slot connected to the Number of Planes value-entry.
895
897{
898// fApplyPlanes->SetState(kButtonUp);
899}
const Mask_t kKeyPressMask
Definition GuiTypes.h:159
@ kVerticalFrame
Definition GuiTypes.h:381
@ kHorizontalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:40
#define f(i)
Definition RSha256.hxx:104
#define a(i)
Definition RSha256.hxx:99
short Color_t
Color number (short)
Definition RtypesCore.h:99
constexpr Bool_t kFALSE
Definition RtypesCore.h:108
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition TError.cxx:208
@ kButtonDown
Definition TGButton.h:54
@ kButtonDisabled
Definition TGButton.h:56
@ kButtonUp
Definition TGButton.h:53
@ kDoubleScaleDownRight
@ kLHintsLeft
Definition TGLayout.h:24
@ kLHintsCenterY
Definition TGLayout.h:28
@ kLHintsCenterX
Definition TGLayout.h:25
@ kLHintsBottom
Definition TGLayout.h:29
@ kLHintsTop
Definition TGLayout.h:27
@ kLHintsExpandX
Definition TGLayout.h:30
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pixel
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 WindowAttributes_t index
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t width
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 text
#define gPad
Class to manage histogram axis.
Definition TAxis.h:32
virtual void Set(Int_t nbins, Double_t xmin, Double_t xmax)
Initialize axis with fix bins.
Definition TAxis.cxx:783
static ULong_t Number2Pixel(Int_t ci)
Static method that given a color index number, returns the corresponding pixel value.
Definition TColor.cxx:2445
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Definition TColor.cxx:1926
virtual void SetToolTipText(const char *text, Long_t delayms=400)
Set tool tip text associated with this button.
Definition TGButton.cxx:439
virtual void SetOn(Bool_t on=kTRUE, Bool_t emit=kFALSE)
Definition TGButton.h:120
virtual void SetState(EButtonState state, Bool_t emit=kFALSE)
Set button state.
Definition TGButton.cxx:229
Selects different options.
Definition TGButton.h:264
Bool_t IsOn() const override
Definition TGButton.h:310
void SetState(EButtonState state, Bool_t emit=kFALSE) override
Set check button state.
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.
The base class for composite widgets (menu bars, list boxes, etc.).
Definition TGFrame.h:289
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
Dragging the slider will generate the event:
virtual Float_t GetMaxPosition() const
virtual Float_t GetMinPosition() const
virtual void SetPosition(Float_t min, Float_t max)
void Resize(UInt_t w=0, UInt_t h=0) override
Resize the frame.
Definition TGFrame.cxx:597
A composite frame with a border and a title.
Definition TGFrame.h:524
Concrete class for horizontal slider.
Definition TGSlider.h:119
A composite frame that layout their children in horizontal way.
Definition TGFrame.h:387
void VisibleClicked()
Hide/show selected surface.
void ColorChanged(Pixel_t pixelColor)
Change the color of the selected surface.
TGTextButton * fOkGridBtn
TGDoubleHSlider * fYRangeSlider
void ApplyPlanes()
Slot connected to the Apply Planes button.
void AddNewSurface()
Add new iso-surface.
void XSliderSetMax()
Value in a number entry was modified.
TGCheckButton * fShowCloud
TGNumberEntryField * fV4MaxEntry
void SurfaceSelected(Int_t id)
Surface was selected in a list box.
TGColorSelect * fSurfColorSelect
TGCheckButton * fLogScale
TGDoubleHSlider * fXRangeSlider
TGCheckButton * fShowBoxCut
TGTextButton * fCancelGridBtn
TGNumberEntry * fNewIsoEntry
void ZSliderChanged()
Z slider in a "Grid" tab.
void XSliderChanged()
X slider in a "Grid" tab.
TGNumberEntryField * fZRangeSliderMax
void SetStyleTabWidgets()
Set "Style" tab's controls from model.
TGL5DDataSet * fDataSet
void AlphaChanged()
Slot connected to the Alpha entry.
TGL5DDataSetEditor(const TGL5DDataSetEditor &)
void DisableSurfaceControls()
Disable surface controls.
void ApplyGridParameters()
"Apply" button was pressed in a "Grid" tab.
void RemoveSurface()
Remove selected surface.
void BoxCutToggled()
Slot connected to the Show BoxCut check button.
TGTextButton * fAddNewIsoBtn
void ZSliderSetMin()
Value in a number entry was modified.
TGNumberEntryField * fZRangeSliderMin
TGNumberEntryField * fYRangeSliderMin
TGNumberEntry * fNCellsZEntry
TGNumberEntry * fNCellsXEntry
TGDoubleHSlider * fSlideRange
TGCheckButton * fVisibleCheck
TGTextButton * fApplyAlpha
TGNumberEntry * fNumberOfPlanes
void EnableSurfaceControls()
Surface was selected in a list box, enable some controls.
void YSliderChanged()
Y slider in a "Grid" tab.
TGNumberEntryField * fYRangeSliderMax
TGNumberEntryField * fV4MinEntry
TGTextButton * fApplyPlanes
void ApplyAlpha()
Slot connected to the "Apply" button for alpha value.
void CreateStyleTab()
Creates "Style" tab.
void RollbackGridParameters()
"Cancel" button was pressed in a "Grid" tab.
void ConnectSignals2Slots()
Connect signals to slots.
void CreateIsoTab()
Tab, containing controls to work with iso-surfaces.
void ZSliderSetMax()
Value in a number entry was modified.
void GridParametersChanged()
Some of controls in a "Grid" tab was modified.
void NContoursChanged()
Slot connected to the Number of Planes value-entry.
TGDoubleHSlider * fZRangeSlider
TGNumberEntryField * fXRangeSliderMin
TGTextButton * fSurfRemoveBtn
TGNumberEntry * fAlpha
void EnableGridTabButtons()
Grid parameters were changed, enable "Cancel" and "Apply" buttons.
TGL5DEditorPrivate * fHidden
void CreateGridTab()
Tab, containing controls to set the ranges and number of cells in a grid.
void SetIsoTabWidgets()
Set "Surfaces" tab's controls from model.
TGNumberEntryField * fXRangeSliderMax
TGCheckButton * fHighlightCheck
void XSliderSetMin()
Value in a number entry was modified.
void YSliderSetMin()
Value in a number entry was modified.
void DisableGridTabButtons()
Disable "Cancel" and "Apply" buttons.
void HighlightClicked()
Check, if selected surface must be highlighted.
TGL5DPainter * fPainter
void SetGridTabWidgets()
Set "Grid" tab's controls from model.
void SetModel(TObject *obj) override
Set model or disables/hides viewer.
void YSliderSetMax()
Value in a number entry was modified.
TGNumberEntry * fNCellsYEntry
TAxis * GetZAxis() const
Z axis for plot.
Definition TGL5D.cxx:204
const Rgl::Range_t & GetZRange() const
V3 range (Z).
Definition TGL5D.cxx:228
const Rgl::Range_t & GetYRange() const
V2 range (Y).
Definition TGL5D.cxx:220
TGL5DPainter * GetRealPainter() const
Get access to painter (for GUI-editor).
Definition TGL5D.cxx:135
TAxis * GetYAxis() const
Y axis for plot.
Definition TGL5D.cxx:196
TAxis * GetXAxis() const
X axis for plot.
Definition TGL5D.cxx:188
const Rgl::Range_t & GetXRange() const
V1 range (X).
Definition TGL5D.cxx:212
const Rgl::Range_t & GetV4Range() const
V4 range.
Definition TGL5D.cxx:236
void ShowBoxCut(Bool_t show)
Bool_t IsBoxCutShown() const
void SetNContours(Int_t num)
Set the number of predefined contours.
void ResetGeometryRanges()
No need to create or delete meshes, number of meshes (iso-levels) are the same, but meshes must be re...
SurfList_t::iterator SurfIter_t
SurfIter_t SurfacesBegin()
std::list::begin.
void RemoveSurface(SurfIter_t surf)
Remove iso-surface.
SurfIter_t SurfacesEnd()
std::list::end.
Double_t GetAlpha() const
void SetAlpha(Double_t newAlpha)
Set selection range parameter.
SurfIter_t AddSurface(Double_t v4, Color_t ci, Double_t isoVal=1., Double_t sigma=1., Double_t range=1e-3, Int_t lowNumOfPoints=kNLowPts)
Try to add new iso-surface.
Int_t GetNContours() const
This class handles GUI labels.
Definition TGLabel.h:24
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
A listbox is a box, possibly with scrollbar, containing entries.
Definition TGListBox.h:221
virtual void RemoveEntry(Int_t id=-1)
remove entry with id.
void Resize(UInt_t w, UInt_t h) override
Resize the listbox widget.
virtual void AddEntry(TGString *s, Int_t id)
Add entry with specified string and id to listbox.
void Layout() override
Layout the listbox components.
virtual TGFrame * GetContainer() const
Definition TGListBox.h:267
void RemoveAll() override
Remove all entries.
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
Set the numeric value (floating point representation).
virtual Double_t GetNumber() const
Get the numeric value (floating point representation).
void SetState(Bool_t state) override
Set the active state.
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 SetIntNumber(Long_t val, Bool_t emit=kTRUE)
virtual Long_t GetIntNumber() const
virtual Double_t GetNumber() const
virtual void SetNumber(Double_t val, Bool_t emit=kTRUE)
@ kNEAPositive
Positive number.
@ kNEANonNegative
Non-negative number.
@ kNEAAnyNumber
Attributes of number entry field.
@ kNESReal
Real number.
@ kNESRealThree
Fixed fraction real, three digit.
@ kNESInteger
Style of number entry field.
@ kNELLimitMinMax
Both lower and upper limits.
virtual void SetPosition(Int_t pos)
Set slider position.
Definition TGSlider.cxx:107
virtual void SetRange(Int_t min, Int_t max)
Set slider range.
Definition TGSlider.cxx:96
Yield an action as soon as it is clicked.
Definition TGButton.h:142
virtual void SetToolTipText(const char *text, Long_t delayms=500)
Set tool tip text associated with this text entry.
ROOT GUI Window base class.
Definition TGWindow.h:23
Base frame for implementing GUI - a service class.
Definition TGedFrame.h:27
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
Definition TGedFrame.h:47
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
Mother of all ROOT objects.
Definition TObject.h:41
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.
Definition TQObject.cxx:865
Basic string class.
Definition TString.h:138
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2384
std::pair< Double_t, Double_t > Range_t
Definition TGLUtil.h:1202