class MTmSource : public MTmCustom |
WARNING: this Class is for internal use ONLY. Compatibility is not guaranteed in future releases. MTmSource is an interface class that must be implemented by users of CTmTextLayout to provide text content and attributes. MTmSource is derived from MTmCustom, which contains the functions to customise the layout and display, so that this can be done in CTmText without affecting the content.
Public Member Functions | |
---|---|
TInt | DocumentLength() |
MGraphicsDeviceMap & | FormatDevice() |
IMPORT_C TAny * | GetExtendedInterface(const TUid &) |
IMPORT_C TBool | GetLineBreakL(const TDesC &, TInt, TInt, TInt, TBool, TInt &, TInt &, TInt &) |
void | GetParagraphFormatL(TInt, RTmParFormat &) |
IMPORT_C TInt | GetPictureSizeInTwipsL(TInt, TSize &) |
IMPORT_C void | GetStandardLineBreak(const TDesC &, TInt, TInt, TInt &, TInt &) |
void | GetText(TInt, TPtrC &, TTmCharFormat &) |
MGraphicsDeviceMap & | InterpretDevice() |
IMPORT_C void | MTmSource_Reserved_1() |
IMPORT_C void | MTmSource_Reserved_2() |
IMPORT_C TBool | PageBreakInRange(TInt, TInt) |
IMPORT_C TInt | ParagraphEnd(TInt) |
TInt | ParagraphStart(TInt) |
IMPORT_C CPicture * | PictureL(TInt) |
Public Member Enumerations | |
---|---|
enum | anonymous { ELineBreakContext = 32 } |
enum | TLabelType { ENoLabel, EParLabel } |
Inherited Enumerations | |
---|---|
MLineBreaker:@53 | |
MTmCustom:@55 | |
MTmCustom:@76 |
TInt | DocumentLength | ( | ) | const [pure virtual] |
Return the length of the document in characters.
MGraphicsDeviceMap & | FormatDevice | ( | ) | const [pure virtual] |
Return the device used to format the text.
IMPORT_C TAny * | GetExtendedInterface | ( | const TUid & | aInterfaceId | ) | [virtual] |
const TUid & aInterfaceId |
IMPORT_C TBool | GetLineBreakL | ( | const TDesC & | aText, |
TInt | aDocPos, | |||
TInt | aMinBreakPos, | |||
TInt | aMaxBreakPos, | |||
TBool | aForwards, | |||
TInt & | aBreakPos, | |||
TInt & | aHangingChars, | |||
TInt & | aBreakPosAfterSpaces | |||
) | const |
void | GetParagraphFormatL | ( | TInt | aPos, |
RTmParFormat & | aFormat | |||
) | const [pure virtual] |
Return the paragraph format of the paragraph containing aPos. End-of-paragraph characters belong to the preceding paragraph.
TInt aPos | |
RTmParFormat & aFormat |
IMPORT_C TInt | GetPictureSizeInTwipsL | ( | TInt | aPos, |
TSize & | aSize | |||
) | const [virtual] |
IMPORT_C void | GetStandardLineBreak | ( | const TDesC & | aText, |
TInt | aMinBreakPos, | |||
TInt | aMaxBreakPos, | |||
TInt & | aBreakPos, | |||
TInt & | aNextLineStart | |||
) | [static] |
A static function to expose the standard line breaking system for use on plain text, mainly so that UIKON can use it for messages.
It finds the last feasible line break in the range aMinBreakPos...aMaxBreakPos within aText, and the start of the next line, which may be after aMaxBreakPos (because aMaxBreakPos may be in a run of spaces or before a line or paragraph separator).
The text passed in is the maximum that will fit the required line width; in other words, it has already been measured. The best way to do this is to use CFont::MeasureText and specify a TMeasureTextInput parameter with TMeasureTextInput::iMaxAdvance to the line width; TMeasureTextOutput::iChars gives the maximum length that will fit the line.
Bidirectional reformatting should be done after the break position is found.
Limitations:
Forced line breaks, which may be caused by CR, LF, FF, combinations of these, U+2028, and U+2029, are ignored, the purpose of the function being to break some text that is already known to be too wide for a certain measure. Dictionary-based line breaking for Thai is not available. Use zero-width spaces to allow line breaks in Thai.
This function cannot leave because MTmSource::GetLineBreakL cannot leave unless the implementation of PictureL can leave, and here the default MTmSource::PictureL, which does not leave, is called.
void | GetText | ( | TInt | aPos, |
TPtrC & | aText, | |||
TTmCharFormat & | aFormat | |||
) | const [pure virtual] |
Return at least one character of text, but preferably as many as possible, starting at aPos. Put its character format in aFormat. The text must be a run of characters sharing the same character format.
TInt aPos | |
TPtrC & aText | |
TTmCharFormat & aFormat |
MGraphicsDeviceMap & | InterpretDevice | ( | ) | const [pure virtual] |
Return the device used to draw the text and when converting between x-y coordinates and document positions. If the formatting and interpreting devices are different, text is scaled appropriately when it is drawn; this allows text to be formatted for printer fonts and displayed on the screen, giving a wysiwyg print preview.
IMPORT_C TBool | PageBreakInRange | ( | TInt | aStartPos, |
TInt | aEndPos | |||
) | const [virtual] |
IMPORT_C TInt | ParagraphEnd | ( | TInt | aPos | ) | const |
Return the end of the paragraph - after the paragraph separator if any.
TInt aPos |
TInt | ParagraphStart | ( | TInt | aPos | ) | const [pure virtual] |
Return the document position of the start of the paragraph containing aPos. End-of-paragraph characters belong to the preceding paragraph.
TInt aPos |
IMPORT_C CPicture * | PictureL | ( | TInt | aPos | ) | const [virtual] |
The default function to get a picture; override this if there are pictures in the document.
TInt aPos |
ELineBreakContext = 32 |
The maximum number of characters supplied to GetLineBreak, after aMaxBreakPos, and after trailing whitespace, to provide context for line breaking decisions. |
Label type used in LabelModeSelect
ENoLabel |
Not a label; used for TLabelTypes not yet assigned. |
EParLabel |
Paragraph label of the type supported by FORM. |
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.