TParallelCoordRange.h

Go to the documentation of this file.
00001 // @(#)root/treeviewer:$Id: TParallelCoordRange.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Bastien Dalla Piazza  02/08/2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TParallelCoordRange
00013 #define ROOT_TParallelCoordRange
00014 
00015 #ifndef ROOT_TNamed
00016 #include "TNamed.h"
00017 #endif
00018 
00019 #ifndef ROOT_TAttLine
00020 #include "TAttLine.h"
00021 #endif
00022 
00023 class TParallelCoordVar;
00024 class TParallelCoord;
00025 class TParallelCoordSelect;
00026 class TPoint;
00027 class TString;
00028 
00029 class TParallelCoordRange : public TNamed, public TAttLine {
00030 public:
00031    enum {
00032       kShowOnPad = BIT(15),
00033       kLiveUpdate = BIT(16)
00034    };
00035 
00036 private:
00037    Double_t          fMin;    // Min value for the range.
00038    Double_t          fMax;    // Max value for the range.
00039    const Double_t    fSize;   // Size of the painted range.
00040    TParallelCoordVar *fVar;   // Variable owning the range.
00041    TParallelCoordSelect* fSelect; // Selection owning the range.
00042 
00043    void              PaintSlider(Double_t value,Bool_t fill=kFALSE);
00044    TPoint*           GetBindingLinePoints(Int_t pos,Int_t mindragged);
00045    TPoint*           GetSliderPoints(Double_t value);
00046    TPoint*           GetSliderPoints(Int_t pos);
00047 
00048 public:
00049    TParallelCoordRange();
00050    ~TParallelCoordRange();
00051    TParallelCoordRange(TParallelCoordVar *var, Double_t min=0, Double_t max=0, TParallelCoordSelect* sel=NULL);
00052 
00053    virtual void BringOnTop() ;// *MENU*
00054    virtual void Delete(const Option_t* options=""); // *MENU*
00055    virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00056    virtual void Draw(Option_t *options="");
00057    virtual void ExecuteEvent(Int_t entry, Int_t px, Int_t py);
00058    virtual Double_t GetMin() {return fMin;}
00059    virtual Double_t GetMax() {return fMax;}
00060    TParallelCoordVar* GetVar() {return fVar;}
00061    TParallelCoordSelect* GetSelection() {return fSelect;}
00062    Bool_t IsIn(Double_t evtval);
00063    virtual void Paint(Option_t *options);
00064    virtual void Print(Option_t *options) const; // *MENU*
00065    virtual void SendToBack(); // *MENU*
00066    virtual void SetLineColor(Color_t col);
00067    virtual void SetLineWidth(Width_t wid);
00068 
00069    ClassDef(TParallelCoordRange,1); // A TParallelCoordRange is a range used for parallel coordinates plots.
00070 };
00071 
00072 #endif
00073 
00074 #ifndef ROOT_TParallelCoordSelect
00075 #define ROOT_TParallelCoordSelect
00076 
00077 #ifndef ROOT_TAttLine
00078 #include "TAttLine.h"
00079 #endif
00080 #ifndef ROOT_TList
00081 #include "TList.h"
00082 #endif
00083 
00084 class TParallelCoord;
00085 class TParallelCoordRange;
00086 
00087 class TParallelCoordSelect : public TList, public TAttLine {
00088 public:
00089    enum {
00090       kActivated = BIT(18),
00091       kShowRanges = BIT(19)
00092    };
00093 
00094 private:
00095    TString fTitle;            // Title of the selection.
00096 
00097 public:
00098    TParallelCoordSelect();    // Default constructor.
00099    TParallelCoordSelect(const char* title); // Normal constructor.
00100    ~TParallelCoordSelect();   // Destructor.
00101 
00102    const char* GetTitle() const {return fTitle.Data();}
00103    void        SetActivated(Bool_t on);
00104    void        SetShowRanges(Bool_t s);
00105    void        SetTitle(const char* title) {fTitle = title;}
00106    
00107    ClassDef(TParallelCoordSelect,1); // A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
00108 };
00109 
00110 #endif
00111 

Generated on Tue Jul 5 14:27:53 2011 for ROOT_528-00b_version by  doxygen 1.5.1