TAknTextDecorationMetrics Class Reference

class TAknTextDecorationMetrics

This class contains information to decorate a text with highlights, cursors and margins

Construction is performed driven by metrics and style derived from the various object that are used in the different contstructors. The metrics used are height, weight, and posture.

From Series 60 font id, the current layout is accessed to provide metrics and style info. From a CFont object, the font's own accessible metrics and styles are accessed (e.g. HeightInPixels()) From a TFontSpec object, the height and style are extracted via its APIs.

avkon.dll
Since
2.8

Constructor & Destructor Documentation

TAknTextDecorationMetrics(TInt)

IMPORT_CTAknTextDecorationMetrics(TIntaFontId)

Construct the object with values that are correct for the given font identifier.

Parameters

TInt aFontId

TAknTextDecorationMetrics(const CFont *)

IMPORT_CTAknTextDecorationMetrics(const CFont *aFont)

Construct the object with values that are correct for the given Symbian Font A null pointer passed in will result in a default set of metrics.

Parameters

const CFont * aFont

TAknTextDecorationMetrics(const TAknFontSpecification &)

IMPORT_CTAknTextDecorationMetrics(const TAknFontSpecification &aFontSpecification)

Construct the object with values that are correct for the given Series 60 Font Specification. This constructor depends upon the font height and boldness being set in the font specifcation object.

Parameters

const TAknFontSpecification & aFontSpecification

Member Functions Documentation

BaselineToUnderlineOffset()

IMPORT_C TIntBaselineToUnderlineOffset()const

Offset distance measured from the bottom of the baseline row of pixels to the bottom of the underline. E.g. if this method returns 3, and the underline height is 1, then there are 2 pixel rows of gap between the baseline of glyphs and the underline.

The baseline referred to is the natural baseline of the glyph, not the formal baseline reported by the font. To draw the underline, it may be necessary, depending on how the font is compounded, to find the baseline (i.e. ascent) of individual character codes' glyphs.

CursorWidth()

IMPORT_C TIntCursorWidth()const

Width of the cursor in pixels. This width is to be used when cursor is drawn rather than an image.

GetCursorLayoutsFromCategory(TAknFontCategory, TAknWindowComponentLayout &, TAknWindowComponentLayout &)

voidGetCursorLayoutsFromCategory(TAknFontCategoryaCategory,
TAknWindowComponentLayout &aCursorLayout,
TAknWindowComponentLayout &aCursorLayoutGraphic
)const [private]

Parameters

TAknFontCategory aCategory
TAknWindowComponentLayout & aCursorLayout
TAknWindowComponentLayout & aCursorLayoutGraphic

GetHighlightLayoutsFromCategory(TAknFontCategory, TAknWindowComponentLayout &, TAknTextComponentLayout &, TAknWindowComponentLayout &)

voidGetHighlightLayoutsFromCategory(TAknFontCategoryaCategory,
TAknWindowComponentLayout &aHighlightParentPane,
TAknTextComponentLayout &aHighlightTextPane,
TAknWindowComponentLayout &aHighlightPane
)const [private]

Parameters

TAknFontCategory aCategory
TAknWindowComponentLayout & aHighlightParentPane
TAknTextComponentLayout & aHighlightTextPane
TAknWindowComponentLayout & aHighlightPane

GetLeftAndRightMargins(TInt &, TInt &)

IMPORT_C voidGetLeftAndRightMargins(TInt &aLeft,
TInt &aRight
)const

Fetch the values in pixels for the distances reserved for cursor and highlights that extend beyond the font's rendering area (where the glyphs draw)

Values are positive for any normal margin - one that is outside the glyphs area.

Parameters

TInt & aLeftnumber of extra columns of pixels left of glyphs for additional graphics
TInt & aRightnumber of extra rows of pixels right of glyphs for additional graphics

GetTopAndBottomMargins(TInt &, TInt &)

IMPORT_C voidGetTopAndBottomMargins(TInt &aTop,
TInt &aBottom
)const

Fetch the values in pixels for the distances reserved for cursor and highlights that extend beyond the font's rendering area (where the glyphs draw)

Values are positive for any normal margin - one that is outside the glyphs area.

Parameters

TInt & aTopnumber of extra rows of pixels below font descent for additional graphics
TInt & aBottom

SetDefaultMetrics(TAknFontCategory, TBool)

voidSetDefaultMetrics(TAknFontCategoryaCategory,
TBoolaIsBold
)[private]

Parameters

TAknFontCategory aCategory
TBool aIsBold

SetMetricsFromSizeAndBoldness(TAknFontCategory, TInt, TBool)

voidSetMetricsFromSizeAndBoldness(TAknFontCategoryaCategory,
TIntaTextHeight,
TBoolaIsBold
)[private]

Parameters

TAknFontCategory aCategory
TInt aTextHeight
TBool aIsBold

UnderlineHeight()

IMPORT_C TIntUnderlineHeight()const

Height (i.e. thickness) of the drawing of the underline Positive for any visible line. e.g. a value of 1, means one row of pixels is drawn.

Member Data Documentation

TInt16 iBaselineToUnderlineOffset

TInt16 iBaselineToUnderlineOffset[private]

TInt16 iBottomMargin

TInt16 iBottomMargin[private]

TInt16 iCursorWidth

TInt16 iCursorWidth[private]

TInt16 iLeftMargin

TInt16 iLeftMargin[private]

TInt16 iRightMargin

TInt16 iRightMargin[private]

TInt16 iSpare

TInt16 iSpare[private]

TInt16 iTopMargin

TInt16 iTopMargin[private]

TInt16 iUnderlineHeight

TInt16 iUnderlineHeight[private]