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 TBool | AddParL | ( | const TTmFormatParamBase & | aParam, |
TBool | aAtStart, | |||
TInt & | aHeightIncrease, | |||
TInt & | aParagraphsIncrease | |||
) |
const TTmFormatParamBase & aParam | |
TBool aAtStart | |
TInt & aHeightIncrease | |
TInt & aParagraphsIncrease |
void | AdjustWidth | ( | const TTmFormatParamBase & | aParam, |
TInt | aWidthOfNewText | |||
) | [private] |
const TTmFormatParamBase & aParam | |
TInt aWidthOfNewText |
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 | |||
) |
const TTmFormatParamBase & aParam | |
TInt aMaxDeletedHeight | |
TInt & aHeightDecrease |
IMPORT_C TBool | DeletePar | ( | const TTmFormatParamBase & | aParam, |
TBool | aAtStart, | |||
TInt | aMaxDeletedHeight, | |||
TInt & | aHeightDecrease | |||
) |
const TTmFormatParamBase & aParam | |
TBool aAtStart | |
TInt aMaxDeletedHeight | |
TInt & aHeightDecrease |
IMPORT_C TBool | DocPosToLine | ( | const TTmDocPosSpec & | aDocPos, |
TTmLineInfo & | aLineInfo | |||
) | const |
const TTmDocPosSpec & aDocPos | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | DocPosToLine | ( | const TTmDocPos & | aDocPos, |
TTmLineInfo & | aLineInfo | |||
) | const |
const TTmDocPos & aDocPos | |
TTmLineInfo & aLineInfo |
IMPORT_C void | DrawBackground | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
const TRect & | aClipRect, | |||
const TLogicalRgb & | aBackground | |||
) | const |
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 |
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
const TRect & aClipRect | |
const TLogicalRgb * aDocBackground | |
TBool aDrawParBackground |
IMPORT_C void | DrawLayout | ( | CGraphicsContext & | aGc, |
const TPoint & | aTopLeft, | |||
const TRect & | aClipRect, | |||
const TLogicalRgb * | aDocBackground, | |||
TBool | aDrawParBackground, | |||
const TCursorSelection * | aHighlight, | |||
const TTmHighlightExtensions * | aHighlightExtensions | |||
) | const |
CGraphicsContext & aGc | |
const TPoint & aTopLeft | |
const TRect & aClipRect | |
const TLogicalRgb * aDocBackground | |
TBool aDrawParBackground | |
const TCursorSelection * aHighlight | |
const TTmHighlightExtensions * aHighlightExtensions |
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 |
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 |
IMPORT_C TBool | FindAdjacentChunks | ( | const TTmDocPosSpec & | aPos, |
TTmChunkDescription & | aLeft, | |||
TTmChunkDescription & | aRight | |||
) | const |
const TTmDocPosSpec & aPos | |
TTmChunkDescription & aLeft | |
TTmChunkDescription & aRight |
IMPORT_C TBool | FindDocPos | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
const TTmDocPosSpec & aDocPos | |
TTmPosInfo2 & aPosInfo | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | FindDocPos | ( | const TTmDocPos & | aDocPos, |
TTmPosInfo & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
const TTmDocPos & aDocPos | |
TTmPosInfo & aPosInfo | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | FindDocPos | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosInfo, | |||
TTmLineInfo & | aLineInfo, | |||
TInt & | aSubscript | |||
) | const |
const TTmDocPosSpec & aDocPos | |
TTmPosInfo2 & aPosInfo | |
TTmLineInfo & aLineInfo | |
TInt & aSubscript |
IMPORT_C TBool | FindXyPos | ( | const TPoint & | aXyPos, |
TTmPosInfo2 & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
const TPoint & aXyPos | |
TTmPosInfo2 & aPosInfo | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | FindXyPos | ( | const TPoint & | aXyPos, |
TTmPosInfo & | aPosInfo, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
const TPoint & aXyPos | |
TTmPosInfo & aPosInfo | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | FindXyPosWithDisambiguation | ( | const TPoint & | aXyPos, |
TTmPosInfo2 & | aPosLeft, | |||
TTmPosInfo2 & | aPosRight, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
const TPoint & aXyPos | |
TTmPosInfo2 & aPosLeft | |
TTmPosInfo2 & aPosRight | |
TTmLineInfo & aLineInfo |
IMPORT_C void | FormatL | ( | const TTmFormatParamBase & | aParam, |
const TTmReformatParam & | aReformatParam, | |||
TTmReformatResult & | TTmReformatResult | |||
) |
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 |
const TTmDocPosSpec & aDocPos | |
TTmCursorPlacement aPlacement | |
TTmLineInfo & aLineInfo | |
TPoint & aOrigin | |
TInt & aWidth | |
TInt & aAscent | |
TInt & aDescent |
IMPORT_C TBool | GetCursor | ( | const TTmDocPos & | aDocPos, |
TTmCursorPlacement | aPlacement, | |||
TTmLineInfo & | aLineInfo, | |||
TPoint & | aOrigin, | |||
TInt & | aWidth, | |||
TInt & | aAscent, | |||
TInt & | aDescent | |||
) | const |
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 |
IMPORT_C TBool | GetDisplayedTextL | ( | TInt | aLineNumber, |
TDes & | aText, | |||
TInt & | aNeeded | |||
) | const |
IMPORT_C void | GetMinimumLayoutSizeL | ( | TInt | aWrapWidth, |
TSize & | aSize | |||
) | const |
IMPORT_C void | GetMinimumLayoutSizeL | ( | TInt | aWrapWidth, |
TBool | aAllowLegalLineBreaksOnly, | |||
TSize & | aSize | |||
) | const |
IMPORT_C TBool | GetNextPosLeftWithDisambiguation | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosLeft, | |||
TTmPosInfo2 & | aPosRight | |||
) | const |
const TTmDocPosSpec & aDocPos | |
TTmPosInfo2 & aPosLeft | |
TTmPosInfo2 & aPosRight |
IMPORT_C TBool | GetNextPosRightWithDisambiguation | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aPosLeft, | |||
TTmPosInfo2 & | aPosRight | |||
) | const |
const TTmDocPosSpec & aDocPos | |
TTmPosInfo2 & aPosLeft | |
TTmPosInfo2 & aPosRight |
IMPORT_C TBool | GetNextVisualCursorPos | ( | const TTmDocPosSpec & | aDocPos, |
TTmPosInfo2 & | aInfo, | |||
TBool | aToLeft | |||
) | const |
const TTmDocPosSpec & aDocPos | |
TTmPosInfo2 & aInfo | |
TBool aToLeft |
IMPORT_C TBool | GetNextVisualCursorPos | ( | const TTmDocPos & | aDocPos, |
TTmPosInfo & | aInfo, | |||
TBool | aToLeft | |||
) | const |
const TTmDocPos & aDocPos | |
TTmPosInfo & aInfo | |
TBool aToLeft |
IMPORT_C void | GetUpdateBoundingRect | ( | TInt | aStartDocPos, |
TInt | aEndDocPos, | |||
const TPoint & | aTopLeft, | |||
TRect & | aBoundingRect | |||
) | const |
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 |
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 |
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 |
const TTmDocPosSpec & aPos | |
TBool aToRight | |
TTmDocPos & aExtreme |
IMPORT_C TBool | LineNumberToLine | ( | TInt | aLineNumber, |
TTmLineInfo & | aLineInfo | |||
) | const |
TInt aLineNumber | |
TTmLineInfo & aLineInfo |
IMPORT_C TBool | ParNumberToLine | ( | TInt | aParNumber, |
TInt | aLineInPar, | |||
TTmLineInfo & | aLineInfo | |||
) | const |
TInt aParNumber | |
TInt aLineInPar | |
TTmLineInfo & aLineInfo |
void | SetCurrentContextChar | ( | TUint | aContextChar | ) |
TUint aContextChar |
IMPORT_C void | SetTextL | ( | MTmSource & | aSource, |
const TTmFormatParam & | aParam | |||
) |
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 |
IMPORT_C TBool | YPosToLine | ( | TInt | aYPos, |
TTmLineInfo & | aLineInfo | |||
) | const |
TInt aYPos | |
TTmLineInfo & aLineInfo |