RepBase.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 
14 #ifndef _RepBase_H_
15 #define _RepBase_H_
16 
17 #include "axes/AxesType.h"
18 #include "graphics/Color.h"
19 #include "graphics/LineStyle.h"
20 #include "graphics/SymbolType.h"
21 
22 namespace hippodraw {
23 
24 class BinToColor;
25 class DataSource;
26 class ProjectorBase;
27 class Range;
28 class TransformBase;
29 class ViewBase;
30 
46 {
47 
48 protected:
49 
51  std::string m_name;
52 
54  std::string m_text;
55 
58 
60  static const Color s_desel_color;
61 
63  float m_size;
64 
66  bool m_desel;
67 
70  bool m_highlite;
71 
74  RepBase ( const char *, float size );
75 
77  RepBase ( const RepBase & );
78 
79 public:
80 
82  virtual ~RepBase();
83 
86  virtual RepBase * clone() = 0;
87 
90  const std:: string & name () const;
91 
93  virtual void setColor ( const Color & );
94 
99  virtual void setStyle ( unsigned int style );
100 
105  virtual unsigned int getStyle ( ) const;
106 
108  void setText ( const std::string & text );
109 
111  const std::string & getText() const;
112 
114  virtual const Color & getColor () const;
115 
120  virtual const Color & color () const;
121 
125  virtual void setSelected ( bool yes = true );
126 
130  virtual bool isSelected () const;
131 
138  virtual void setHighLighted ( bool yes );
139 
141  float size () const;
142 
147  virtual void setSize ( float value );
148 
152  virtual bool xError () const;
153 
157  virtual bool yError () const;
158 
162  virtual void setErrorOn ( hippodraw::Axes::Type axis, bool yes = true );
163 
170  virtual const BinToColor * getValueTransform ( ) const;
171 
180  virtual void setValueTransform ( BinToColor * );
181 
190  virtual void drawProjectedValues ( const DataSource * ntuple,
191  TransformBase * transform,
192  ViewBase * view ) = 0;
193 
198  virtual void displayError ( ViewBase & view );
199 
207  virtual bool uses ( Color::Value ) const;
208 
215  virtual bool uses ( hippodraw::Line::Style ) const;
216 
223  virtual bool uses ( hippodraw::Symbol::Type ) const;
224 
225 };
226 
227 } // namespace hippodraw
228 
229 #endif // _RepBase_H_
#define MDL_HIPPOPLOT_API
Definition: libhippo.h:36
bool m_desel
A flag to indicate the representation is de-selected.
Definition: RepBase.h:66
A transform that transforms coordinates from one coordinate system to another.
Definition: TransformBase.h:35
The base class for the value to the color transformation.
Definition: BinToColor.h:30
Type
Enumeration of the type of symbols supported by this class.
Definition: SymbolType.h:28
Value
A few common colors.
Definition: Color.h:51
std::string m_name
The name of the representation.
Definition: RepBase.h:51
return yes
Definition: CanvasView.cxx:883
A Color class for creating the color object following the standard RGB color space.
Definition: Color.h:37
static const Color s_desel_color
The color of the representation when it is de-selected.
Definition: RepBase.h:60
SymbolType enumeration.
numeric::array clone(numeric::array arr)
Definition: num_util.cpp:412
intp size(numeric::array arr)
Definition: num_util.cpp:296
Color class interface.
Color m_color
The color of the representation.
Definition: RepBase.h:57
Style
Line style constants.
Definition: LineStyle.h:25
float m_size
The size of the representation.
Definition: RepBase.h:63
The namespace for axes.
The namespace for lines.
std::string m_text
The text to be displayed before the statistics.
Definition: RepBase.h:54
The abstract base class for views.
Definition: ViewBase.h:62
bool m_highlite
Sets the state of highlighting.
Definition: RepBase.h:70
Type
Axes constants.
Definition: AxesType.h:31
The base class for the point representation hierarchy.
Definition: RepBase.h:45
Base class for DataSource.
Definition: DataSource.h:55

Generated for HippoDraw Class Library by doxygen