#include <ufont.hpp>
Inheritance diagram for ubit::UFont:
Public Types | |
PLAIN = 0 | |
BOLD = 1<<0 | |
ITALIC = 1<<1 | |
FILL = 1<<2 | |
UNDERLINE = 1<<3 | |
OVERLINE = 1<<4 | |
STRIKETHROUGH = 1<<5 | |
enum | Style { PLAIN = 0, BOLD = 1<<0, ITALIC = 1<<1, FILL = 1<<2, UNDERLINE = 1<<3, OVERLINE = 1<<4, STRIKETHROUGH = 1<<5 } |
Public Member Functions | |
UFont (const UFont &) | |
UFont (const UFont &, int style, int point_size) | |
UFont (const UFontFamily &, int style, int point_size) | |
create a new font object. | |
UFont & | operator= (const UFont &f) |
copies font. | |
virtual void | set (const UFont &) |
copies font. | |
bool | operator== (const UFont &f) const |
bool | operator!= (const UFont &f) const |
virtual bool | equals (const UFont &) const |
compares fonts. | |
const UFontFamily & | getFamily () const |
UFont & | setFamily (const UFontFamily &) |
UFont & | setFamily (const UFont &) |
int | getPointSize () const |
UFont & | setPointSize (int point_size) |
UFont & | setPointSize (const UFont &) |
pixel sizes. | |
bool | isPlain () const |
bool | isBold () const |
bool | isItalic () const |
bool | isFilled () const |
bool | isUnderlined () const |
bool | isOverlined () const |
bool | isStrikethrough () const |
UFont & | setBold (bool=true) |
UFont & | setItalic (bool=true) |
UFont & | setFilled (bool=true) |
UFont & | setUnderlined (bool=true) |
UFont & | setOverlined (bool=true) |
UFont & | setStrikethrough (bool=true) |
int | getStyle () const |
UFont & | setStyle (const UFont &) |
UFont & | setStyle (int styles) |
UFont & | changeStyle (int style, bool add) |
changes the Font Style of this font object. | |
void | merge (const UFont &) |
merge font characteristics. | |
virtual void | update () |
update parents' graphics. | |
virtual void | realize (UDisp *) |
[impl] allocates physical resources. | |
virtual void | putProp (UContext *, UControl *) |
[impl] changes corresponding value in the UContext | |
Static Public Attributes | |
static UFont | sans_serif |
static UFont | serif |
static UFont | monospace |
default font family 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 |
default font size modifiers. | |
static UFont | plain |
static UFont | bold |
static UFont | italic |
static UFont | fill |
static UFont | underline |
static UFont | overline |
static UFont | strikethrough |
font style modifiers. | |
Friends | |
class | UDisp |
class | UNatDisp |
class | UFontDesc |
UFont & | ufont (const UFont &_f) |
shortcut for *new UFont(). |
this property specifies the font in a UGroup or a UBox. It is inherited by children, except if they have their own UFont, or if their UStyle specifies another font. As other UProp(s), a UScale instance must be added to the attribute list or child list of the container:
ubit::UFont::UFont | ( | const UFontFamily & | , | |
int | style, | |||
int | point_size | |||
) |
create a new font object.
arguments:
UFont & ubit::UFont::changeStyle | ( | int | style, | |
bool | add | |||
) |
changes the Font Style of this font object.
'font_styles' is an ORed bitmask of UFont::Style values 'font_styles' can be negative, which means 'disable these styles'
void ubit::UFont::merge | ( | const UFont & | ) |
merge font characteristics.
sets NON default values and combines styles
void ubit::UFont::realize | ( | UDisp * | ) | [virtual] |
[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.
UFont ubit::UFont::strikethrough [static] |
font style modifiers.
ubox( UFont::bold + UFont::italic + "abcd" )