9 #ifndef CMZN_FONT_HPP__ 10 #define CMZN_FONT_HPP__ 12 #include "opencmiss/zinc/font.h" 13 #include "opencmiss/zinc/context.hpp" 37 explicit Font(cmzn_font_id font_id) : id(font_id)
40 Font(
const Font& font) : id(cmzn_font_access(font.id))
45 cmzn_font_id temp_id = cmzn_font_access(font.id);
46 cmzn_font_destroy(&
id);
53 cmzn_font_destroy(&
id);
117 return cmzn_font_get_name(
id);
129 return cmzn_font_set_name(
id, name);
139 return cmzn_font_is_bold(
id);
150 return cmzn_font_set_bold(
id, bold);
160 return cmzn_font_get_depth(
id);
172 return cmzn_font_set_depth(
id, depth);
182 return cmzn_font_is_italic(
id);
193 return cmzn_font_set_italic(
id, italic);
203 return cmzn_font_get_point_size(
id);
214 return cmzn_font_set_point_size(
id, size);
224 return static_cast<RenderType>(cmzn_font_get_render_type(
id));
236 return cmzn_font_set_render_type(
id,
237 static_cast<cmzn_font_render_type>(renderType));
247 return static_cast<TypefaceType>(cmzn_font_get_typeface_type(
id));
259 return cmzn_font_set_typeface_type(
id, static_cast<cmzn_font_typeface_type>(typefaceType));
263 inline bool operator==(
const Font& a,
const Font& b)
276 cmzn_fontmodule_id id;
284 explicit Fontmodule(cmzn_fontmodule_id in_fontmodule_id) :
289 id(cmzn_fontmodule_access(fontModule.id))
294 cmzn_fontmodule_id temp_id = cmzn_fontmodule_access(
298 cmzn_fontmodule_destroy(&
id);
308 cmzn_fontmodule_destroy(&
id);
340 return Font(cmzn_fontmodule_create_font(
id));
351 return Font(cmzn_fontmodule_find_font_by_name(
id, name));
365 return cmzn_fontmodule_begin_change(
id);
379 return cmzn_fontmodule_end_change(
id);
389 return Font(cmzn_fontmodule_get_default_font(
id));
400 return cmzn_fontmodule_set_default_font(
id, font.
getId());
406 return Fontmodule(cmzn_context_get_fontmodule(
id));
cmzn_fontmodule_id getId() const
Definition: font.hpp:327
Fontmodule getFontmodule()
Definition: font.hpp:404
bool isItalic()
Definition: font.hpp:180
Module managing all fonts.
Definition: font.hpp:273
enum RenderType getRenderType()
Definition: font.hpp:222
RenderType
Definition: font.hpp:59
TypefaceType getTypefaceType()
Definition: font.hpp:245
TypefaceType
Definition: font.hpp:80
Font getDefaultFont()
Definition: font.hpp:387
int setDefaultFont(const Font &font)
Definition: font.hpp:398
int beginChange()
Definition: font.hpp:363
char * getName()
Definition: font.hpp:115
int setName(const char *name)
Definition: font.hpp:127
int setPointSize(int size)
Definition: font.hpp:212
double getDepth()
Definition: font.hpp:158
bool isValid() const
Definition: font.hpp:317
int setDepth(double depth)
Definition: font.hpp:170
cmzn_font_id getId() const
Definition: font.hpp:103
bool isValid() const
Definition: font.hpp:93
int setRenderType(RenderType renderType)
Definition: font.hpp:234
int setBold(bool bold)
Definition: font.hpp:148
int getPointSize()
Definition: font.hpp:201
int endChange()
Definition: font.hpp:377
Font createFont()
Definition: font.hpp:338
The OpenCMISS namespace.
Definition: context.hpp:20
int setTypefaceType(TypefaceType typefaceType)
Definition: font.hpp:257
bool isBold()
Definition: font.hpp:137
Font object controlling attributes of rendering text.
Definition: font.hpp:26
Font findFontByName(const char *name)
Definition: font.hpp:349
int setItalic(bool italic)
Definition: font.hpp:191