88 TList *list =
fVar->GetParallel()->GetSelectList();
99 fVar->GetRanges()->Remove(
this);
100 fVar->GetParallel()->CleanUpSelections(
this);
111 xx =
gPad->AbsPixeltoX(px);
112 yy =
gPad->AbsPixeltoY(py);
113 fVar->GetXYfromValue(
fMin,thisx,thisy);
116 if(xx > thisx-2*
fSize && xx < thisx && yy > thisy-
fSize && yy<thisy+
fSize) dist = 0;
117 fVar->GetXYfromValue(
fMax,thisx,thisy);
118 if(xx > thisx-2*
fSize && xx < thisx && yy > thisy-
fSize && yy<thisy+
fSize) dist = 0;
120 if(yy > thisy-2*
fSize && yy < thisy && xx > thisx-
fSize && xx<thisx+
fSize) dist = 0;
121 fVar->GetXYfromValue(
fMax,thisx,thisy);
122 if(yy > thisy-2*
fSize && yy < thisy && xx > thisx-
fSize && xx<thisx+
fSize) dist = 0;
144 bool vert =
fVar->GetVert();
145 static Int_t pxold, pyold;
146 static Int_t mindragged = -1;
147 Int_t plx1,plx2,ply1,ply2;
149 Double_t xx,yy,txxmin=0,txxmax=0,tyymin=0,tyymax=0;
151 xx =
gPad->AbsPixeltoX(px);
152 yy =
gPad->AbsPixeltoY(py);
153 fVar->GetXYfromValue(
fMin,txxmin,tyymin);
154 fVar->GetXYfromValue(
fMax,txxmax,tyymax);
156 plx1 =
gPad->XtoAbsPixel(txxmin-2*
fSize);
157 plx2 =
gPad->XtoAbsPixel(txxmax-2*
fSize);
163 ply1 =
gPad->YtoAbsPixel(tyymin-2*
fSize);
164 ply2 =
gPad->YtoAbsPixel(tyymax-2*
fSize);
175 if ((vert && yy<tyymax-
fSize) || (!vert && xx < txxmax-
fSize)) {
186 gVirtualX->DrawLine(plx1,ply1,plx2,ply2);
190 if (mindragged == 1) min =
fVar->GetValuefromXY(xx,yy);
191 if (mindragged == 0) max =
fVar->GetValuefromXY(xx,yy);
210 if((vert && yy > frame->
GetY1() && yy < frame->GetY2()) ||
211 (!vert && xx > frame->
GetX1() && xx < frame->GetX2())){
230 if (mindragged == 1) min =
fVar->GetValuefromXY(xx,yy);
231 if (mindragged == 0) max =
fVar->GetValuefromXY(xx,yy);
260 if (
fVar->GetVert()){
262 tyy =
gPad->AbsPixeltoY(pos);
265 txx =
gPad->AbsPixeltoX(pos);
267 if (mindragged==1)
fVar->GetXYfromValue(
fMax,txxo,tyyo);
268 else fVar->GetXYfromValue(
fMin,txxo,tyyo);
271 if (
fVar->GetVert()) {
297 fVar->GetXYfromValue(value,txx,tyy);
300 if (
fVar->GetVert()) {
301 tx[0]=
gPad->XtoAbsPixel(txx);
302 tx[1]=tx[4]=
gPad->XtoAbsPixel(txx-
fSize);
303 ty[0]=ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy);
304 tx[2]=tx[3]=
gPad->XtoAbsPixel(txx-2*
fSize);
308 ty[0]=
gPad->YtoAbsPixel(tyy);
309 ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy-
fSize);
310 tx[0]=tx[1]=tx[4]=
gPad->XtoAbsPixel(txx);
311 ty[2]=ty[3]=
gPad->YtoAbsPixel(tyy-2*
fSize);
316 for(
UInt_t ui=0;ui<5;++ui) slider[ui] =
TPoint(tx[ui],ty[ui]);
326 if (
fVar->GetVert()){
328 tyy =
gPad->AbsPixeltoY(pos);
331 txx =
gPad->AbsPixeltoX(pos);
336 if (
fVar->GetVert()) {
337 tx[0]=
gPad->XtoAbsPixel(txx);
338 tx[1]=tx[4]=
gPad->XtoAbsPixel(txx-
fSize);
339 ty[0]=ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy);
340 tx[2]=tx[3]=
gPad->XtoAbsPixel(txx-2*
fSize);
344 ty[0]=
gPad->YtoAbsPixel(tyy);
345 ty[1]=ty[4]=
gPad->YtoAbsPixel(tyy-
fSize);
346 tx[0]=tx[1]=tx[4]=
gPad->XtoAbsPixel(txx);
347 ty[2]=ty[3]=
gPad->YtoAbsPixel(tyy-2*
fSize);
352 for(
UInt_t ui=0;ui<5;++ui) slider[ui] =
TPoint(tx[ui],ty[ui]);
361 return evtval>=
fMin && evtval<=
fMax;
392 fVar->GetXYfromValue(value,xx,yy);
420 printf(
"On \"%s\" : min = %f, max = %f\n",
fVar->GetTitle(),
fMin,
fMax);
428 TList *list =
fVar->GetParallel()->GetSelectList();
int Int_t
Signed integer 4 bytes (int).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
short Width_t
Line width (short).
double Double_t
Double 8 bytes.
short Color_t
Color number (short).
const char Option_t
Option string (const char).
virtual void SetFillColor(Color_t fcolor)
Set the fill area color.
virtual void SetFillStyle(Style_t fstyle)
Set the fill area style.
virtual Color_t GetLineColor() const
Return the line color.
virtual void SetLineStyle(Style_t lstyle)
Set the line style.
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
TList(const TList &)=delete
TObject * Remove(TObject *obj) override
Remove object from the list.
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
Bool_t TestBit(UInt_t f) const
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
A TParallelCoordRange is a range used for parallel coordinates plots.
void SetLineWidth(Width_t wid) override
Set the selection line width.
void Draw(Option_t *options="") override
Draw a TParallelCoordRange.
void SetLineColor(Color_t col) override
Set the selection line color.
void Paint(Option_t *options) override
Paint a TParallelCoordRange.
TParallelCoordSelect * fSelect
Selection owning the range.
TParallelCoordVar * GetVar()
TParallelCoordVar * fVar
Variable owning the range.
virtual void SendToBack()
Make the selection which owns the range to be drawn under all the others.
virtual void BringOnTop()
Make the selection which owns the range to be drawn on top of the others.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute the distance to the primitive.
~TParallelCoordRange() override
Destructor.
const Double_t fSize
Size of the painted range.
void PaintSlider(Double_t value, bool fill=false)
Paint a slider.
TPoint * GetBindingLinePoints(Int_t pos, Int_t mindragged)
Return the points of the line binding the two needles of the range.
void Print(Option_t *options) const override
Print info about the range.
void Delete(const Option_t *options="") override
Delete the range.
Double_t fMin
Min value for the range.
void ExecuteEvent(Int_t entry, Int_t px, Int_t py) override
Execute the entry.
Double_t fMax
Max value for the range.
bool IsIn(Double_t evtval)
Evaluate if the given value is within the range or not.
TParallelCoordRange()
Default constructor.
TPoint * GetSliderPoints(Double_t value)
Return the points to paint the needles at "value".
A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
void SetShowRanges(bool s)
Show the ranges needles.
~TParallelCoordSelect() override
Destructor.
TParallelCoordSelect()
Default constructor.
void SetActivated(bool on)
Activate the selection.
Double_t GetCurrentMax() const
TParallelCoord * GetParallel()
Double_t GetCurrentMin() const
TParallelCoordSelect * GetCurrentSelection()
Return the selection currently being edited.
@ kLiveUpdate
To paint the entries when being modified.
virtual void PaintPolyLine(Int_t n, Double_t *x, Double_t *y, Option_t *option="")