3 #include "PointSetArrayEditor.h"
4 #include <Reve/PointSet.h>
5 #include <Reve/RGValuators.h>
7 #include <TVirtualPad.h>
12 #include <TGNumberEntry.h>
13 #include <TGColorSelect.h>
14 #include <TGDoubleSlider.h>
18 //______________________________________________________________________
19 // PointSetArrayEditor
22 ClassImp(PointSetArrayEditor)
24 //______________________________________________________________________________
25 PointSetArrayEditor::PointSetArrayEditor(const TGWindow *p,
26 Int_t width, Int_t height,
27 UInt_t options, Pixel_t back) :
28 TGedFrame(p,width, height, options | kVerticalFrame, back),
35 MakeTitle("PointSetArray");
37 fRange = new RGDoubleValuator(this,"Range", 200, 0);
38 fRange->SetNELength(6);
39 //fRange->SetLabelWidth(labelW);
41 fRange->GetSlider()->SetWidth(224);
42 fRange->Connect("ValueSet()",
43 "Reve::PointSetArrayEditor", this, "DoRange()");
44 AddFrame(fRange, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
47 //______________________________________________________________________________
48 PointSetArrayEditor::~PointSetArrayEditor()
53 /**************************************************************************/
55 //______________________________________________________________________________
56 void PointSetArrayEditor::SetModel(TObject* obj)
60 fM = dynamic_cast<PointSetArray*>(obj);
62 // printf("FullRange(%f, %f) Selected(%f,%f)\n",
63 // fM->GetMin(), fM->GetMax(), fM->GetCurMin(), fM->GetCurMax());
65 fRange->SetLimits(fM->fMin, fM->fMax, TGNumberFormat::kNESRealTwo);
66 fRange->SetValues(fM->fCurMin, fM->fCurMax);
69 /**************************************************************************/
71 //______________________________________________________________________________
72 void PointSetArrayEditor::DoRange()
74 // Slot for setting the range of the separating quantity.
76 fM->SetRange(fRange->GetMin(), fRange->GetMax());