Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <coetextdrawer.h>
Link against: cone.lib

Class TCoeTextTypeAdaptor

class TCoeTextTypeAdaptor;

Description

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.

Members

Defined in TCoeTextTypeAdaptor:


Construction and destruction


TCoeTextTypeAdaptor(const TDesC &)

IMPORT_C TCoeTextTypeAdaptor(const TDesC &aText);

Description

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

Parameters

const TDesC16 &aText

The text wrapped by the TCoeTextTypeAdaptor.


TCoeTextTypeAdaptor(const TBidiText &)

IMPORT_C TCoeTextTypeAdaptor(const TBidiText &aText);

Description

Constructor taking a TBidiText object as parameter.

Parameters

const TBidiText &aText

The text wrapped by the TCoeTextTypeAdaptor.

[Top]


Member functions


NumberOfLines()const

IMPORT_C TInt NumberOfLines() const;

Description

Calculates the number of lines in the text.

Return value

TInt

TInt number of lines in the object


LineOfText(TInt,TInt &,const CFont &)const

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

Description

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.

Return value

TPtrC16

TPtrC line of text


HasRightToLeftDirectionality()const

IMPORT_C TBool HasRightToLeftDirectionality() const;

Description

This function checks the directionality of the text.

Return value

TBool

ETrue if the text has right-to-left directionality, EFalse if it has left-to-right directionality.