ubit::UFont Class Reference

Font of a UGroup or UBox container. More...

#include <ufont.hpp>

Inheritance diagram for ubit::UFont:

ubit::UProp ubit::UBrick ubit::UObject List of all members.

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.
UFontoperator= (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
UFontsetFamily (const UFontFamily &)
UFontsetFamily (const UFont &)
int getPointSize () const
UFontsetPointSize (int point_size)
UFontsetPointSize (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
UFontsetBold (bool=true)
UFontsetItalic (bool=true)
UFontsetFilled (bool=true)
UFontsetUnderlined (bool=true)
UFontsetOverlined (bool=true)
UFontsetStrikethrough (bool=true)
int getStyle () const
UFontsetStyle (const UFont &)
UFontsetStyle (int styles)
UFontchangeStyle (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
UFontufont (const UFont &_f)
 shortcut for *new UFont().

Detailed Description

Font of a UGroup or UBox container.

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:

See also:
: UProp.


Constructor & Destructor Documentation

ubit::UFont::UFont ( const UFontFamily &  ,
int  style,
int  point_size 
)

create a new font object.

arguments:


Member Function Documentation

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.


Member Data Documentation

UFont ubit::UFont::strikethrough [static]

font style modifiers.


The documentation for this class was generated from the following files:
Generated on Mon Jan 29 00:20:50 2007 for Ubit by  doxygen 1.4.7