TCoeTextTypeAdaptor Class Reference

class TCoeTextTypeAdaptor

This class allows the XCoeTextDrawer to draw text that is in the form of a TBidiText object as well as pre-reordered new-line separated plain text descriptors. (The descriptor text is especially useful when using the XCoeTextDrawer together with the FORM component).

This removes the need to implement two versions of the DrawText() method.

Constructor & Destructor Documentation

TCoeTextTypeAdaptor(const TDesC &)

IMPORT_C TCoeTextTypeAdaptor ( const TDesC & aText )

Constructor taking a plain descriptor as parameter. The directionality of the text separated with '' must always be left-to-right display order.

Parameters

const TDesC & aText The text wrapped by the TCoeTextTypeAdaptor.

TCoeTextTypeAdaptor(const TBidiText &)

IMPORT_C TCoeTextTypeAdaptor ( const TBidiText & aText )

Constructor taking a TBidiText object as parameter.

Parameters

const TBidiText & aText The text wrapped by the TCoeTextTypeAdaptor.

Member Functions Documentation

HasRightToLeftDirectionality()

IMPORT_C TBool HasRightToLeftDirectionality ( ) const

This function checks the directionality of the text.

LineOfText(TInt, TInt &, const CFont &)

IMPORT_C TPtrC LineOfText ( TInt aLineNumber,
TInt & aWidthInPixels,
const CFont & aFont
) const

Extracts a line of text. The width (in pixels) of the line is returned in aWidthInPixels.

Parameters

TInt aLineNumber Zero-based line number.
TInt & aWidthInPixels The width of the line of text.
const CFont & aFont The font that will be used to draw the text.

NumberOfLines()

IMPORT_C TInt NumberOfLines ( ) const

Calculates the number of lines in the text.

Member Enumerations Documentation

Enum TTextType

Enumerators

ENewlineSeparated
EBidiText

Member Data Documentation

const TAny * iText

const TAny * iText [private]

TTextType iTextType

TTextType iTextType [private]