MTmTextLayoutForwarder Class Reference

class MTmTextLayoutForwarder

A mixin class to make it easy for higher-level classes that own a CTmTextLayout object to have enquiry functions without it being necessary to implement them all as forwarding functions. The owner class just implements TextLayout and overrides GetOrigin if necessary.

Non-const CTmTextLayout functions like Clear are not included because allowing them to be called on owner classes would probably put the owner class into an inconsistent state.

The word Layout is prefixed, suffixed or infixed to functions with names that would usually conflict with owner class names. For example, we have DrawLayout, not Draw, and GetMinimumLayoutSizeL, not GetMinimumSizeL.

The class should only be used internally by FORM component.

Public Member Functions
IMPORT_C TBoolDocPosToLine(const TTmDocPosSpec &, TTmLineInfo &)
IMPORT_C TBoolDocPosToLine(const TTmDocPos &, TTmLineInfo &)
IMPORT_C voidDrawBackground(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb &)
IMPORT_C voidDrawLayout(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb *, TBool)
IMPORT_C TIntEndChar()
IMPORT_C TBoolFindDocPos(const TTmDocPosSpec &, TTmPosInfo2 &, TTmLineInfo &)
IMPORT_C TBoolFindDocPos(const TTmDocPos &, TTmPosInfo &, TTmLineInfo &)
IMPORT_C TBoolFindXyPos(const TPoint &, TTmPosInfo2 &, TTmLineInfo &)
IMPORT_C TBoolFindXyPos(const TPoint &, TTmPosInfo &, TTmLineInfo &)
IMPORT_C TBoolFindXyPosWithDisambiguation(const TPoint &, TTmPosInfo2 &, TTmPosInfo2 &, TTmLineInfo &)
IMPORT_C TBoolGetCursor(const TTmDocPosSpec &, TTmCursorPlacement, TTmLineInfo &, TPoint &, TInt &, TInt &, TInt &)
IMPORT_C TBoolGetCursor(const TTmDocPos &, TTmCursorPlacement, TTmLineInfo &, TPoint &, TInt &, TInt &, TInt &)
IMPORT_C TBoolGetDisplayedText(TInt, TDes &, TInt &)
IMPORT_C voidGetMinimumLayoutSizeL(TInt, TSize &)
IMPORT_C voidGetMinimumLayoutSizeL(TInt, TBool, TSize &)
IMPORT_C TBoolGetNextPosLeftWithDisambiguation(const TTmDocPosSpec &, TTmPosInfo2 &, TTmPosInfo2 &)
IMPORT_C TBoolGetNextPosRightWithDisambiguation(const TTmDocPosSpec &, TTmPosInfo2 &, TTmPosInfo2 &)
IMPORT_C TBoolGetNextVisualCursorPos(const TTmDocPosSpec &, TTmPosInfo2 &, TBool)
IMPORT_C TBoolGetNextVisualCursorPos(const TTmDocPos &, TTmPosInfo &, TBool)
IMPORT_C voidHorizontalExtremes(TInt &, TInt &, TInt, TInt)
IMPORT_C voidInvertLayout(CGraphicsContext &, const TPoint &, TInt, TInt)
IMPORT_C TIntLayoutHeight()
IMPORT_C TIntLayoutWidth()
IMPORT_C TBoolLineNumberToLine(TInt, TTmLineInfo &)
IMPORT_C TIntLines()
IMPORT_C TBoolParNumberToLine(TInt, TInt, TTmLineInfo &)
IMPORT_C TIntParagraphs()
IMPORT_C TIntStartChar()
IMPORT_C TIntWidthOfWidestLine(TInt, TInt)
IMPORT_C TBoolYPosToLine(TInt, TTmLineInfo &)
Private Member Functions
voidFixUpLineInfo(TTmLineInfo &, const TPoint *)
IMPORT_C voidGetOrigin(TPoint &)
const CTmTextLayout &TextLayout()

Member Functions Documentation

DocPosToLine(const TTmDocPosSpec &, TTmLineInfo &)

IMPORT_C TBoolDocPosToLine(const TTmDocPosSpec &aDocPos,
TTmLineInfo &aLineInfo
)const

Parameters

const TTmDocPosSpec & aDocPos
TTmLineInfo & aLineInfo

DocPosToLine(const TTmDocPos &, TTmLineInfo &)

IMPORT_C TBoolDocPosToLine(const TTmDocPos &aDocPos,
TTmLineInfo &aLineInfo
)const

Parameters

const TTmDocPos & aDocPos
TTmLineInfo & aLineInfo

DrawBackground(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb &)

IMPORT_C voidDrawBackground(CGraphicsContext &aGc,
const TPoint &aTopLeft,
const TRect &aClipRect,
const TLogicalRgb &aBackground
)const

Parameters

CGraphicsContext & aGc
const TPoint & aTopLeft
const TRect & aClipRect
const TLogicalRgb & aBackground

DrawLayout(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb *, TBool)

IMPORT_C voidDrawLayout(CGraphicsContext &aGc,
const TPoint &aTopLeft,
const TRect &aClipRect,
const TLogicalRgb *aDocBackground,
TBoolaDrawParBackground
)const

Parameters

CGraphicsContext & aGc
const TPoint & aTopLeft
const TRect & aClipRect
const TLogicalRgb * aDocBackground
TBool aDrawParBackground

EndChar()

IMPORT_C TIntEndChar()const

FindDocPos(const TTmDocPosSpec &, TTmPosInfo2 &, TTmLineInfo &)

IMPORT_C TBoolFindDocPos(const TTmDocPosSpec &aDocPos,
TTmPosInfo2 &aPosInfo,
TTmLineInfo &aLineInfo
)const

Parameters

const TTmDocPosSpec & aDocPos
TTmPosInfo2 & aPosInfo
TTmLineInfo & aLineInfo

FindDocPos(const TTmDocPos &, TTmPosInfo &, TTmLineInfo &)

IMPORT_C TBoolFindDocPos(const TTmDocPos &aDocPos,
TTmPosInfo &aPosInfo,
TTmLineInfo &aLineInfo
)const

Parameters

const TTmDocPos & aDocPos
TTmPosInfo & aPosInfo
TTmLineInfo & aLineInfo

FindXyPos(const TPoint &, TTmPosInfo2 &, TTmLineInfo &)

IMPORT_C TBoolFindXyPos(const TPoint &aXyPos,
TTmPosInfo2 &aPosInfo,
TTmLineInfo &aLineInfo
)const

Parameters

const TPoint & aXyPos
TTmPosInfo2 & aPosInfo
TTmLineInfo & aLineInfo

FindXyPos(const TPoint &, TTmPosInfo &, TTmLineInfo &)

IMPORT_C TBoolFindXyPos(const TPoint &aXyPos,
TTmPosInfo &aPosInfo,
TTmLineInfo &aLineInfo
)const

Parameters

const TPoint & aXyPos
TTmPosInfo & aPosInfo
TTmLineInfo & aLineInfo

FindXyPosWithDisambiguation(const TPoint &, TTmPosInfo2 &, TTmPosInfo2 &, TTmLineInfo &)

IMPORT_C TBoolFindXyPosWithDisambiguation(const TPoint &aXyPos,
TTmPosInfo2 &aPosLeft,
TTmPosInfo2 &aPosRight,
TTmLineInfo &aLineInfo
)const

Parameters

const TPoint & aXyPos
TTmPosInfo2 & aPosLeft
TTmPosInfo2 & aPosRight
TTmLineInfo & aLineInfo

FixUpLineInfo(TTmLineInfo &, const TPoint *)

voidFixUpLineInfo(TTmLineInfo &aInfo,
const TPoint *aOrigin = NULL
)const [private]

Parameters

TTmLineInfo & aInfo
const TPoint * aOrigin = NULL

GetCursor(const TTmDocPosSpec &, TTmCursorPlacement, TTmLineInfo &, TPoint &, TInt &, TInt &, TInt &)

IMPORT_C TBoolGetCursor(const TTmDocPosSpec &aDocPos,
TTmCursorPlacementaPlacement,
TTmLineInfo &aLineInfo,
TPoint &aOrigin,
TInt &aWidth,
TInt &aAscent,
TInt &aDescent
)const

Parameters

const TTmDocPosSpec & aDocPos
TTmCursorPlacement aPlacement
TTmLineInfo & aLineInfo
TPoint & aOrigin
TInt & aWidth
TInt & aAscent
TInt & aDescent

GetCursor(const TTmDocPos &, TTmCursorPlacement, TTmLineInfo &, TPoint &, TInt &, TInt &, TInt &)

IMPORT_C TBoolGetCursor(const TTmDocPos &aDocPos,
TTmCursorPlacementaPlacement,
TTmLineInfo &aLineInfo,
TPoint &aOrigin,
TInt &aWidth,
TInt &aAscent,
TInt &aDescent
)const

Parameters

const TTmDocPos & aDocPos
TTmCursorPlacement aPlacement
TTmLineInfo & aLineInfo
TPoint & aOrigin
TInt & aWidth
TInt & aAscent
TInt & aDescent

GetDisplayedText(TInt, TDes &, TInt &)

IMPORT_C TBoolGetDisplayedText(TIntaLineNumber,
TDes &aText,
TInt &aNeeded
)const

Parameters

TInt aLineNumber
TDes & aText
TInt & aNeeded

GetMinimumLayoutSizeL(TInt, TSize &)

IMPORT_C voidGetMinimumLayoutSizeL(TIntaWrapWidth,
TSize &aSize
)const

Parameters

TInt aWrapWidth
TSize & aSize

GetMinimumLayoutSizeL(TInt, TBool, TSize &)

IMPORT_C voidGetMinimumLayoutSizeL(TIntaWrapWidth,
TBoolaAllowLegalLineBreaksOnly,
TSize &aSize
)const

Parameters

TInt aWrapWidth
TBool aAllowLegalLineBreaksOnly
TSize & aSize

GetNextPosLeftWithDisambiguation(const TTmDocPosSpec &, TTmPosInfo2 &, TTmPosInfo2 &)

IMPORT_C TBoolGetNextPosLeftWithDisambiguation(const TTmDocPosSpec &aDocPos,
TTmPosInfo2 &aPosLeft,
TTmPosInfo2 &aPosRight
)const

Parameters

const TTmDocPosSpec & aDocPos
TTmPosInfo2 & aPosLeft
TTmPosInfo2 & aPosRight

GetNextPosRightWithDisambiguation(const TTmDocPosSpec &, TTmPosInfo2 &, TTmPosInfo2 &)

IMPORT_C TBoolGetNextPosRightWithDisambiguation(const TTmDocPosSpec &aDocPos,
TTmPosInfo2 &aPosLeft,
TTmPosInfo2 &aPosRight
)const

Parameters

const TTmDocPosSpec & aDocPos
TTmPosInfo2 & aPosLeft
TTmPosInfo2 & aPosRight

GetNextVisualCursorPos(const TTmDocPosSpec &, TTmPosInfo2 &, TBool)

IMPORT_C TBoolGetNextVisualCursorPos(const TTmDocPosSpec &aDocPos,
TTmPosInfo2 &aInfo,
TBoolaToLeft
)const

Parameters

const TTmDocPosSpec & aDocPos
TTmPosInfo2 & aInfo
TBool aToLeft

GetNextVisualCursorPos(const TTmDocPos &, TTmPosInfo &, TBool)

IMPORT_C TBoolGetNextVisualCursorPos(const TTmDocPos &aDocPos,
TTmPosInfo &aInfo,
TBoolaToLeft
)const

Parameters

const TTmDocPos & aDocPos
TTmPosInfo & aInfo
TBool aToLeft

GetOrigin(TPoint &)

IMPORT_C voidGetOrigin(TPoint &aPoint)const [private, virtual]

The origin is subtracted from coordinates passed in and added to those passed out.

Parameters

TPoint & aPoint

HorizontalExtremes(TInt &, TInt &, TInt, TInt)

IMPORT_C voidHorizontalExtremes(TInt &aLeft,
TInt &aRight,
TIntaTopY = 0,
TIntaBottomY =  KMaxTInt
)const

Parameters

TInt & aLeft
TInt & aRight
TInt aTopY = 0
TInt aBottomY =  KMaxTInt

InvertLayout(CGraphicsContext &, const TPoint &, TInt, TInt)

IMPORT_C voidInvertLayout(CGraphicsContext &aGc,
const TPoint &aTopLeft,
TIntaStartDocPos,
TIntaEndDocPos
)

Parameters

CGraphicsContext & aGc
const TPoint & aTopLeft
TInt aStartDocPos
TInt aEndDocPos

LayoutHeight()

IMPORT_C TIntLayoutHeight()const

LayoutWidth()

IMPORT_C TIntLayoutWidth()const

LineNumberToLine(TInt, TTmLineInfo &)

IMPORT_C TBoolLineNumberToLine(TIntaLineNumber,
TTmLineInfo &aLineInfo
)const

Parameters

TInt aLineNumber
TTmLineInfo & aLineInfo

Lines()

IMPORT_C TIntLines()const

ParNumberToLine(TInt, TInt, TTmLineInfo &)

IMPORT_C TBoolParNumberToLine(TIntaParNumber,
TIntaLineInPar,
TTmLineInfo &aLineInfo
)const

Parameters

TInt aParNumber
TInt aLineInPar
TTmLineInfo & aLineInfo

Paragraphs()

IMPORT_C TIntParagraphs()const

StartChar()

IMPORT_C TIntStartChar()const

TextLayout()

const CTmTextLayout &TextLayout()const [private, pure virtual]

Returns a reference to the CTmTextLayoutObject this MTmTextLayoutForwarder forwards inquiries to.

WidthOfWidestLine(TInt, TInt)

IMPORT_C TIntWidthOfWidestLine(TIntaTop = 0,
TIntaBottom =  KMaxTInt
)const

Parameters

TInt aTop = 0
TInt aBottom =  KMaxTInt

YPosToLine(TInt, TTmLineInfo &)

IMPORT_C TBoolYPosToLine(TIntaYPos,
TTmLineInfo &aLineInfo
)const

Parameters

TInt aYPos
TTmLineInfo & aLineInfo