00001 /* -*- mode: c++ -*- */ 00002 00014 #ifndef _DataView_H_ 00015 #define _DataView_H_ 00016 00017 #include "ViewBase.h" 00018 00019 00020 00021 namespace hippodraw { 00022 00030 class MDL_HIPPOPLOT_API DataView : virtual public ViewBase 00031 { 00032 00033 private: 00034 00036 DataView ( const DataView & ); 00037 00038 protected: 00039 00041 DataView(); 00042 00048 Rect m_margin_rect; 00049 00052 DataView ( PlotterBase * plotter ); 00053 00055 virtual ~DataView(); 00056 00059 void prepareMarginRect ( ); 00060 00063 virtual float userToMarginX ( double x ) const; 00064 00067 virtual float userToInvertedMarginX ( double x ) const; 00068 00071 virtual float userToMarginY ( double y ) const; 00072 00076 virtual float userToInvertedMarginY ( double y ) const; 00077 00080 virtual float userToMarginColor ( double c ) const; 00081 00082 00086 virtual double marginToUserX ( double x ) const; 00087 00091 virtual double marginToInvertedUserX ( double x ) const; 00092 00096 virtual double marginToUserY ( double y ) const; 00097 00101 virtual double marginToInvertedUserY ( double y ) const; 00102 00103 00104 public: 00105 00108 const Rect & getMarginRect () const; 00109 00114 void setMarginRect ( const Rect & ); 00115 00116 }; 00117 00118 } // namespace hippodraw 00119 00120 #endif // _DataView_H_