Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:19

0001 // @(#)root/treeviewer:$Id$
0002 // Author: Bastien Dalla Piazza  02/08/2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
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;        ///< Min value for the range.
0034    Double_t          fMax;        ///< Max value for the range.
0035    const Double_t    fSize;       ///< Size of the painted range.
0036    TParallelCoordVar *fVar;       ///< Variable owning the range.
0037    TParallelCoordSelect* fSelect; ///< Selection owning the range.
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() ;// *MENU*
0050    void Delete(const Option_t* options="") override; // *MENU*
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; // *MENU*
0061    virtual void SendToBack(); // *MENU*
0062    void SetLineColor(Color_t col) override;
0063    void SetLineWidth(Width_t wid) override;
0064 
0065    ClassDefOverride(TParallelCoordRange,1); // A TParallelCoordRange is a range used for parallel coordinates plots.
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;            // Title of the selection.
0078 
0079 public:
0080    TParallelCoordSelect();    // Default constructor.
0081    TParallelCoordSelect(const char* title); // Normal constructor.
0082    ~TParallelCoordSelect() override;   // Destructor.
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); // A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
0090 };
0091 
0092 #endif
0093