25 :
BaseXML (
"Font", controller ),
26 m_family (
"family" ),
27 m_italic (
"italic" ),
37 string family = font.
family ();
40 bool italic = font.
italic ();
55 bool ok = element -> attribute (
m_family, family );
56 font -> setFamily ( family );
59 ok = element -> attribute (
m_italic, italic );
61 font -> setItalic ( italic );
64 ok = element -> attribute (
m_size, size );
65 font -> setPointSize ( size );
68 ok = element -> attribute (
m_weight, weight );
69 font -> setWeight ( weight );
78 bool ok = element -> attribute ( tagname, value );
virtual bool italic() const =0
Returns true if the font is italic, othwise returns false.
std::string m_italic
The italic attribute name.
std::string m_size
The point size attribute name.
FontXML(const FontXML &)
A private copy constructor in order to avoid copying.
A pure virtual base class of XML element wrapper.
std::string m_weight
The font weight attribute name.
A abstract base class for font handling.
virtual std::string family() const =0
Get the family associated with the font.
intp size(numeric::array arr)
XmlElement class interface.
std::string m_family
The family attribute name.
FontBase class interface.
hippodraw::Axes::Type getAxis(const XmlElement *element, const std::string &tagname)
Returns the axis on which the FontBase object was used.
A base class of XML element controllers.
virtual int pointSize() const =0
Get the pointsize of the font.
Type convert(const std::string &axis)
Converts from string representation ot Axes::Type representation.
void setAttributes(XmlElement &, const FontBase &)
Sets the attributes of the element from FontBase object.
A base class that is the interface between GUI and the XML serialization and deserialization.
virtual int weight() const =0
Get the weight of the font.
virtual void setAttribute(const std::string &name, bool value)=0
Sets attribute named name to the int value value.