class CTmTextLayout : public CBase |
WARNING: this Class is for internal use ONLY. Compatibility is not guaranteed in future releases. The text layout for a single rectangular piece of text. The object does not own its text or format attributes but gets them from an interface class called MTmSource.
There are functions for setting the text, drawing it, and converting between x-y coordinates and document positions.
Ranges
All ranges of character positions and pixels include the start but not the end. This means that if a line is described by a TTmLineInfo object as starting at document position 345 and ending at 389, character positions 345 to 388 are in the line; 389 is in the next line if any.
Coordinates and units
All coordinates used in TAGMA classes and function arguments are in pixels and are relative to the origin of the object, which is the top left corner of the ordinary text, not including paragraph labels. Vertical coordinates increase from top to bottom.
Document format and positions
A TAGMA document, as supplied by the MTmSource interface, has a length as returned by MTmSource::DocumentLength of zero or more characters. It consists of Unicode text split into paragraphs by standard Unicode paragraph delimiters (character value 0x2029), so the number of paragraphs in the entire document is one more than the number of paragraph delimiters. A document position is a value in the range 0 to one more than the document length. Lines contain all document positions from their start to one less than their end position. These conventions allow all lines to end in a delimiter; the last line contains an imaginary paragraph end, which need not be supplied by the MTmSource interface, at a position equal to the document length. A CTmTextLayout object formatted for an empty document will thus have a start position (returned by StartChar) of 0 and an end position (returned by EndChar) of 1. WARNING: this Class is for internal use ONLY. Compatibility is not guaranteed in future releases.
Private Member Functions | |
---|---|
void | AdjustWidth(const TTmFormatParamBase &, TInt) |
void | Invariant() |
TBool | LastLine(TTmLineInfo &) |
Private Attributes | |
---|---|
TBidirectionalContext * | iBdStateAtEnd |
CTmCode | iCode |
TUint | iCurrentContextChar |
TInt | iDrawingInterpFlags |
TInt | iEndChar |
TInt | iHeight |
MTmSource * | iSource |
TInt | iStartChar |
TInt | iWidth |
IMPORT_C | CTmTextLayout | ( | ) |
Construct an empty object with no text and zero width and height. It is legal to call all CTmTextLayout functions on an empty object, with the exception of AddParL and FormatL, which panic with ENoSource.
IMPORT_C TBool | AddParL | ( | const TTmFormatParamBase & | aParam, |
TBool | aAtStart, | |||
TInt & | aHeightIncrease, | |||
TInt & | aParagraphsIncrease | |||
) |
Format a new paragraph immediately before or after the band and add it to the formatted text. If the text starts or ends in the middle of the paragraph, complete the paragraph. Return TRUE if text was successfully added, or FALSE if there is no more text to add, or the new text would have exceeded the maximum height allowed. Place the height of the new text in aHeightIncrease. Place the increase in the number of complete paragraphs (0 or 1) in aParagraphsIncrease.
Note that this function will not necessarily add a whole paragraph to the band: if the client has restricted the amount of formatting to add by setting the relevant values in aParam, then these restrictions will be respected with the result that less than a paragraph of formatting may be generated.
This is the case, for example, when CTextLayout adds text below the band.
const TTmFormatParamBase & aParam | |
TBool aAtStart | |
TInt & aHeightIncrease | |
TInt & aParagraphsIncrease |
void | AdjustWidth | ( | const TTmFormatParamBase & | aParam, |
TInt | aWidthOfNewText | |||
) | [private] |
const TTmFormatParamBase & aParam | |
TInt aWidthOfNewText |
IMPORT_C void | Clear | ( | ) |
Reset the object to its empty state; no source or formatting, height and width of 0, start and end char both 0.
const CTmCode & | Code | ( | ) | const [inline] |
Returns a reference to the CTmCode object containing the bytecode representing the text layout.
IMPORT_C void | DeleteFormattingFromEndL | ( | const TTmFormatParamBase & | aParam, |
TInt | aMaxDeletedHeight, | |||
TInt & | aHeightDecrease | |||
) |
Delete as many lines of formatting as possible from the end of the formatted range, up to the maximum height specified in aMaxDeletedHeight. The height decrease is placed in aHeightDecrease.
const TTmFormatParamBase & aParam | |
TInt aMaxDeletedHeight | |
TInt & aHeightDecrease |
IMPORT_C TBool | DeletePar | ( | const TTmFormatParamBase & | aParam, |
TBool | aAtStart, | |||
TInt | aMaxDeletedHeight, | |||
TInt & | aHeightDecrease | |||
) |
Delete the format for the first or last paragraph if its height does not exceed aMaxDeletedHeight. Return TRUE if a paragraph was successfully deleted. Place the height of the deleted paragraph in aHeightDecrease.
const TTmFormatParamBase & aParam | |
TBool aAtStart | |
TInt aMaxDeletedHeight | |
TInt & aHeightDecrease |
IMPORT_C TBool | DocPosToLine | ( | const TTmDocPosSpec & | aDocPos, |
TTmLineInfo & | aLineInfo | |||
) | const |
Returns information (including line number and formatting information) of the line containing a given document position.
const TTmDocPosSpec & aDocPos | Position to find. |
TTmLineInfo & aLineInfo | Returns information about the line containing aDocPos if aDocPos is within the formatted text, or an undefined value if not. |
IMPORT_C TBool | DocPosToLine | ( | const TTmDocPos & | aDocPos, |
TTmLineInfo & | aLineInfo | |||
) | const |
Retrieve information about the line containing a certain document position. Put information about the line containing aDocPos in aLineInfo. Return FALSE if aDocPos is not in the formatted text. 7.0s
const TTmDocPos & aDocPos | |
TTmLineInfo & aLineInfo |
IMPORT_C void | DrawBackground | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
const TRect & | aClipRect, | |||
const TLogicalRgb & | aBackground | |||
) | const |
Draw the background, using the custom background graphics implemented by overriding MTmSource::DrawBackground if any: aTopLeft is the top-left corner of the text, aRect is the portion of the background to be drawn, and aBackground is the default background colour. This function is used by higher-level classes for drawing backgrounds outside the ordinary text area consistently with the ordinary background.
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
const TRect & aClipRect | |
const TLogicalRgb & aBackground |
IMPORT_C void | DrawLayout | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
const TRect & | aClipRect, | |||
const TLogicalRgb * | aDocBackground, | |||
TBool | aDrawParBackground | |||
) | const |
Draw the text.
CGraphicsContext & aGc | Graphics context to draw to. |
const TPoint & aTopLeft | The origin of the formatted text in the coordinates of aGc. |
const TRect & aClipRect | The clipping rectangle in the coordinates of aGc. Nowhere outside this rectangle will be drawn. |
const TLogicalRgb * aDocBackground | The default document background colour, which is used for regions not drawn by any custom background drawing routine and not covered by any text. If null, no background is drawn in these places. |
TBool aDrawParBackground | If false no default background is drawn on those areas covered by text. Custom background drawers are invoked regardless of this argument. |
IMPORT_C void | DrawLayout | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
const TRect & | aClipRect, | |||
const TLogicalRgb * | aDocBackground, | |||
TBool | aDrawParBackground, | |||
const TCursorSelection * | aHighlight, | |||
const TTmHighlightExtensions * | aHighlightExtensions | |||
) | const |
Draw the text.
CGraphicsContext & aGc | Graphics context to draw to. |
const TPoint & aTopLeft | The origin of the formatted text in the coordinates of aGc. |
const TRect & aClipRect | The clipping rectangle in the coordinates of aGc. Nowhere outside this rectangle will be drawn. |
const TLogicalRgb * aDocBackground | The default document background colour, which is used for regions not drawn by any custom background drawing routine and not covered by any text. If null, no background is drawn in these places. |
TBool aDrawParBackground | If false no default background is drawn on those areas covered by text. Custom background drawers are invoked regardless of this argument. |
const TCursorSelection * aHighlight | The current selection. If null, no selection is drawn. |
const TTmHighlightExtensions * aHighlightExtensions | If not null, the selection highlight has its edges moved by the specified number of pixels |
IMPORT_C void | DrawSection | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
TInt | aStartDocPos, | |||
TInt | aEndDocPos, | |||
const TRect & | aClipRect | |||
) | const |
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
TInt aStartDocPos | |
TInt aEndDocPos | |
const TRect & aClipRect |
IMPORT_C void | DrawSection | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
TInt | aStartDocPos, | |||
TInt | aEndDocPos, | |||
const TRect & | aClipRect, | |||
const TTmHighlightExtensions & | aHighlightExtensions, | |||
TInt | aHighlightStartDocPos, | |||
TInt | aHighlightEndDocPos | |||
) | const |
Analogous to DrawSection(CGraphicsContext&, const TPoint&, TInt, TInt, const TRect&) but with highlight extensions applied. DrawSection(CGraphicsContext&, const TPoint&, TInt, TInt, const TRect&)
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
TInt aStartDocPos | |
TInt aEndDocPos | |
const TRect & aClipRect | |
const TTmHighlightExtensions & aHighlightExtensions | |
TInt aHighlightStartDocPos | |
TInt aHighlightEndDocPos |
IMPORT_C void | ExtendFormattingDownwardsL | ( | TTmFormatParam & | aParam | ) |
TTmFormatParam & aParam | This controls how much new formatting to generate. We will generate formatting up whichever comes first of:the character position specified in TTmFormatParam::iEndCharthe height specified (in pixels) in TTmFormatParamBase::iMaxHeightthe number of lines specified in TTmFormatParamBase::iMaxLines We replace the values specified in TTmFormatParam::iStartChar and TmFormatParam::iLineInPar |
IMPORT_C TBool | FindAdjacentChunks | ( | const TTmDocPosSpec & | aPos, |
TTmChunkDescription & | aLeft, | |||
TTmChunkDescription & | aRight | |||
) | const |
Returns the chunks of text adjacent to aPos.
const TTmDocPosSpec & aPos | |
TTmChunkDescription & aLeft | Returns a description of the chunk on the left of the cursor. |
TTmChunkDescription & aRight | Returns a description of the chunk on the right. |
IMPORT_C TBool | FindDocPos | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
Finds a document position and returns information about it and the line it is in.
const TTmDocPosSpec & aDocPos | The position to find. |
TTmPosInfo2 & aPosInfo | Returns information on the found position. |
TTmLineInfo & aLineInfo | Returns information on the line containing the position found. |
IMPORT_C TBool | FindDocPos | ( | const TTmDocPos & | aDocPos, |
TTmPosInfo & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
Find a document position and return information about it and the line it is in. Return FALSE if the document position is outside the formatted text. The document position to be found is passed in aDocPos and the information about the position found is returned in aPosInfo. The line information is returned in aLineInfo. 7.0s
const TTmDocPos & aDocPos | |
TTmPosInfo & aPosInfo | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | FindDocPos | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosInfo, | |||
TTmLineInfo & | aLineInfo, | |||
TInt & | aSubscript | |||
) | const |
Finds a document position and returns information about it and the line it is in.
const TTmDocPosSpec & aDocPos | The position to find. |
TTmPosInfo2 & aPosInfo | Returns information on the found position. |
TTmLineInfo & aLineInfo | Returns information on the line containing the position found. |
TInt & aSubscript | Returns the subscript height value. |
IMPORT_C TInt | FindNextPos | ( | TInt | aStart | ) | const |
Finds the position after the horizontally spacing element after aStart. A horizontally spacing element is a spacing glyph (such as a letter or number) plus all its combining accent, or other spacing character such as a tab or carriage return. This function will also skip any zero-width characters that precede the next horizontally spacing element.
TInt aStart | Starting position. The returned position will be greater than this. |
IMPORT_C TInt | FindPreviousPos | ( | TInt | aStart | ) | const |
Finds the position before the horizontally spacing element before aStart. Zero-width characters immediately before aStart are also skipped. FindNextPos
TInt aStart | Starting position. The returned position will be greater than this. |
IMPORT_C TBool | FindXyPos | ( | const TPoint & | aXyPos, |
TTmPosInfo2 & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
Finds a document position (i.e. the edge between two adjacent characters) by x-y position relative to the top-left corner of the formatted text.
const TPoint & aXyPos | Position to find. |
TTmPosInfo2 & aPosInfo | Returns information on the position closest to aXyPos. |
TTmLineInfo & aLineInfo | Returns information on the line containing aXyPos. |
IMPORT_C TBool | FindXyPos | ( | const TPoint & | aXyPos, |
TTmPosInfo & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
Find an x-y position, relative to the top-left corner of the text, and return information about it and the line it is in. Return FALSE if the position is outside the formatted text. The document position to be found is passed in aDocPos and the information about the position found is returned in aPosInfo. The line information is returned in aLineInfo. 7.0s
const TPoint & aXyPos | |
TTmPosInfo & aPosInfo | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | FindXyPosWithDisambiguation | ( | const TPoint & | aXyPos, |
TTmPosInfo2 & | aPosLeft, | |||
TTmPosInfo2 & | aPosRight, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
Finds information about the visual position closest to the point specified. If there are two positions at this place that represent the ends of blocks that are not logically contiguous, different positions representing the ends of these blocks are returned. there is an ambiguity at this position, the document positions that represent the ends of the different blocks that meet here are returned.
const TPoint & aXyPos | The position to find. |
TTmPosInfo2 & aPosLeft | The position returned. If this position is ambiguous, this is the position attached to the block on the left. |
TTmPosInfo2 & aPosRight | The position returned. If this position is ambiguous, this is the position attached to the block on the right. If it is not ambiguous, aPosLeft == aPosRight. |
TTmLineInfo & aLineInfo | Information about the line containing aPosLeft and aPosRight. |
IMPORT_C void | FormatL | ( | const TTmFormatParamBase & | aParam, |
const TTmReformatParam & | aReformatParam, | |||
TTmReformatResult & | TTmReformatResult | |||
) |
Format part of the text that has changed and indicate whether further formatting needs to be done.
The backing text must remain constant during background formatting. What this means is that if background formatting is enabled (TTmReformatParam::iMaxExtraLines is some small number, causing formatting to end mid-way with TTmReformatResult::iUnformattedStart less than KMaxTInt), so that text can be formatted bit by bit by a higher-level object, as is done by CTextView, the backing text must not change between the series of calls to this function that make up a single reformatting act.
const TTmFormatParamBase & aParam | |
const TTmReformatParam & aReformatParam | |
TTmReformatResult & TTmReformatResult |
IMPORT_C TBool | GetCursor | ( | const TTmDocPosSpec & | aDocPos, |
TTmCursorPlacement | aPlacement, | |||
TTmLineInfo & | aLineInfo, | |||
TPoint & | aOrigin, | |||
TInt & | aWidth, | |||
TInt & | aAscent, | |||
TInt & | aDescent | |||
) | const |
Returns metrics for the cursor suitable for the document position and placement specified, as well as information about the line containing the position specified.
const TTmDocPosSpec & aDocPos | The document position to return information about. |
TTmCursorPlacement aPlacement | The shape of the cursor. |
TTmLineInfo & aLineInfo | Returns information about the line containing aDocPos if this position is within the formatted text, or an undefined value otherwise. |
TPoint & aOrigin | Returns a position to which aWidth, aAscent and aDescent is relative if the position is within formatted text. Returns an undefined value otherwise. This position will be on the baseline of the character found. |
TInt & aWidth | When aPlacement is ECursorVertical aWidth represents which side of the origin to paint the cursor, -1 paint left, +1 paint right. When aPlacement is ECursorUnderlineXXXX aWidth represents the X offset from the origin X to draw the cursor between, -ve for previous & +ve for next when text L2R (e.g. Latin), +ve for previous & -ve for next when text is R2L (e.g. Arabic) |
TInt & aAscent | Returns how far above aOrigin the cursor extends if aDocPos is within formatted text, or an undefined value otherwise. |
TInt & aDescent | Returns how far below aOrigin the cursor extends if aDocPos is within formatted text, or an undefined value otherwise. |
IMPORT_C TBool | GetCursor | ( | const TTmDocPos & | aDocPos, |
TTmCursorPlacement | aPlacement, | |||
TTmLineInfo & | aLineInfo, | |||
TPoint & | aOrigin, | |||
TInt & | aWidth, | |||
TInt & | aAscent, | |||
TInt & | aDescent | |||
) | const |
Return cursor metrics suitable for the supplied document position and placement. The cursor is defined like a character, with an origin, width, height and depth. This allows the caller to preserve the origin while overriding the other metrics. 7.0s
const TTmDocPos & aDocPos | |
TTmCursorPlacement aPlacement | |
TTmLineInfo & aLineInfo | |
TPoint & aOrigin | |
TInt & aWidth | |
TInt & aAscent | |
TInt & aDescent |
IMPORT_C TBool | GetDisplayedText | ( | TInt | aLineNumber, |
TDes & | aText, | |||
TInt & | aNeeded | |||
) | const |
Retrieve the text as displayed on a particular line. Return FALSE if the operation is impossible (e.g., because no MTmSource has yet been assigned). The text is returned in aText. The number of characters needed, which may be greater than the size of aText, is placed in aNeeded.
The text will be returned in display order, after all transformations have been applied to the backing text. These transformations include bidirectional reordering (making Arabic and Hebrew go right to left, etc.), ligation (combining adjacent characters into a single glyph), suppressing control characters, and converting characters to visible forms like visible spaces if necessary. 7.0 It can fail due to environmental conditions, and should therefore be leavable. Use GetDisplayedTextL instead.
IMPORT_C TBool | GetDisplayedTextL | ( | TInt | aLineNumber, |
TDes & | aText, | |||
TInt & | aNeeded | |||
) | const |
Retrieve the text as displayed on a particular line.
The text will be returned in display order, after all transformations have been applied to the backing text. These transformations include bidirectional reordering (making Arabic and Hebrew go right to left, etc.), ligation (combining adjacent characters into a single glyph), suppressing control characters, and converting characters to visible forms like visible spaces if necessary.
Precondition: SetTextL must have been called on this object before GetDisplayedText can be called.
Please note that any text that has passed through a shaper (for example Devanagari text) will be replaced in the returned text with the Unicode Replacement Character 0xFFFD. This is because the shaper produces glyph codes, not Unicode characters, and this is because Unicode does not contain all the ligatures and glyph variants required to display such scripts correctly.
TInt aLineNumber | The line to fetch the display text of. |
TDes & aText | A buffer into which the display text is placed. |
TInt & aNeeded | Returns the number of characters in the displayed line. The text is truncated if aText is not big enough, aNeeded returns how large the buffer would need to be to return the whole line. |
IMPORT_C void | GetMinimumLayoutSizeL | ( | TInt | aWrapWidth, |
TSize & | aSize | |||
) | const |
Get the size of the minimal bounding box of the text when formatted to the specified wrap width. The width may be greater than aWrapWidth. To find the minimum width for the text, pass 0 for aWrapWidth. To find the minimum height, pass KMaxTInt for aWrapWidth.
IMPORT_C void | GetMinimumLayoutSizeL | ( | TInt | aWrapWidth, |
TBool | aAllowLegalLineBreaksOnly, | |||
TSize & | aSize | |||
) | const |
Get the size of the minimal bounding box of the text when formatted to the specified wrap width. The width may be greater than aWrapWidth. To find the minimum width for the text, pass 0 for aWrapWidth. To find the minimum height, pass KMaxTInt for aWrapWidth. Use aAllowLegalLineBreaksOnly to set whether or not illegal line breaks should be considered when determining aSize.
IMPORT_C TBool | GetNextPosLeftWithDisambiguation | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosLeft, | |||
TTmPosInfo2 & | aPosRight | |||
) | const |
Finds information about the position visually to the left of the position specified, as long as it is on the same line. If there are two positions at this place that represent the ends of blocks that are not logically contiguous, different positions representing the ends of these blocks are returned.
const TTmDocPosSpec & aDocPos | The position to find. |
TTmPosInfo2 & aPosLeft | The position returned. If this position is ambiguous, this is the position attached to the block on the left. |
TTmPosInfo2 & aPosRight | The position returned. If this position is ambiguous, this is the position attached to the block on the right. If it is not ambiguous, aPosLeft == aPosRight. |
IMPORT_C TBool | GetNextPosRightWithDisambiguation | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosLeft, | |||
TTmPosInfo2 & | aPosRight | |||
) | const |
Finds information about the position visually to the right of the position specified, as long as it is on the same line. If there are two positions at this place that represent the ends of blocks that are not logically contiguous, different positions representing the ends of these blocks are returned.
const TTmDocPosSpec & aDocPos | The position to find. |
TTmPosInfo2 & aPosLeft | The position returned. If this position is ambiguous, this is the position attached to the block on the left. |
TTmPosInfo2 & aPosRight | The position returned. If this position is ambiguous, this is the position attached to the block on the right. If it is not ambiguous, aPosLeft == aPosRight. |
IMPORT_C TBool | GetNextVisualCursorPos | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aInfo, | |||
TBool | aToLeft | |||
) | const |
Find the nearest document position to the current one in the visual direction specified. This only works if the document position is within formatted text. False is returned if this condition is not met.
const TTmDocPosSpec & aDocPos | Start position. |
TTmPosInfo2 & aInfo | Returns the position found, or an undefined value if aDocPos is not in formatted text or is already at the end of the line in the direction being searched. |
TBool aToLeft | True if the direction to search in is leftwards. |
IMPORT_C TBool | GetNextVisualCursorPos | ( | const TTmDocPos & | aDocPos, |
TTmPosInfo & | aInfo, | |||
TBool | aToLeft | |||
) | const |
Get the next cursor position in visual order. This function is useful for text that contains Arabic, Hebrew, or other right-to-left languages because it allows the cursor to be moved right or left on the display whatever the order of the backing text.
The cursor position to the left or right of aDocPos is found, depending on the value of aToLeft. Information about the resulting position is returned in aInfo. The function returns TRUE if successful, FALSE if not. A FALSE return value means that there is no text, or aDocPos is outside the formatted text, or aDocPos cannot move in the required direction because it is at the end of the line. 7.0s
const TTmDocPos & aDocPos | |
TTmPosInfo & aInfo | |
TBool aToLeft |
IMPORT_C void | GetUpdateBoundingRect | ( | TInt | aStartDocPos, |
TInt | aEndDocPos, | |||
const TPoint & | aTopLeft, | |||
TRect & | aBoundingRect | |||
) | const |
Calculate the bounding rectangle of the region that must be redrawn to redraw the given document section.
TInt aStartDocPos | The section starting position |
TInt aEndDocPos | The section ending position |
const TPoint & aTopLeft | Textview position in graphics context coordinates. The resulting region can be used to clip the drawing in that graphics context. |
TRect & aBoundingRect | The resulting bounding rectangle, that is the smallest rectangle that should be redrawn to redraw the specified document section. |
IMPORT_C void | HighlightSection | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
TInt | aStartDocPos, | |||
TInt | aEndDocPos, | |||
const TRect & | aClipRect | |||
) | const |
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
TInt aStartDocPos | |
TInt aEndDocPos | |
const TRect & aClipRect |
IMPORT_C void | HighlightSection | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
TInt | aStartDocPos, | |||
TInt | aEndDocPos, | |||
const TRect & | aClipRect, | |||
const TTmHighlightExtensions & | aHighlightExtensions, | |||
TInt | aHighlightStartDocPos, | |||
TInt | aHighlightEndDocPos | |||
) | const |
Analogous to HighlightSection(CGraphicsContext&, const TPoint&, TInt, TInt, const TRect&) but with highlight extensions applied. HighlightSecion(CGraphicsContext&, const TPoint&, TInt, TInt, const TRect&)
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
TInt aStartDocPos | |
TInt aEndDocPos | |
const TRect & aClipRect | |
const TTmHighlightExtensions & aHighlightExtensions | |
TInt aHighlightStartDocPos | |
TInt aHighlightEndDocPos |
IMPORT_C void | HorizontalExtremes | ( | TInt & | aLeft, |
TInt & | aRight, | |||
TInt | aTopY = 0, | |||
TInt | aBottomY = KMaxTInt | |||
) | const |
IMPORT_C void | InvertLayout | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
TInt | aStartDocPos, | |||
TInt | aEndDocPos | |||
) | const |
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
TInt aStartDocPos | |
TInt aEndDocPos |
IMPORT_C void | InvertLayout | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
TInt | aStartDocPos, | |||
TInt | aEndDocPos, | |||
const TTmHighlightExtensions & | aHighlightExtensions, | |||
TInt | aHighlightStartDocPos, | |||
TInt | aHighlightEndDocPos | |||
) | const |
Analogous to InvertLayout(CGraphicsContext, const TPoint&, TInt, TInt) but with highlight extensions applied. InvertLayout(CGraphicsContext, const TPoint&, TInt, TInt)
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
TInt aStartDocPos | |
TInt aEndDocPos | |
const TTmHighlightExtensions & aHighlightExtensions | |
TInt aHighlightStartDocPos | |
TInt aHighlightEndDocPos |
TInt | LayoutHeight | ( | ) | const [inline] |
Returns the height in pixels of the formatted text.
TInt | LayoutWidth | ( | ) | const [inline] |
Return the width in pixels of the formatted text, not including paragraph labels if present.
IMPORT_C TBool | LineExtreme | ( | const TTmDocPosSpec & | aPos, |
TBool | aToRight, | |||
TTmDocPos & | aExtreme | |||
) | const |
Returns the position at the left or right extreme of the line containing aPos.
const TTmDocPosSpec & aPos | |
TBool aToRight | EFalse for finding the left hand end, ETrue for the right. |
TTmDocPos & aExtreme | Returns the document position at the end requested. |
IMPORT_C TBool | LineNumberToLine | ( | TInt | aLineNumber, |
TTmLineInfo & | aLineInfo | |||
) | const |
Retrieve information about a line, referring to the line by its line number.
Put information about the line numbered aLineNumber, counting the first formatted line as 0, in aLineInfo. Return FALSE if aLineNumber is not formatted.
TInt aLineNumber | |
TTmLineInfo & aLineInfo |
IMPORT_C void | MakeVisible | ( | TBool | aVisible | ) |
Stops or allows text to be drawn. Included to allow users to control visibility if text is part of an invisible control.
TBool aVisible |
IMPORT_C TInt | MemoryUsed | ( | ) | const |
Return the amount of memory used by a CTmTextLayout object, The amount returned is in bytes. The amount returned does not include memory used by non-owned objects.
IMPORT_C TBool | ParNumberToLine | ( | TInt | aParNumber, |
TInt | aLineInPar, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
Retrieve information about a line, referring to the line by its paragraph number and line number within the paragraph.
Put information about line aLineNumber in paragraph aParNumber, counting the first formatted paragraph as 0, in aLineInfo. Return FALSE if aParNumber is not formatted. If aLineInPar is greater than the number of lines in the paragraph the last line in the paragraph is returned.
TInt aParNumber | |
TInt aLineInPar | |
TTmLineInfo & aLineInfo |
void | SetCurrentContextChar | ( | TUint | aContextChar | ) |
TUint aContextChar |
IMPORT_C void | SetTextL | ( | MTmSource & | aSource, |
const TTmFormatParam & | aParam | |||
) |
Set the text, discarding any existing layout information. The text from aParam.iStartChar to aParam.iEndChar is extracted from aSource and formatted.
MTmSource & aSource | |
const TTmFormatParam & aParam |
MTmSource * | Source | ( | ) | [inline] |
Returns a pointer to to the MTmSource object, if any, that provides text and formatting to this object. Returns null if no source object has been set.
IMPORT_C TInt | WidthOfWidestLine | ( | TInt | aTop = 0, |
TInt | aBottom = KMaxTInt | |||
) | const |
Find the width of the widest line in the specified vertical range. The width is the 'inner width'; that of the text itself not including indents or margins.
IMPORT_C TBool | YPosToLine | ( | TInt | aYPos, |
TTmLineInfo & | aLineInfo | |||
) | const |
Retrieve information about a line containing a certain y coordinate.
Put information about the line containing the y coordinate aYPos, relative to 0 as the top of the formatted text, in aLineInfo. Return FALSE if aYPos is outside all formatted lines.
TInt aYPos | |
TTmLineInfo & aLineInfo |
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.