RepBase.h

Go to the documentation of this file.
00001 /* -*- c++ -*- */
00002 
00014 #ifndef _RepBase_H_
00015 #define _RepBase_H_
00016 
00017 #include "axes/AxesType.h"
00018 #include "graphics/Color.h"
00019 #include "graphics/LineStyle.h"
00020 #include "graphics/SymbolType.h"
00021 
00022 namespace hippodraw {
00023 
00024 class BinToColor;
00025 class DataSource;
00026 class ProjectorBase;
00027 class Range;
00028 class TransformBase;
00029 class ViewBase;
00030 
00045 class MDL_HIPPOPLOT_API RepBase
00046 {
00047 
00048 protected:
00049 
00051   std::string m_name;
00052 
00054   std::string m_text;
00055 
00057   Color m_color;
00058 
00060   static const Color s_desel_color;
00061 
00063   float m_size;
00064 
00066   bool m_desel;
00067 
00070   bool m_highlite;
00071 
00074   RepBase ( const char *, float size );
00075 
00077   RepBase ( const RepBase & );
00078 
00079 public:
00080 
00082   virtual ~RepBase();
00083 
00086   virtual RepBase * clone() = 0;
00087 
00090   const std:: string & name () const;
00091 
00093   virtual void setColor ( const Color & );
00094 
00099   virtual void setStyle ( unsigned int style );
00100 
00105   virtual unsigned int getStyle ( ) const;
00106 
00108   void setText ( const std::string & text );
00109 
00111   const std::string & getText() const;
00112 
00114   virtual const Color & getColor () const;
00115 
00120   virtual const Color & color () const;
00121 
00125   virtual void setSelected ( bool yes = true );
00126 
00130   virtual bool isSelected () const;
00131 
00138   virtual void setHighLighted ( bool yes );
00139 
00141   float size () const;
00142 
00147   virtual void setSize ( float value );
00148 
00152   virtual bool xError () const;
00153 
00157   virtual bool yError () const;
00158 
00162   virtual void setErrorOn ( hippodraw::Axes::Type axis, bool yes = true );
00163 
00170   virtual  const BinToColor * getValueTransform ( ) const;
00171 
00180   virtual void setValueTransform ( BinToColor * );
00181 
00190   virtual void drawProjectedValues ( const DataSource * ntuple,
00191                                      TransformBase * transform,
00192                                      ViewBase * view ) = 0;
00193 
00198   virtual void displayError ( ViewBase & view );
00199 
00207   virtual bool uses ( Color::Value ) const;
00208 
00215   virtual bool uses ( hippodraw::Line::Style ) const;
00216 
00223   virtual bool uses ( hippodraw::Symbol::Type ) const;
00224 
00225 };
00226 
00227 } // namespace hippodraw
00228 
00229 #endif // _RepBase_H_

Generated for HippoDraw Class Library by doxygen