#include <ufont.hpp>
Inheritance diagram for UFont:
Public Types | |
enum | FontStyle { BOLD = 1<<0, ITALIC = 1<<1, FILL = 1<<2, UNDERLINE = 1<<3, OVERLINE = 1<<4, STRIKETHROUGH = 1<<5 } |
Public Member Functions | |
UFont (const class UFontFamily &family, int style=0, int lsize=0, u_modes=0) | |
creates a new Font with custom characteristics. | |
UFont (const UFont &=UFont::standard) | |
creates a new Font that is a copy of another Font. | |
UFont & | operator= (const UFont &) |
copies font characteristics (same as set() but not virtual). | |
virtual void | set (const UFont &) |
copies font characteristics (same as operator = but virtual). | |
virtual void | merge (const UFont &) |
merge font characteristics. | |
virtual bool | equals (const UFont &) const |
returns true if font characteristics are the same | |
bool | isBold () const |
bool | isItalic () const |
is this font in the Bold or Italic style ?. | |
bool | isFilled () const |
bool | isUnderlined () const |
bool | isOverlined () const |
bool | isStrikethrough () const |
void | setFamily (const UFont &) |
void | setFamily (const class UFontFamily &) |
changes the Font Family of this font object (see: UFontFamily). | |
const class UFontFamily * | getFamily () const |
returns the Font Family of this font object (see: UFontFamily). | |
void | setStyle (const UFont &) |
void | setStyle (signed int font_styles, bool update) |
changes the Font Style of this font object. | |
void | setSize (const UFont &f) |
copies font size from another font object. | |
int | getLsize () const |
returns LOGICAL font size (in range: UFont::MIN_LSIZE to UFont::MAX_LSIZE). | |
void | setLsize (int logical_size, bool update=true) |
changes LOGICAL font size (in range: UFont::MIN_LSIZE to UFont::MAX_LSIZE). | |
int | getPointSize () const |
int | getPtsize () const |
returns POINT size. | |
void | setPointSize (int point_size, bool update=true) |
void | setPtsize (int point_size, bool update=true) |
changes POINT size. | |
virtual void | update () |
update parents' graphics. | |
bool | realize (class UDisp *) |
[impl] allocates physical resources. | |
Static Public Attributes | |
static const int | MIN_LSIZE = 1 |
static const int | MEDIUM_LSIZE = 8 |
static const int | MAX_LSIZE = 23 |
minimum, medium and maximum LOGICAL size (not a point size!). | |
static const int | FONTMAP_SIZE = 4 * (UFont::MAX_LSIZE + 1) |
internals. | |
static UFont | normal |
static UFont | bold |
static UFont | italic |
static UFont | fill |
static UFont | underline |
static UFont | overline |
static UFont | strikethrough |
static UFont | _bold |
static UFont | _italic |
static UFont | _fill |
static UFont | _underline |
static UFont | _overline |
static UFont | _strikethrough |
Font Style Modifiers. | |
static UFont | xx_small |
static UFont | x_small |
static UFont | small |
static UFont | medium |
static UFont | large |
static UFont | x_large |
static UFont | xx_large |
Font Size Modifiers. | |
static UFont | standard |
static UFont | inherit |
static UFont | helvetica |
static UFont | courier |
static UFont | times |
static UFont | fixed |
Font Family Modifiers. | |
Friends | |
UFont & | ufont (const UFont &_f) |
creator shortcut that is equivalent to: *new UFont(). |
|
creates a new Font with custom characteristics. arguments:
|
|
merge font characteristics. sets NON default values and combines styles |
|
[impl] allocates physical resources. this function is automatically called when this font is used for the first time. There no need to call it in client code except for loading fonts in advance.
|
|
changes the Font Style of this font object. 'font_styles' is an integer bitmask (values are ORed from enum FontStyle) 'font_styles' can be negative, which means 'disable these styles' (as in: UFont::_italic, etc) |
|
Font Style Modifiers.
|
|
Font Family Modifiers.
|
|
Font Size Modifiers. 'medium' is equivalent to: logical lsize = MEDIUM_LSIZE |