TBidiText Class Reference

class TBidiText

This class works as a replacement for HBufC in those cases where a small amount of text is being formatted simply. The text must be all of one style and broken into lines of all the same length. The number of lines and the text itself is specified on construction, and the text may then be re-broken, re-truncated and re-drawn with non-leaving functions.

Public Member Functions
IMPORT_C TDirectionalityDirectionality()
IMPORT_C TPtrCDisplayText()
IMPORT_C voidDrawText(CGraphicsContext &, const TPoint &)
IMPORT_C voidDrawText(CGraphicsContext &, const TPoint &, TInt, CGraphicsContext::TTextAlign)
IMPORT_C voidDrawText(CGraphicsContext &, const TPoint &, TInt)
IMPORT_C TPtrCLineOfDisplayText(TInt, TInt &)
IMPORT_C TSizeMinimumSize(TInt, const CFont &, TInt, TInt, const MLineBreaker *)
IMPORT_C TBidiText *NewL(TInt, TInt)
IMPORT_C TBidiText *NewL(const TDesC &, TInt)
IMPORT_C TBidiText *NewL(const TDesC &, TInt, TDirectionality)
IMPORT_C TIntNumberOfLinesInDisplayText()
IMPORT_C TDirectionalityScriptDirectionality(TLanguage)
IMPORT_C TIntSetText(const TDesC &, RRunInfoArray &)
IMPORT_C TIntSetText(const TDesC &, TDirectionality, RRunInfoArray &)
IMPORT_C voidSetTruncationChar(TChar)
IMPORT_C TPtrCText()
IMPORT_C TDirectionalityTextDirectionality(const TDesC &, TBool *)
IMPORT_C TCharTruncationChar()
IMPORT_C voidWrapText(TInt, const CFont &, const MLineBreaker *, TInt)
IMPORT_C voidWrapText(TInt, const CFont &, const MLineBreaker *)
IMPORT_C TIntWrappingWidth()
Protected Member Functions
TBidiText()
Private Member Functions
TInt DoWrapText(TInt, const CFont &, const MLineBreaker *, TInt, TText *&, TInt &, TInt16 *)
Public Member Enumerations
enumTDirectionality { ELeftToRight = 0, ERightToLeft = 1 }
enumTPanicCodes { EPanicRunArrayNull }

Constructor & Destructor Documentation

TBidiText()

TBidiText()[protected]

Member Functions Documentation

Directionality()

IMPORT_C TDirectionalityDirectionality()const

DisplayText()

IMPORT_C TPtrCDisplayText()const

DoWrapText(TInt, const CFont &, const MLineBreaker *, TInt, TText *&, TInt &, TInt16 *)

TInt DoWrapText(TIntaWrappingWidth,
const CFont &aFont,
const MLineBreaker *aBreaker,
TIntaMaxLines,
TText *&aOutputText,
TInt &aNumLines,
TInt16 *aLineWidthArray
)const [private]

Parameters

TInt aWrappingWidth
const CFont & aFont
const MLineBreaker * aBreaker
TInt aMaxLines
TText *& aOutputText
TInt & aNumLines
TInt16 * aLineWidthArray

DrawText(CGraphicsContext &, const TPoint &)

IMPORT_C voidDrawText(CGraphicsContext &aGc,
const TPoint &aLeft
)const

Parameters

CGraphicsContext & aGc
const TPoint & aLeft

DrawText(CGraphicsContext &, const TPoint &, TInt, CGraphicsContext::TTextAlign)

IMPORT_C voidDrawText(CGraphicsContext &aGc,
const TPoint &aLeft,
TIntaBaseLineSpacing,
CGraphicsContext::TTextAlignaAlignment
)const

Parameters

CGraphicsContext & aGc
const TPoint & aLeft
TInt aBaseLineSpacing
CGraphicsContext::TTextAlign aAlignment

DrawText(CGraphicsContext &, const TPoint &, TInt)

IMPORT_C voidDrawText(CGraphicsContext &aGc,
const TPoint &aLeft,
TIntaBaseLineSpacing
)const

Parameters

CGraphicsContext & aGc
const TPoint & aLeft
TInt aBaseLineSpacing

LineOfDisplayText(TInt, TInt &)

IMPORT_C TPtrCLineOfDisplayText(TIntaLine,
TInt &aWidthInPixels
)const

Parameters

TInt aLine
TInt & aWidthInPixels

MinimumSize(TInt, const CFont &, TInt, TInt, const MLineBreaker *)

IMPORT_C TSizeMinimumSize(TIntaWrappingWidth,
const CFont &aFont,
TIntaLineGap,
TIntaMaxLines = -1,
const MLineBreaker *aBreaker = NULL
)const

Parameters

TInt aWrappingWidth
const CFont & aFont
TInt aLineGap
TInt aMaxLines = -1
const MLineBreaker * aBreaker = NULL

NewL(TInt, TInt)

IMPORT_C TBidiText *NewL(TIntaReservedMaxLength,
TIntaMaxLines
)[static]

Parameters

TInt aReservedMaxLength
TInt aMaxLines

NewL(const TDesC &, TInt)

IMPORT_C TBidiText *NewL(const TDesC &aText,
TIntaMaxLines
)[static]

Parameters

const TDesC & aText
TInt aMaxLines

NewL(const TDesC &, TInt, TDirectionality)

IMPORT_C TBidiText *NewL(const TDesC &aText,
TIntaMaxLines,
TDirectionalityaDirectionality
)[static]

Parameters

const TDesC & aText
TInt aMaxLines
TDirectionality aDirectionality

NumberOfLinesInDisplayText()

IMPORT_C TIntNumberOfLinesInDisplayText()const

ScriptDirectionality(TLanguage)

IMPORT_C TDirectionalityScriptDirectionality(TLanguageaLanguage)[static]

Parameters

TLanguage aLanguage

SetText(const TDesC &, RRunInfoArray &)

IMPORT_C TIntSetText(const TDesC &aText,
RRunInfoArray &aRunInfoArray
)

Parameters

const TDesC & aText
RRunInfoArray & aRunInfoArray

SetText(const TDesC &, TDirectionality, RRunInfoArray &)

IMPORT_C TIntSetText(const TDesC &aText,
TDirectionalityaDirectionality,
RRunInfoArray &aRunInfoArray
)

Parameters

const TDesC & aText
TDirectionality aDirectionality
RRunInfoArray & aRunInfoArray

SetTruncationChar(TChar)

IMPORT_C voidSetTruncationChar(TCharaTruncateWith)

Parameters

TChar aTruncateWith

Text()

IMPORT_C TPtrCText()const

TextDirectionality(const TDesC &, TBool *)

IMPORT_C TDirectionalityTextDirectionality(const TDesC &aText,
TBool *aFound = 0
)[static]

Parameters

const TDesC & aText
TBool * aFound = 0

TruncationChar()

IMPORT_C TCharTruncationChar()const

WrapText(TInt, const CFont &, const MLineBreaker *, TInt)

IMPORT_C voidWrapText(TIntaWrappingWidth,
const CFont &aFont,
const MLineBreaker *aBreaker,
TIntaMaxLines
)

Parameters

TInt aWrappingWidth
const CFont & aFont
const MLineBreaker * aBreaker
TInt aMaxLines

WrapText(TInt, const CFont &, const MLineBreaker *)

IMPORT_C voidWrapText(TIntaWrappingWidth,
const CFont &aFont,
const MLineBreaker *aBreaker = NULL
)

Parameters

TInt aWrappingWidth
const CFont & aFont
const MLineBreaker * aBreaker = NULL

WrappingWidth()

IMPORT_C TIntWrappingWidth()const

Member Enumerations Documentation

Enum TDirectionality

Overall directionality of the text.

Enumerators

ELeftToRight = 0

Text reading begins on the left.

ERightToLeft = 1

Text reading begins on the right.

Enum TPanicCodes

Class specific panic codes This enum has been replaced by TBidiPanic.

Enumerators

EPanicRunArrayNull