FontBase.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
15 #ifndef _FontBase_H_
16 #define _FontBase_H_
17 
18 #include <string>
19 
20 namespace hippodraw
21 {
23  namespace FontWeight
24  {
26  }
27 
32 class FontBase
33 {
34 
35 protected:
36 
38  FontBase() {};
39 
41  FontBase ( const std::string & family,
42  int pointsize = 12,
44  bool italic = false );
45 
46 public:
47 
49  virtual ~FontBase(){};
50 
52  virtual std::string family() const = 0;
53 
55  virtual void setFamily( const std::string & family ) = 0;
56 
58  virtual int pointSize() const = 0;
59 
61  virtual void setPointSize( int pointsize ) = 0;
62 
64  virtual int weight() const = 0;
65 
67  virtual void setWeight( int weight ) = 0;
68 
71  virtual bool italic () const = 0;
72 
74  virtual void setItalic( bool enable ) = 0;
75 
76 };
77 
78 } // namespace hippodraw
79 
80 #endif //_FontBase_H_
virtual bool italic() const =0
Returns true if the font is italic, othwise returns false.
virtual void setFamily(const std::string &family)=0
Set the family associated with the font.
A abstract base class for font handling.
Definition: FontBase.h:32
virtual void setItalic(bool enable)=0
Set the font to be italic.
virtual std::string family() const =0
Get the family associated with the font.
virtual ~FontBase()
The destructor.
Definition: FontBase.h:49
FontBase()
The default constructor.
Definition: FontBase.h:38
virtual void setWeight(int weight)=0
Set the weight of the font.
virtual void setPointSize(int pointsize)=0
Set the pointsize of the font.
virtual int pointSize() const =0
Get the pointsize of the font.
virtual int weight() const =0
Get the weight of the font.

Generated for HippoDraw Class Library by doxygen