ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 "TVirtualPad.h"
17 #include "TColor.h"
18 
19 #include "TGLabel.h"
20 #include "TGButton.h"
21 #include "TGNumberEntry.h"
22 #include "TGColorSelect.h"
23 #include "TGDoubleSlider.h"
24 
25 /** \class TEvePointSetArrayEditor
26 \ingroup TEve
27 Editor for TEvePointSetArray class.
28 */
29 
31 
32 ////////////////////////////////////////////////////////////////////////////////
33 /// Constructor.
34 
36  Int_t width, Int_t height,
37  UInt_t options, Pixel_t back) :
38  TGedFrame(p,width, height, options | kVerticalFrame, back),
39  fM(0),
40  fRange(0)
41 {
42  fM = 0;
43  MakeTitle("TEvePointSetArray");
44 
45  fRange = new TEveGDoubleValuator(this,"Range", 200, 0);
46  fRange->SetNELength(6);
47  fRange->Build();
48  fRange->GetSlider()->SetWidth(224);
49  fRange->Connect("ValueSet()",
50  "TEvePointSetArrayEditor", this, "DoRange()");
51  AddFrame(fRange, new TGLayoutHints(kLHintsTop, 1, 1, 2, 1));
52 }
53 
54 ////////////////////////////////////////////////////////////////////////////////
55 /// Destructor.
56 
58 {
59 }
60 
61 ////////////////////////////////////////////////////////////////////////////////
62 /// Set model object.
63 
65 {
66  fM = dynamic_cast<TEvePointSetArray*>(obj);
67 
68  // printf("FullRange(%f, %f) Selected(%f,%f)\n",
69  // fM->GetMin(), fM->GetMax(), fM->GetCurMin(), fM->GetCurMax());
70 
73 }
74 
75 ////////////////////////////////////////////////////////////////////////////////
76 /// Slot for setting the range of the separating quantity.
77 
79 {
81  Update();
82 }
void SetRange(Double_t min, Double_t max)
Set active range of the separating quantity.
TEvePointSetArrayEditor(const TEvePointSetArrayEditor &)
void SetLimits(Int_t min, Int_t max)
Set limits of the represented range for integer values.
int Int_t
Definition: RtypesCore.h:41
An array of point-sets with each point-set playing a role of a bin in a histogram.
Definition: TEvePointSet.h:107
TGDoubleHSlider * GetSlider()
ULong_t Pixel_t
Definition: GuiTypes.h:41
virtual void Update()
Update the current pad when an attribute is changed via GUI.
Definition: TGedFrame.cxx:73
void DoRange()
Slot for setting the range of the separating quantity.
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:1135
TEveGDoubleValuator * fRange
void SetNELength(Int_t l)
unsigned int UInt_t
Definition: RtypesCore.h:42
Float_t GetMin() const
ClassImp(TEvePointSetArrayEditor)
void SetValues(Float_t min, Float_t max, Bool_t emit=kFALSE)
Set min/max values, optionally emit signal.
virtual void SetModel(TObject *obj)
Set model object.
virtual void SetWidth(UInt_t w)
Definition: TGFrame.h:309
virtual void Build(Bool_t connect=kTRUE)
Create sub-components (label, number entries, double-slider).
virtual void AddFrame(TGFrame *f, TGLayoutHints *l=0)
Add frame to the composite frame using the specified layout hints.
Definition: TGFrame.cxx:1099
Mother of all ROOT objects.
Definition: TObject.h:58
Float_t GetMax() const
Composite GUI element for selection of range (label, two number-entries and double-slider).
TObject * obj
virtual void MakeTitle(const char *title)
Create attribute frame title.
Definition: TGedFrame.cxx:96
Editor for TEvePointSetArray class.
Double_t fMin
Index of the last filled TEvePointSet.
Definition: TEvePointSet.h:122