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_

Generated for HippoDraw Class Library by doxygen