RTmTextCache Class Reference
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().
Public Member Functions |
---|
| RTmTextCache(MTmSource &, MGraphicsDeviceMap &) |
TInt
| AdvanceWidthL(TInt, TInt, TBool, TInt, CFbsFont::TMeasureTextOutput *, TInt) |
TUint
| Char(TInt) |
void | Close() |
MGraphicsDeviceMap & | Device() |
const TTmCharFormat & | Format() |
TUint
| GetContextChar() |
TUint
| GetContextForByteCode() |
TInt
| GetDisplayedText(TInt, TInt, TDisplayedTextDirectionality, TText *, TUint, TTmCharFormat *, CTmTextFontCache **) |
TInt
| GetText(TInt, TInt, TPtrC &, TTmCharFormat *, CTmTextFontCache **) |
TInt
| GetTextL(TInt, TInt, TPtrC &, TTmCharFormat *, CTmTextFontCache **) |
TBool
| IsArabicPoint(TInt) |
void | ReleaseFont() |
void | SetContextChar(TUint) |
MTmSource & | Source() |
TInt
| TotalWidthL(TInt, TInt, TBool) |
Constructor & Destructor Documentation
RTmTextCache(MTmSource &, MGraphicsDeviceMap &)
Member Functions Documentation
AdvanceWidthL(TInt, TInt, TBool, TInt, CFbsFont::TMeasureTextOutput *, TInt)
Measure the width of some text, substituting glyphs where necessary.
Parameters
TInt aStart | Start position of text in document |
TInt aEnd | (Exclusive) end position of text in document |
TBool aRightToLeft | True if the text is right-to-left |
TInt aMaxWidth =
KMaxTInt
| Measurement will stop if this advance is exceeded |
CFbsFont::TMeasureTextOutput * aOutput = 0 | Output form text measurement function |
TInt aExtraChar = 0 | Fetch 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. |
GetContextChar()
TUint
| GetContextChar | ( | ) | const [inline] |
GetContextForByteCode()
TUint
| GetContextForByteCode | ( | ) | const [inline] |
GetDisplayedText(TInt, TInt, TDisplayedTextDirectionality, TText *, TUint, TTmCharFormat *, CTmTextFontCache **)
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.
GetText(TInt, TInt, TPtrC &, TTmCharFormat *, CTmTextFontCache **)
GetTextL(TInt, TInt, TPtrC &, TTmCharFormat *, CTmTextFontCache **)
Same as GetText but will join text together if it has the same format.
Parameters
TInt aPos | |
TInt aMaxEndChar | |
TPtrC & aText | the text returned. Is valid until the next call of GetText, GetTextL or Close. |
TTmCharFormat * aFormat = 0 | |
CTmTextFontCache ** aFont = 0 | If 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. |
ReleaseFont()
void | ReleaseFont | ( | ) | [inline] |
SetContextChar(TUint)
void | SetContextChar | ( | TUint | aContextChar | ) | |
TotalWidthL(TInt, TInt, TBool)
Measure the width of some text, substituting glyphs where necessary.
Parameters
TInt aStart | Start position of text in document |
TInt aEnd | (Exclusive) end position of text in document |
TBool aRightToLeft | True 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
TInt
iDocumentLength
TInt
| iDocumentLength | [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] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.