Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
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 
18 class TParallelCoordVar;
19 class TParallelCoord;
20 class TParallelCoordSelect;
21 class TPoint;
22 class TString;
23 
24 class TParallelCoordRange : public TNamed, public TAttLine {
25 public:
26  enum EStatusBits {
27  kShowOnPad = BIT(15),
28  kLiveUpdate = BIT(16)
29  };
30 
31 private:
32  Double_t fMin; // Min value for the range.
33  Double_t fMax; // Max value for the range.
34  const Double_t fSize; // Size of the painted range.
35  TParallelCoordVar *fVar; // Variable owning the range.
36  TParallelCoordSelect* fSelect; // Selection owning the range.
37 
38  void PaintSlider(Double_t value,Bool_t fill=kFALSE);
39  TPoint* GetBindingLinePoints(Int_t pos,Int_t mindragged);
40  TPoint* GetSliderPoints(Double_t value);
41  TPoint* GetSliderPoints(Int_t pos);
42 
43 public:
44  TParallelCoordRange();
45  TParallelCoordRange(TParallelCoordVar *var, Double_t min=0, Double_t max=0, TParallelCoordSelect* sel=NULL);
46  virtual ~TParallelCoordRange();
47 
48  virtual void BringOnTop() ;// *MENU*
49  virtual void Delete(const Option_t* options=""); // *MENU*
50  virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
51  virtual void Draw(Option_t *options="");
52  virtual void ExecuteEvent(Int_t entry, Int_t px, Int_t py);
53  virtual Double_t GetMin() {return fMin;}
54  virtual Double_t GetMax() {return fMax;}
55  TParallelCoordVar* GetVar() {return fVar;}
56  TParallelCoordSelect* GetSelection() {return fSelect;}
57  Bool_t IsIn(Double_t evtval);
58  virtual void Paint(Option_t *options);
59  virtual void Print(Option_t *options) const; // *MENU*
60  virtual void SendToBack(); // *MENU*
61  virtual void SetLineColor(Color_t col);
62  virtual void SetLineWidth(Width_t wid);
63 
64  ClassDef(TParallelCoordRange,1); // A TParallelCoordRange is a range used for parallel coordinates plots.
65 };
66 
67 #endif
68 
69 #ifndef ROOT_TParallelCoordSelect
70 #define ROOT_TParallelCoordSelect
71 
72 #include "TAttLine.h"
73 #include "TList.h"
74 
75 class TParallelCoord;
76 class TParallelCoordRange;
77 
78 class TParallelCoordSelect : public TList, public TAttLine {
79 public:
80  enum {
81  kActivated = BIT(18),
82  kShowRanges = BIT(19)
83  };
84 
85 private:
86  TString fTitle; // Title of the selection.
87 
88 public:
89  TParallelCoordSelect(); // Default constructor.
90  TParallelCoordSelect(const char* title); // Normal constructor.
91  ~TParallelCoordSelect(); // Destructor.
92 
93  const char* GetTitle() const {return fTitle.Data();}
94  void SetActivated(Bool_t on);
95  void SetShowRanges(Bool_t s);
96  void SetTitle(const char* title) {fTitle = title;}
97 
98  ClassDef(TParallelCoordSelect,1); // A TParallelCoordSelect is a specialised TList to hold TParallelCoordRanges used by TParallelCoord.
99 };
100 
101 #endif
102