## Class TFont

Description

TFont class

TFont encapsulates the CSS style fields related with font settings.

- since: 3.0
- version: $Id: TFont.php 1398 2006-09-08 19:31:03Z xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/WebControls/TFont.php (line 23)

    TComponent
       |
       --TFont

Class Constant Summary
IS_BOLD = 0x01
IS_ITALIC = 0x02
IS_OVERLINE = 0x04
IS_SET_BOLD = 0x01000
IS_SET_ITALIC = 0x02000
IS_SET_NAME = 0x40000
IS_SET_OVERLINE = 0x04000
IS_SET_SIZE = 0x20000
IS_SET_STRIKEOUT = 0x08000
IS_SET_UNDERLINE = 0x10000
IS_STRIKEOUT = 0x08
IS_UNDERLINE = 0x10
Method Summary
void addAttributesToRender (THtmlWriter $writer)
void copyFrom (TFont $font)
boolean getBold ()
boolean getIsEmpty ()
boolean getItalic ()
string getName ()
boolean getOverline ()
string getSize ()
boolean getStrikeout ()
boolean getUnderline ()
void mergeWith (TFont $font)
void reset ()
void setBold (boolean $value)
void setItalic (boolean $value)
void setName (string $value)
void setOverline (boolean $value)
void setSize (string $value)
void setStrikeout (boolean $value)
void setUnderline (boolean $value)
string toString ()
Methods
addAttributesToRender (line 295)

Adds attributes related to CSS styles to renderer.

- access: public

void addAttributesToRender (THtmlWriter $writer)

- THtmlWriter $writer: the writer used for the rendering purpose

copyFrom (line 242)

Copies the fields in a new font to this font.

If a font field is set in the new font, the corresponding field in this font will be overwritten.

- access: public

void copyFrom (TFont $font)

- TFont $font: the new font

getBold (line 61)

- return: whether the font is in bold face. Defaults to false.
- access: public

boolean getBold ()
getIsEmpty (line 195)

- return: whether the font is empty
- access: public

boolean getIsEmpty ()
getItalic (line 81)

- return: whether the font is in italic face. Defaults to false.
- access: public

boolean getItalic ()
getName (line 178)

- return: the font name (family)
- access: public

string getName ()
getOverline (line 101)

- return: whether the font is overlined. Defaults to false.
- access: public

boolean getOverline ()
getSize (line 121)

- return: the font size
- access: public

string getSize ()
getStrikeout (line 138)

- return: whether the font is strikeout. Defaults to false.
- access: public

boolean getStrikeout ()
getUnderline (line 158)

- return: whether the font is underlined. Defaults to false.
- access: public

boolean getUnderline ()
mergeWith (line 216)

Merges the font with a new one.

If a font field is not set in the font, it will be overwritten with the new one.

- access: public

void mergeWith (TFont $font)

- TFont $font: the new font

reset (line 203)

Clears up the font.

- access: public

void reset ()
setBold (line 69)

- access: public

void setBold (boolean $value)

- boolean $value: whether the font is in bold face

setItalic (line 89)

- access: public

void setItalic (boolean $value)

- boolean $value: whether the font is italic

setName (line 186)

- access: public

void setName (string $value)

- string $value: the font name (family)

setOverline (line 109)

- access: public

void setOverline (boolean $value)

- boolean $value: whether the font is overlined

setSize (line 129)

- access: public

void setSize (string $value)

- string $value: the font size

setStrikeout (line 146)

- access: public

void setStrikeout (boolean $value)

- boolean $value: whether the font is strikeout

setUnderline (line 166)

- access: public

void setUnderline (boolean $value)

- boolean $value: whether the font is underlined

toString (line 265)

- return: the font in a css style string representation.
- access: public

string toString ()

#### Inherited Methods

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Class Constants
IS_BOLD = 0x01 (line 28)

Bits indicating the font states.

IS_ITALIC = 0x02 (line 29)
IS_OVERLINE = 0x04 (line 30)
IS_SET_BOLD = 0x01000 (line 37)

Bits indicating whether particular font states are changed.

IS_SET_ITALIC = 0x02000 (line 38)
IS_SET_NAME = 0x40000 (line 43)
IS_SET_OVERLINE = 0x04000 (line 39)
IS_SET_SIZE = 0x20000 (line 42)
IS_SET_STRIKEOUT = 0x08000 (line 40)
IS_SET_UNDERLINE = 0x10000 (line 41)
IS_STRIKEOUT = 0x08 (line 31)
IS_UNDERLINE = 0x10 (line 32)

Documentation generated on Mon, 21 Apr 2008 11:35:03 -0400 by phpDocumentor 1.3.0RC4