]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Reve/PointSetArrayEditor.cxx
- Compute parameter covariances including absorber dispersion effects
[u/mrichter/AliRoot.git] / EVE / Reve / PointSetArrayEditor.cxx
CommitLineData
5a5a1232 1// $Header$
2
3#include "PointSetArrayEditor.h"
4#include <Reve/PointSet.h>
a3912979 5#include <Reve/RGValuators.h>
5a5a1232 6
7#include <TVirtualPad.h>
8#include <TColor.h>
9
10#include <TGLabel.h>
11#include <TGButton.h>
12#include <TGNumberEntry.h>
13#include <TGColorSelect.h>
14#include <TGDoubleSlider.h>
15
16using namespace Reve;
17
18//______________________________________________________________________
19// PointSetArrayEditor
20//
21
22ClassImp(PointSetArrayEditor)
23
a8600b56 24PointSetArrayEditor::PointSetArrayEditor(const TGWindow *p,
25 Int_t width, Int_t height,
26 UInt_t options, Pixel_t back) :
27 TGedFrame(p,width, height, options | kVerticalFrame, back),
265ecb21 28 fM(0),
29 fRange(0)
5a5a1232 30{
31 fM = 0;
32 MakeTitle("PointSetArray");
33
a3912979 34 fRange = new RGDoubleValuator(this,"Range", 200, 0);
35 fRange->SetNELength(6);
36 //fRange->SetLabelWidth(labelW);
37 fRange->Build();
38 fRange->GetSlider()->SetWidth(224);
39 fRange->Connect("ValueSet()",
40 "Reve::PointSetArrayEditor", this, "DoRange()");
41 AddFrame(fRange, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
5a5a1232 42}
43
44PointSetArrayEditor::~PointSetArrayEditor()
45{}
46
47/**************************************************************************/
48
a8600b56 49void PointSetArrayEditor::SetModel(TObject* obj)
5a5a1232 50{
a8600b56 51 fM = dynamic_cast<PointSetArray*>(obj);
5a5a1232 52
ee399035 53 // printf("FullRange(%f, %f) Selected(%f,%f)\n",
54 // fM->GetMin(), fM->GetMax(), fM->GetCurMin(), fM->GetCurMax());
a3912979 55
56 fRange->SetLimits(fM->fMin, fM->fMax, TGNumberFormat::kNESRealTwo);
57 fRange->SetValues(fM->fCurMin, fM->fCurMax);
5a5a1232 58}
59
60/**************************************************************************/
61
a3912979 62void PointSetArrayEditor::DoRange()
5a5a1232 63{
a3912979 64 fM->SetRange(fRange->GetMin(), fRange->GetMax());
a8600b56 65 Update();
5a5a1232 66}