ROOT logo
// @(#)root/treeviewer:$Id: TParallelCoordRange.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Bastien Dalla Piazza  02/08/2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TParallelCoordRange
#define ROOT_TParallelCoordRange

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif

class TParallelCoordVar;
class TParallelCoord;
class TParallelCoordSelect;
class TPoint;
class TString;

class TParallelCoordRange : public TNamed, public TAttLine {
public:
   enum {
      kShowOnPad = BIT(15),
      kLiveUpdate = BIT(16)
   };

private:
   Double_t          fMin;    // Min value for the range.
   Double_t          fMax;    // Max value for the range.
   const Double_t    fSize;   // Size of the painted range.
   TParallelCoordVar *fVar;   // Variable owning the range.
   TParallelCoordSelect* fSelect; // Selection owning the range.

   void              PaintSlider(Double_t value,Bool_t fill=kFALSE);
   TPoint*           GetBindingLinePoints(Int_t pos,Int_t mindragged);
   TPoint*           GetSliderPoints(Double_t value);
   TPoint*           GetSliderPoints(Int_t pos);

public:
   TParallelCoordRange();
   ~TParallelCoordRange();
   TParallelCoordRange(TParallelCoordVar *var, Double_t min=0, Double_t max=0, TParallelCoordSelect* sel=NULL);

   virtual void BringOnTop() ;// *MENU*
   virtual void Delete(const Option_t* options=""); // *MENU*
   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
   virtual void Draw(Option_t *options="");
   virtual void ExecuteEvent(Int_t entry, Int_t px, Int_t py);
   virtual Double_t GetMin() {return fMin;}
   virtual Double_t GetMax() {return fMax;}
   TParallelCoordVar* GetVar() {return fVar;}
   TParallelCoordSelect* GetSelection() {return fSelect;}
   Bool_t IsIn(Double_t evtval);
   virtual void Paint(Option_t *options);
   virtual void Print(Option_t *options) const; // *MENU*
   virtual void SendToBack(); // *MENU*
   virtual void SetLineColor(Color_t col);
   virtual void SetLineWidth(Width_t wid);

   ClassDef(TParallelCoordRange,1); // A TParallelCoordRange is a range used for parallel coordinates plots.
};

#endif

#ifndef ROOT_TParallelCoordSelect
#define ROOT_TParallelCoordSelect

#ifndef ROOT_TAttLine
#include "TAttLine.h"
#endif
#ifndef ROOT_TList
#include "TList.h"
#endif

class TParallelCoord;
class TParallelCoordRange;

class TParallelCoordSelect : public TList, public TAttLine {
public:
   enum {
      kActivated = BIT(18),
      kShowRanges = BIT(19)
   };

private:
   TString fTitle;            // Title of the selection.

public:
   TParallelCoordSelect();    // Default constructor.
   TParallelCoordSelect(const char* title); // Normal constructor.
   ~TParallelCoordSelect();   // Destructor.

   const char* GetTitle() const {return fTitle.Data();}
   void        SetActivated(Bool_t on);
   void        SetShowRanges(Bool_t s);
   void        SetTitle(const char* title) {fTitle = title;}
   
   ClassDef(TParallelCoordSelect,1); // A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
};

#endif

 TParallelCoordRange.h:1
 TParallelCoordRange.h:2
 TParallelCoordRange.h:3
 TParallelCoordRange.h:4
 TParallelCoordRange.h:5
 TParallelCoordRange.h:6
 TParallelCoordRange.h:7
 TParallelCoordRange.h:8
 TParallelCoordRange.h:9
 TParallelCoordRange.h:10
 TParallelCoordRange.h:11
 TParallelCoordRange.h:12
 TParallelCoordRange.h:13
 TParallelCoordRange.h:14
 TParallelCoordRange.h:15
 TParallelCoordRange.h:16
 TParallelCoordRange.h:17
 TParallelCoordRange.h:18
 TParallelCoordRange.h:19
 TParallelCoordRange.h:20
 TParallelCoordRange.h:21
 TParallelCoordRange.h:22
 TParallelCoordRange.h:23
 TParallelCoordRange.h:24
 TParallelCoordRange.h:25
 TParallelCoordRange.h:26
 TParallelCoordRange.h:27
 TParallelCoordRange.h:28
 TParallelCoordRange.h:29
 TParallelCoordRange.h:30
 TParallelCoordRange.h:31
 TParallelCoordRange.h:32
 TParallelCoordRange.h:33
 TParallelCoordRange.h:34
 TParallelCoordRange.h:35
 TParallelCoordRange.h:36
 TParallelCoordRange.h:37
 TParallelCoordRange.h:38
 TParallelCoordRange.h:39
 TParallelCoordRange.h:40
 TParallelCoordRange.h:41
 TParallelCoordRange.h:42
 TParallelCoordRange.h:43
 TParallelCoordRange.h:44
 TParallelCoordRange.h:45
 TParallelCoordRange.h:46
 TParallelCoordRange.h:47
 TParallelCoordRange.h:48
 TParallelCoordRange.h:49
 TParallelCoordRange.h:50
 TParallelCoordRange.h:51
 TParallelCoordRange.h:52
 TParallelCoordRange.h:53
 TParallelCoordRange.h:54
 TParallelCoordRange.h:55
 TParallelCoordRange.h:56
 TParallelCoordRange.h:57
 TParallelCoordRange.h:58
 TParallelCoordRange.h:59
 TParallelCoordRange.h:60
 TParallelCoordRange.h:61
 TParallelCoordRange.h:62
 TParallelCoordRange.h:63
 TParallelCoordRange.h:64
 TParallelCoordRange.h:65
 TParallelCoordRange.h:66
 TParallelCoordRange.h:67
 TParallelCoordRange.h:68
 TParallelCoordRange.h:69
 TParallelCoordRange.h:70
 TParallelCoordRange.h:71
 TParallelCoordRange.h:72
 TParallelCoordRange.h:73
 TParallelCoordRange.h:74
 TParallelCoordRange.h:75
 TParallelCoordRange.h:76
 TParallelCoordRange.h:77
 TParallelCoordRange.h:78
 TParallelCoordRange.h:79
 TParallelCoordRange.h:80
 TParallelCoordRange.h:81
 TParallelCoordRange.h:82
 TParallelCoordRange.h:83
 TParallelCoordRange.h:84
 TParallelCoordRange.h:85
 TParallelCoordRange.h:86
 TParallelCoordRange.h:87
 TParallelCoordRange.h:88
 TParallelCoordRange.h:89
 TParallelCoordRange.h:90
 TParallelCoordRange.h:91
 TParallelCoordRange.h:92
 TParallelCoordRange.h:93
 TParallelCoordRange.h:94
 TParallelCoordRange.h:95
 TParallelCoordRange.h:96
 TParallelCoordRange.h:97
 TParallelCoordRange.h:98
 TParallelCoordRange.h:99
 TParallelCoordRange.h:100
 TParallelCoordRange.h:101
 TParallelCoordRange.h:102
 TParallelCoordRange.h:103
 TParallelCoordRange.h:104
 TParallelCoordRange.h:105
 TParallelCoordRange.h:106
 TParallelCoordRange.h:107
 TParallelCoordRange.h:108
 TParallelCoordRange.h:109
 TParallelCoordRange.h:110
 TParallelCoordRange.h:111