00001 /* -*- mode: c++ -*- */ 00002 00015 #ifndef _FontBase_H_ 00016 #define _FontBase_H_ 00017 00018 #include <string> 00019 00020 namespace hippodraw 00021 { 00023 namespace FontWeight 00024 { 00025 enum weight{ Light, Normal, DemiBold, Bold, Black, Invisible }; 00026 } 00027 00032 class FontBase 00033 { 00034 00035 protected: 00036 00038 FontBase() {}; 00039 00041 FontBase ( const std::string & family, 00042 int pointsize = 12, 00043 int weight = hippodraw::FontWeight::Normal, 00044 bool italic = false ); 00045 00046 public: 00047 00049 virtual ~FontBase(){}; 00050 00052 virtual std::string family() const = 0; 00053 00055 virtual void setFamily( const std::string & family ) = 0; 00056 00058 virtual int pointSize() const = 0; 00059 00061 virtual void setPointSize( int pointsize ) = 0; 00062 00064 virtual int weight() const = 0; 00065 00067 virtual void setWeight( int weight ) = 0; 00068 00071 virtual bool italic () const = 0; 00072 00074 virtual void setItalic( bool enable ) = 0; 00075 00076 }; 00077 00078 } // namespace hippodraw 00079 00080 #endif //_FontBase_H_