Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TParallelCoordRange.h
Go to the documentation of this file.
1// @(#)root/treeviewer:$Id$
2// Author: Bastien Dalla Piazza 02/08/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
12#ifndef ROOT_TParallelCoordRange
13#define ROOT_TParallelCoordRange
14
15#include "TNamed.h"
16#include "TAttLine.h"
17#include "TList.h"
18
20class TParallelCoord;
22class TPoint;
23class TString;
24
25class TParallelCoordRange : public TNamed, public TAttLine {
26public:
29 kLiveUpdate = BIT(16)
30 };
31
32private:
33 Double_t fMin; ///< Min value for the range.
34 Double_t fMax; ///< Max value for the range.
35 const Double_t fSize; ///< Size of the painted range.
36 TParallelCoordVar *fVar; ///< Variable owning the range.
37 TParallelCoordSelect* fSelect; ///< Selection owning the range.
38
39 void PaintSlider(Double_t value,bool fill=false);
40 TPoint* GetBindingLinePoints(Int_t pos,Int_t mindragged);
43
44public:
47 ~TParallelCoordRange() override;
48
49 virtual void BringOnTop() ;// *MENU*
50 void Delete(const Option_t* options="") override; // *MENU*
51 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
52 void Draw(Option_t *options="") override;
53 void ExecuteEvent(Int_t entry, Int_t px, Int_t py) override;
54 virtual Double_t GetMin() {return fMin;}
55 virtual Double_t GetMax() {return fMax;}
58 bool IsIn(Double_t evtval);
59 void Paint(Option_t *options) override;
60 void Print(Option_t *options) const override; // *MENU*
61 virtual void SendToBack(); // *MENU*
62 void SetLineColor(Color_t col) override;
63 void SetLineWidth(Width_t wid) override;
64
65 ClassDefOverride(TParallelCoordRange,1); // A TParallelCoordRange is a range used for parallel coordinates plots.
66};
67
68
69class TParallelCoordSelect : public TList, public TAttLine {
70public:
71 enum {
73 kShowRanges = BIT(19)
74 };
75
76private:
77 TString fTitle; // Title of the selection.
78
79public:
80 TParallelCoordSelect(); // Default constructor.
81 TParallelCoordSelect(const char* title); // Normal constructor.
82 ~TParallelCoordSelect() override; // Destructor.
83
84 const char* GetTitle() const override {return fTitle.Data();}
85 void SetActivated(bool on);
86 void SetShowRanges(bool s);
87 void SetTitle(const char* title) {fTitle = title;}
88
89 ClassDefOverride(TParallelCoordSelect,1); // A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
90};
91
92#endif
93
short Color_t
Definition RtypesCore.h:92
short Width_t
Definition RtypesCore.h:91
double Double_t
Definition RtypesCore.h:59
const char Option_t
Definition RtypesCore.h:66
#define BIT(n)
Definition Rtypes.h:85
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
Option_t Option_t SetLineWidth
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t sel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void on
Option_t Option_t SetLineColor
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
Line Attributes class.
Definition TAttLine.h:18
A doubly linked list.
Definition TList.h:38
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
A TParallelCoordRange is a range used for parallel coordinates plots.
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.
virtual Double_t GetMin()
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.
TParallelCoordSelect * GetSelection()
TParallelCoordRange()
Default constructor.
virtual Double_t GetMax()
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.
void SetTitle(const char *title)
const char * GetTitle() const override
Returns title of object.
TParallelCoord axes.
Parallel Coordinates class.
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
th1 Draw()