RTmTextCache Class Reference

class RTmTextCache

A class for caching text and formats extracted from a text source. That it is an R class shows that it must be closed after use; call Close().

Constructor & Destructor Documentation

RTmTextCache(MTmSource &, MGraphicsDeviceMap &)

RTmTextCache(MTmSource &aSource,
MGraphicsDeviceMap &aDevice
)[inline]

Parameters

MTmSource & aSource
MGraphicsDeviceMap & aDevice

Member Functions Documentation

AdvanceWidthL(TInt, TInt, TBool, TInt, CFbsFont::TMeasureTextOutput *, TInt)

TInt AdvanceWidthL(TIntaStart,
TIntaEnd,
TBoolaRightToLeft,
TIntaMaxWidth =  KMaxTInt ,
CFbsFont::TMeasureTextOutput *aOutput = 0,
TIntaExtraChar = 0
)

Measure the width of some text, substituting glyphs where necessary.

Parameters

TInt aStartStart position of text in document
TInt aEnd(Exclusive) end position of text in document
TBool aRightToLeftTrue if the text is right-to-left
TInt aMaxWidth =  KMaxTInt Measurement will stop if this advance is exceeded
CFbsFont::TMeasureTextOutput * aOutput = 0Output form text measurement function
TInt aExtraChar = 0Fetch this much context beyond aEnd. This helps when the text is to be truncated, and aEnd is not certain to be at a cluster boundary.

Char(TInt)

TUint Char(TIntaPos)

Parameters

TInt aPos

Close()

voidClose()[inline]

Device()

MGraphicsDeviceMap &Device()[inline]

Format()

const TTmCharFormat &Format()const [inline]

GetContextChar()

TUint GetContextChar()const [inline]

GetContextForByteCode()

TUint GetContextForByteCode()const [inline]

GetDisplayedText(TInt, TInt, TDisplayedTextDirectionality, TText *, TUint, TTmCharFormat *, CTmTextFontCache **)

TInt GetDisplayedText(TIntaStart,
TIntaEnd,
TDisplayedTextDirectionalityaDirectionality,
TText *aBuffer,
TUintaContextChar,
TTmCharFormat *aFormat = 0,
CTmTextFontCache **aFont = NULL
)

Gets all the displayed text in the range aStart...aEnd and puts it into a buffer that must be at least aEnd - aStart + 2 characters in length. If aFormat is non-null gets the format of the first section of text. If aFont is non-null gets the font for the first section of text. If aDirectionality is EVisualRightToLeft reverses the text and mirrors appropriate characters. Adds a zero-width joiner to the start and/or end of the text returned if these are necessary for the correct contextual glyph choice. Adds a 0xFFFF to each end if this is not required.

Parameters

TInt aStart
TInt aEnd
TDisplayedTextDirectionality aDirectionality
TText * aBuffer
TUint aContextChar
TTmCharFormat * aFormat = 0
CTmTextFontCache ** aFont = NULLIf aFont is not null, on return contains a pointer to an opened CTmTextFontCache* The caller must call Close on aFont when finished with the font.

GetText(TInt, TInt, TPtrC &, TTmCharFormat *, CTmTextFontCache **)

TInt GetText(TIntaPos,
TIntaMaxEndChar,
TPtrC &aText,
TTmCharFormat *aFormat = NULL,
CTmTextFontCache **aFont = NULL
)

Parameters

TInt aPos
TInt aMaxEndChar
TPtrC & aText
TTmCharFormat * aFormat = NULL
CTmTextFontCache ** aFont = NULL

GetTextL(TInt, TInt, TPtrC &, TTmCharFormat *, CTmTextFontCache **)

TInt GetTextL(TIntaPos,
TIntaMaxEndChar,
TPtrC &aText,
TTmCharFormat *aFormat = 0,
CTmTextFontCache **aFont = 0
)

Same as GetText but will join text together if it has the same format.

Parameters

TInt aPos
TInt aMaxEndChar
TPtrC & aTextthe text returned. Is valid until the next call of GetText, GetTextL or Close.
TTmCharFormat * aFormat = 0
CTmTextFontCache ** aFont = 0If aFont is not null, on return contains a pointer to an opened CTmTextFontCache* The caller must call Close on aFont when finished with the font.

IsArabicPoint(TInt)

TBool IsArabicPoint(TIntaChar)[static]

Parameters

TInt aChar

ReleaseFont()

voidReleaseFont()[inline]

SetContextChar(TUint)

voidSetContextChar(TUintaContextChar)

Parameters

TUint aContextChar

Source()

MTmSource &Source()[inline]

TotalWidthL(TInt, TInt, TBool)

TInt TotalWidthL(TIntaStart,
TIntaEnd,
TBoolaRightToLeft
)

Measure the width of some text, substituting glyphs where necessary.

Parameters

TInt aStartStart position of text in document
TInt aEnd(Exclusive) end position of text in document
TBool aRightToLeftTrue if the text is right-to-left

Member Enumerations Documentation

Enum TDisplayedTextDirectionality

Enumerators

ELeftToRight = 0
EVisualRightToLeft = 1
ELogicalRightToLeft = 2

Member Data Documentation

TUint iContextCharInByteCode

TUint iContextCharInByteCode[private]

TUint iContextCharPerChunk

TUint iContextCharPerChunk[private]

MGraphicsDeviceMap & iDevice

MGraphicsDeviceMap &iDevice[private]

TInt iDocumentLength

TInt iDocumentLength[private]

CTmTextFontCache * iFont

CTmTextFontCache *iFont[private]

TTmCharFormat iFormat

TTmCharFormat iFormat[private]

MTmSource & iSource

MTmSource &iSource[private]

const TText * iText

const TText *iText[private]

RBuf iTextBuffer

RBuf iTextBuffer[private]

TBool iTextBufferEndsInFormatChange

TBool iTextBufferEndsInFormatChange[private]

TInt iTextBufferStart

TInt iTextBufferStart[private]

TInt iTextLength

TInt iTextLength[private]

TInt iTextStart

TInt iTextStart[private]