Wt::WFont Class Reference
[Style classesPainting system]

A style class describing a font. More...

#include <Wt/WFont>

List of all members.

Public Types

enum  GenericFamily {
  Default, Serif, SansSerif, Cursive,
  Fantasy, Monospace
}
 The generic font family. More...
enum  Style { NormalStyle, Italic, Oblique }
 The font style. More...
enum  Variant { NormalVariant, SmallCaps }
 The font variant. More...
enum  Weight {
  NormalWeight, Bold, Bolder, Lighter,
  Value
}
 The font weight. More...
enum  Size {
  XXSmall, XSmall, Small, Medium,
  Large, XLarge, XXLarge, Smaller,
  Larger, FixedSize
}
 The font size. More...

Public Member Functions

 WFont ()
 A default font (dependent on the user agent).
void setFamily (GenericFamily genericFamily, const WString specificFamilies=WString())
 Set the font family.
GenericFamily genericFamily () const
 Get the font generic family.
const WStringspecificFamilies () const
 Get the font specific family names.
void setStyle (Style style)
 Set the font style.
Style style () const
 Get the font style.
void setVariant (Variant variant)
 Set the font variant.
Variant variant () const
 Get the font variant.
void setWeight (Weight weight, int value=400)
 Set the font weight.
Weight weight () const
 Get the font weight.
int weightValue () const
 Get the font weight value.
void setSize (Size size, WLength fixedSize=WLength())
 Set the font size.
Size size () const
 Get the font size.
WLength fixedSize () const
 Get the fixed font size for FixedSize .


Detailed Description

A style class describing a font.

Member Enumeration Documentation

enum Wt::WFont::GenericFamily

The generic font family.

Enumerator:
Default  Browser-dependent default.
Serif  e.g. Times
SansSerif  e.g. Helvetica
Cursive  e.g. Zapf-Chancery
Fantasy  e.g. Western
Monospace  e.g. Courier

enum Wt::WFont::Style

The font style.

Enumerator:
NormalStyle  Normal (default).
Italic  Italic.
Oblique  Oblique.

enum Wt::WFont::Variant

The font variant.

Enumerator:
NormalVariant  Normal (default).
SmallCaps  Small Capitals.

enum Wt::WFont::Weight

The font weight.

Enumerator:
NormalWeight  Normal (default) (Value == 400).
Bold  Bold (Value == 700).
Bolder  Bolder than the parent widget.
Lighter  Lighter than the parent widget.
Value  Specify a value (100 - 900).

enum Wt::WFont::Size

The font size.

Enumerator:
XXSmall  Extra Extra small.
XSmall  Extra small.
Small  Small.
Medium  Medium, default.
Large  Large.
XLarge  Extra large.
XXLarge  Extra Extra large.
Smaller  Relatively smaller than the parent widget.
Larger  Relatively larger than the parent widget.
FixedSize  Explicit size, See also fontFixedSize().


Member Function Documentation

void Wt::WFont::setFamily ( GenericFamily  genericFamily,
const WString  specificFamilies = WString() 
)

Set the font family.

The font family is specified using a generic family name, in addition to a comma-seperated list of specific font choices.

The first specific font that can be matched will be used, otherwise a generic font will be used.

void Wt::WFont::setWeight ( Weight  weight,
int  value = 400 
)

Set the font weight.

When setting weight == Value, you may specify a value.

Valid values are between 100 and 900, and are rounded to multiples of 100.


Generated on Fri Jul 25 17:56:38 2008 for Wt by doxygen 1.5.3