Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
TEvePointSetArrayEditor.cxx
Go to the documentation of this file.
1// @(#)root/eve:$Id$
2// Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4/*************************************************************************
5 * Copyright (C) 1995-2007, 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
13#include "TEvePointSet.h"
14#include "TEveGValuators.h"
15
16#include "TGDoubleSlider.h"
17
18/** \class TEvePointSetArrayEditor
19\ingroup TEve
20Editor for TEvePointSetArray class.
21*/
22
23
24////////////////////////////////////////////////////////////////////////////////
25/// Constructor.
26
28 Int_t width, Int_t height,
29 UInt_t options, Pixel_t back) :
30 TGedFrame(p,width, height, options | kVerticalFrame, back),
31 fM(nullptr),
32 fRange(nullptr)
33{
34 fM = nullptr;
35 MakeTitle("TEvePointSetArray");
36
37 fRange = new TEveGDoubleValuator(this,"Range", 200, 0);
38 fRange->SetNELength(6);
39 fRange->Build();
40 fRange->GetSlider()->SetWidth(224);
41 fRange->Connect("ValueSet()",
42 "TEvePointSetArrayEditor", this, "DoRange()");
43 AddFrame(fRange, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
44}
45
46////////////////////////////////////////////////////////////////////////////////
47/// Destructor.
48
52
53////////////////////////////////////////////////////////////////////////////////
54/// Set model object.
55
57{
58 fM = dynamic_cast<TEvePointSetArray*>(obj);
59
60 // printf("FullRange(%f, %f) Selected(%f,%f)\n",
61 // fM->GetMin(), fM->GetMax(), fM->GetCurMin(), fM->GetCurMax());
62
63 fRange->SetLimits(fM->fMin, fM->fMax, TGNumberFormat::kNESRealTwo);
64 fRange->SetValues(fM->fCurMin, fM->fCurMax);
65}
66
67////////////////////////////////////////////////////////////////////////////////
68/// Slot for setting the range of the separating quantity.
69
71{
72 fM->SetRange(fRange->GetMin(), fRange->GetMax());
73 Update();
74}
@ kVerticalFrame
Definition GuiTypes.h:382
ULong_t Pixel_t
Pixel value.
Definition GuiTypes.h:41
int Int_t
Signed integer 4 bytes (int).
Definition RtypesCore.h:59
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
Definition RtypesCore.h:60
@ kLHintsTop
Definition TGLayout.h:27
Composite GUI element for selection of range (label, two number-entries and double-slider).
TEvePointSetArrayEditor(const TEvePointSetArrayEditor &)
void SetModel(TObject *obj) override
Set model object.
void DoRange()
Slot for setting the range of the separating quantity.
~TEvePointSetArrayEditor() override
Destructor.
An array of point-sets with each point-set playing a role of a bin in a histogram.
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=nullptr)
Add frame to the composite frame using the specified layout hints.
Definition TGFrame.cxx:1109
This class describes layout hints used by the layout classes.
Definition TGLayout.h:50
@ kNESRealTwo
Fixed fraction real, two digit.
ROOT GUI Window base class.
Definition TGWindow.h:23
TGedFrame(const TGedFrame &)=delete
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition TGedFrame.cxx:94
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition TGedFrame.cxx:71
Mother of all ROOT objects.
Definition TObject.h:42