Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: txtfrmat.h
Link against: etext.lib

Class TFontPresentation

TFontPresentation

Support

Supported from 5.0

Description

Specifies all font-independent character format attributes, including bold, italics and underlining. An instance of this class is owned by the character formatting container (class TCharFormat).

Defined in TFontPresentation:
EAlignBaseLine, EAlignBottom, EAlignCentered, EAlignTop, EFontHighlightFirstCustomStyle, EFontHighlightLastCustomStyle, EFontHighlightNone, EFontHighlightNormal, EFontHighlightRounded, EFontHighlightShadow, IsEqual(), TAlignment, TFontHighlightStyle, TFontPresentation(), iHiddenText, iHighlightColor, iHighlightStyle, iPictureAlignment, iStrikethrough, iTextColor, iUnderline


Construction


TFontPresentation()

TFontPresentation();

Description

The default C++ constructor constructs a TFontPresentation object, initializing all member data to default values. For details of these values, see the table below.

[Top]


Comparison


IsEqual()

TBool IsEqual(const TFontPresentation& aFontPresentation,const TCharFormatMask& aMask)const;

Description

Compares selected attribute values for equality. Only the attributes specified in the mask are involved in the comparison.

Parameters

const TFontPresentation& aFontPresentation

Contains the attribute values to compare.

const TCharFormatMask& aMask

Bitmask specifying the attributes involved in the comparison.

Return value

TBool

ETrue if the two objects have the same values for the attributes specified in the mask, EFalse if not.

[Top]


Data members


iTextColor

TRgb iTextColor

Support

Withdrawn in 6.0

Description

The text colour. By default KRgbBlack.


iTextColor

TLogicalRgb iTextColor

Support

Supported from 6.0

Description

The text colour. By default, the default system foreground colour.


iHighlightColor

TRgb iHighlightColor

Support

Withdrawn in 6.0

Description

The highlight colour for selected text. Only takes effect if iHighlightStyle is not EFontHighlightNone. By default KRgbBlack.


iHighlightColor

TLogicalRgb iHighlightColor

Support

Supported from 6.0

Description

The highlight colour for selected text. Only takes effect if iHighlightStyle is not EFontHighlightNone. By default, the default system foreground colour.


iHighlightStyle

TFontHighlightStyle iHighlightStyle

Description

Style for character highlighting. By default EFontHighlightNone.


iStrikethrough

TFontStrikethrough iStrikethrough

Description

The value of the strikethrough attribute. By default EStrikethroughOff.


iUnderline

TFontUnderline iUnderline

Description

The value of the underline attribute. By default EUnderlineOff.


iHiddenText

TBool iHiddenText

Description

Specifies whether or not text is hidden. Note that hidden text is not currently supported by EPOC's text layout engine. This attribute is provided to preserve information when copying from and to devices which support hidden text. By default EFalse.


iPictureAlignment

TAlignment iPictureAlignment

Description

The vertical alignment of a picture character. By default EAlignBaseLine.

[Top]


Enumerations


Enum TFontHighlightStyle

TFontHighlightStyle

Description

Highlight style

EFontHighlightNone

No highlighting used.

EFontHighlightNormal

Normal (square cornered) highlighting used.

EFontHighlightRounded

Rounded corner highlighting used.

EFontHighlightShadow

Text is drawn offset towards the bottom-right in the highlight colour, (iHighlightColor) before being drawn again in the text colour, (iTextColor) creating a shadow effect.

EFontHighlightFirstCustomStyle

First custom highlighting style is used. See MFormCustomDraw::DrawText().

EFontHighlightLastCustomStyle

Second custom highlighting style is used. See MFormCustomDraw::DrawText().


Enum TAlignment

TAlignment

Description

Vertical picture alignment

EAlignTop

The top of the picture is aligned flush with the top of the font's ascent, so that the picture may descend below the line.

EAlignBottom

The bottom of the picture is aligned flush with the bottom of the font's descent so that the picture may extend above the line.

EAlignCentered

The picture is aligned so that its centre is positioned at the baseline of the line.

EAlignBaseLine

The bottom of the picture is aligned with the baseline of the font. This is the default.