File indexing completed on 2025-01-18 10:12:19
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TParallelCoordRange
0013 #define ROOT_TParallelCoordRange
0014
0015 #include "TNamed.h"
0016 #include "TAttLine.h"
0017 #include "TList.h"
0018
0019 class TParallelCoordVar;
0020 class TParallelCoord;
0021 class TParallelCoordSelect;
0022 class TPoint;
0023 class TString;
0024
0025 class TParallelCoordRange : public TNamed, public TAttLine {
0026 public:
0027 enum EStatusBits {
0028 kShowOnPad = BIT(15),
0029 kLiveUpdate = BIT(16)
0030 };
0031
0032 private:
0033 Double_t fMin;
0034 Double_t fMax;
0035 const Double_t fSize;
0036 TParallelCoordVar *fVar;
0037 TParallelCoordSelect* fSelect;
0038
0039 void PaintSlider(Double_t value,bool fill=false);
0040 TPoint* GetBindingLinePoints(Int_t pos,Int_t mindragged);
0041 TPoint* GetSliderPoints(Double_t value);
0042 TPoint* GetSliderPoints(Int_t pos);
0043
0044 public:
0045 TParallelCoordRange();
0046 TParallelCoordRange(TParallelCoordVar *var, Double_t min=0, Double_t max=0, TParallelCoordSelect* sel=nullptr);
0047 ~TParallelCoordRange() override;
0048
0049 virtual void BringOnTop() ;
0050 void Delete(const Option_t* options="") override;
0051 Int_t DistancetoPrimitive(Int_t px, Int_t py) override;
0052 void Draw(Option_t *options="") override;
0053 void ExecuteEvent(Int_t entry, Int_t px, Int_t py) override;
0054 virtual Double_t GetMin() {return fMin;}
0055 virtual Double_t GetMax() {return fMax;}
0056 TParallelCoordVar* GetVar() {return fVar;}
0057 TParallelCoordSelect* GetSelection() {return fSelect;}
0058 bool IsIn(Double_t evtval);
0059 void Paint(Option_t *options) override;
0060 void Print(Option_t *options) const override;
0061 virtual void SendToBack();
0062 void SetLineColor(Color_t col) override;
0063 void SetLineWidth(Width_t wid) override;
0064
0065 ClassDefOverride(TParallelCoordRange,1);
0066 };
0067
0068
0069 class TParallelCoordSelect : public TList, public TAttLine {
0070 public:
0071 enum {
0072 kActivated = BIT(18),
0073 kShowRanges = BIT(19)
0074 };
0075
0076 private:
0077 TString fTitle;
0078
0079 public:
0080 TParallelCoordSelect();
0081 TParallelCoordSelect(const char* title);
0082 ~TParallelCoordSelect() override;
0083
0084 const char* GetTitle() const override {return fTitle.Data();}
0085 void SetActivated(bool on);
0086 void SetShowRanges(bool s);
0087 void SetTitle(const char* title) {fTitle = title;}
0088
0089 ClassDefOverride(TParallelCoordSelect,1);
0090 };
0091
0092 #endif
0093