CTextLayout Class Reference

class CTextLayout : public CBase

Text layout.

CTextLayout is the lowest-level text formatting class in the Text Views API. It obtains text and formatting attributes via the MLayDoc interface class and formats the text to a certain width.

It has functions for drawing the text and performing hit-detection that is, converting x-y coordinates to document positions, and vice versa. It defines many public functions that are not generally useful, but are called by the higher-level CTextView class, or exist only for the convenience of closely associated classes like the printing and pagination systems. These are identified in the documentation by the text "not generally useful".

When using the CTextLayout class, you must be aware of what functions have previously been called. For example:

1) Formatting and scrolling functions must not be called if a CTextView object owns the CTextLayout object, because the CTextView object may be reformatting the CTextLayout object asynchronously by means of an active object, or may hold some state information about the CTextLayout object that would be invalidated by reformatting. These functions are identified in the documentation by the text "Do not use if a CTextView object owns this CTextLayout object.".

2) Functions that raise out of memory exceptions can leave the object in an inconsistent state; these functions can be identified as usual by their trailing L. When this occurs, it is necessary to discard the formatting information by calling DiscardFormat().

3) Some functions change formatting parameters like the wrap width or band height, but do not reformat to reflect the change. These functions are identified in the documentation by the text "Reformat needed".

Inherits from

Public Member Functions
~CTextLayout()
IMPORT_C voidAdjustVerticalAlignment(CParaFormat::TAlignment)
IMPORT_C TIntBandHeight()
voidBeginRedraw(const TRect &)
TBool BeginRedrawCalled()
TBool CalculateHorizontalExtremes(TInt &, TInt &, TBool)
IMPORT_C TBoolCalculateHorizontalExtremesL(TInt &, TInt &, TBool, TBool)
IMPORT_C TIntChangeBandTopL(TInt &, TAllowDisallow)
IMPORT_C voidChangeBandTopNoLimitBorderL(TInt)
IMPORT_C const MFormCustomDraw *CustomDraw()
IMPORT_C const MFormCustomWrap *CustomWrap()
IMPORT_C voidDiscardFormat()
IMPORT_C TBoolDocPosToXyPosL(TInt, TPoint &, TUint)
IMPORT_C TIntDocumentLength()
voidDrawBackground(CGraphicsContext &, const TPoint &, const TRect &, const TLogicalRgb &)
IMPORT_C voidDrawBorders(const MGraphicsDeviceMap *, CGraphicsContext &, const TRect &, const TParaBorderArray &, const TRgb *, TRegion *, const TRect *)
IMPORT_C voidDrawL(const TRect &, const TDrawTextLayoutContext *, const TCursorSelection *)
voidEndRedraw()
IMPORT_C TBoolExcludingPartialLines()
IMPORT_C voidExtendFormattingToCoverPosL(TInt)
IMPORT_C voidExtendFormattingToCoverYL(TInt)
IMPORT_C TBoolFindDocPos(const TTmDocPosSpec &, TTmPosInfo2 &, TTmLineInfo *)
IMPORT_C TBoolFindXyPos(const TPoint &, TTmPosInfo2 &, TTmLineInfo *)
IMPORT_C TIntFirstCharOnLine(TInt)
IMPORT_C TIntFirstDocPosFullyInBand()
IMPORT_C TIntFirstFormattedPos()
IMPORT_C TIntFirstLineInBand()
IMPORT_C TIntFontHeightIncreaseFactor()
IMPORT_C voidForceNoWrapping(TBool)
IMPORT_C voidFormatBandL()
IMPORT_C voidFormatCharRangeL(TInt, TInt)
voidFormatCharRangeL(TInt, TInt, TInt)
IMPORT_C TBoolFormatLineL(CParaFormat *, TInt &, TInt &, TBool &)
IMPORT_C TBoolFormatNextLineL(TInt &)
IMPORT_C TIntFormattedHeightInPixels()
IMPORT_C TIntFormattedLength()
IMPORT_C voidGetCharacterHeightAndAscentL(TInt, TInt &, TInt &)
TBool GetCursor(const TTmDocPos &, TTmCursorPlacement, TRect &, TPoint &, TInt &, TInt &, TInt &)
IMPORT_C MFormCustomInvisibleCharacterRemapper *GetCustomInvisibleCharacterRemapper()
IMPORT_C voidGetFontHeightAndAscentL(const TFontSpec &, TInt &, TInt &)
voidGetHighlightRemnants(const TRect &, const TDrawTextLayoutContext &, TRect *)
IMPORT_C TIntGetLineNumber(TInt)
IMPORT_C TIntGetLineRect(TInt, TRect &)
IMPORT_C TRectGetLineRectL(TInt, TInt)
IMPORT_C voidGetMinimumSizeL(TInt, TSize &)
IMPORT_C voidGetMinimumSizeL(TInt, TBool, TSize &)
IMPORT_C TBoolGetNextVisualCursorPos(const TTmDocPosSpec &, TTmPosInfo2 &, TBool)
voidGetOrigin(TPoint &)
voidGetParagraphRect(const TTmDocPos &, TRect &)
IMPORT_C voidHandleAdditionalCharactersAtEndL(TInt &, TInt &)
IMPORT_C voidHandleBlockChangeL(TCursorSelection, TInt, TViewRectChanges &, TBool)
IMPORT_C TBoolHandleCharEditL(TUint, TInt &, TInt &, TInt &, TInt &, TInt &, TBool)
IMPORT_C voidHighlight(const TRangeChange &, const TRect &, const TDrawTextLayoutContext *)
const TTmHighlightExtensions &HighlightExtensions()
voidHighlightUsingExtensions(const CTextLayout::TRangeChange &, const TRangeChange &, const TRect &, const TDrawTextLayoutContext *)
IMPORT_C voidInvertRangeL(const TCursorSelection &, const TRect &, const TDrawTextLayoutContext *)
IMPORT_C TBoolIsBackgroundFormatting()
IMPORT_C TBoolIsFormattingBand()
IMPORT_C TBoolIsWrapping()
IMPORT_C TIntMajorVersion()
IMPORT_C voidMakeVisible(TBool)
IMPORT_C TIntMinimumLineDescent()
IMPORT_C CTextLayout *NewL(MLayDoc *, TInt)
IMPORT_C TNonPrintingCharVisibilityNonPrintingCharsVisibility()
IMPORT_C voidNotifyTerminateBackgroundFormatting()
IMPORT_C TIntNumFormattedLines()
IMPORT_C voidPageDownL(TInt &, TInt &)
IMPORT_C voidPageUpL(TInt &, TInt &)
voidPanic(TPanicNumber)
IMPORT_C TIntParagraphHeight(TInt)
IMPORT_C TRectParagraphRectL(TInt)
TInt PictureRectangleAndPosL(const TPoint &, TRect &, TBool *)
IMPORT_C TBoolPictureRectangleL(TInt, TRect &, TBool *)
IMPORT_C TBoolPictureRectangleL(const TPoint &, TRect &, TBool *)
IMPORT_C TIntPixelsAboveBand()
IMPORT_C TBoolPosInBand(const TTmDocPos &, TTmLineInfo *)
IMPORT_C TBoolPosInBand(TTmDocPos, TPoint &)
IMPORT_C TBoolPosInBand(TInt, TPoint &)
IMPORT_C TBoolPosIsFormatted(TInt)
IMPORT_C TIntPosRangeInBand(TInt &)
IMPORT_C voidReformatVerticalSpaceL()
voidResetExternalDraw()
voidRestrictScrollToTopsOfLines(TBool)
TInt ScrollDocPosIntoViewL(const TTmDocPos &)
IMPORT_C TIntScrollLinesL(TInt &, TAllowDisallow)
IMPORT_C TIntScrollParagraphsL(TInt &, TAllowDisallow)
IMPORT_C voidSetAmountToFormat(TAmountFormatted)
IMPORT_C voidSetBandHeight(TInt)
IMPORT_C voidSetCustomDraw(const MFormCustomDraw *)
IMPORT_C voidSetCustomInvisibleCharacterRemapper(MFormCustomInvisibleCharacterRemapper *)
IMPORT_C voidSetCustomWrap(const MFormCustomWrap *)
voidSetExcessHeightRequired(TInt)
IMPORT_C voidSetExcludePartialLines(TBool)
voidSetExternalDraw(const TRect &)
IMPORT_C voidSetFontHeightIncreaseFactor(TInt)
IMPORT_C voidSetFormatMode(CLayoutData::TFormatMode, TInt, MGraphicsDeviceMap *)
IMPORT_C voidSetHighlightExtensions(TInt, TInt, TInt, TInt)
IMPORT_C voidSetImageDeviceMap(MGraphicsDeviceMap *)
IMPORT_C voidSetInterfaceProvider(MFormCustomInterfaceProvider *)
IMPORT_C voidSetLabelsDeviceMap(MGraphicsDeviceMap *)
IMPORT_C voidSetLabelsMarginWidth(TInt)
IMPORT_C voidSetLayDoc(MLayDoc *)
IMPORT_C voidSetMinimumLineDescent(TInt)
IMPORT_C voidSetNonPrintingCharsVisibility(TNonPrintingCharVisibility)
voidSetOpaqueLC()
voidSetReadyToRedraw()
voidSetTextViewCursorPos(TCursorPosition *)
IMPORT_C voidSetTruncating(TBool)
IMPORT_C voidSetTruncatingEllipsis(TChar)
IMPORT_C TIntSetViewL(const TTmDocPos &, TInt &, TViewYPosQualifier, TDiscard)
IMPORT_C TIntSetViewL(TInt, TInt &, TViewYPosQualifier, TDiscard)
voidSetWindow(RWindow *)
IMPORT_C voidSetWrapWidth(TInt)
const CTmTextLayout &TagmaTextLayout()
IMPORT_C TIntToParagraphStart(TInt &)
IMPORT_C TBoolTruncating()
IMPORT_C TCharTruncatingEllipsis()
TInt WrapWidth()
IMPORT_C TIntXyPosToDocPosL(TPoint &, TUint)
IMPORT_C TIntYBottomLastFormattedLine()
Private Member Functions
CTextLayout()
TBool AddFormattingAtEndL(TTmFormatParamBase &, TInt &, TInt &)
TInt BandHeightInPixels()
IMPORT_C voidConstructL(MLayDoc *, TInt)
voidFormatBandL(TInt, TInt)
voidInitFormatParam(TTmFormatParamBase &)
voidPruneFormatL(TBool)
voidResetOpaque(void *)
TInt ScrollL(TInt, TAllowDisallow, TBool, TBool)
TInt SetBandTop()
TInt SuggestCursorPos(TInt)
TInt VisibleHeightInPixels()
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumanonymous { EFCharacterInsert, EFParagraphDelimiter, EFLeftDelete, EFRightDelete }
enumanonymous { EFScrollRedrawWholeScreen = CLayoutData::EFLargeNumber, EFMaximumLineWidth = CLayoutData::EFBodyWidthForNoWrapping }
enumanonymous { EFAllParagraphsNotWrapped = TRUE, EFParagraphsWrappedByDefault = FALSE }
enumTAllowDisallow { EFAllowScrollingBlankSpace = TRUE, EFDisallowScrollingBlankSpace = FALSE }
enumTAmountFormatted { EFFormatAllText = FALSE, EFFormatBand = TRUE }
enumTCurrentFormat { EFNoCurrentFormat = -1, EFNotInCurrentFormat = 0 }
enumTDiscard { EFViewDiscardAllFormat = TRUE, EFViewDontDiscardFormat = FALSE }
enumTPanicNumber {
EUnimplemented, ENoMemory, EDrawingBorderError, EFormatDeviceNotSet, EImageDeviceNotSet, EPixelNotInFormattedLine, EInvalidDocPos, ENoCharRangeToFormat, ECharacterNotFormatted, EPrintPreviewModeError, EBadCharacterEditType, EInvalidLineNumber, EPosNotFormatted, EMustFormatAllText, EPageScrollError, EInvalidRedraw
}
enumTScrollFlags { EFScrollOnlyToTopsOfLines = 1 }
Private Attributes
TInt iBandHeight
TInt iBandTop
TBool iBeginRedrawCount
TInt iDmmyForIHighlightExtensions
TInt iDmmyForISource
TInt iDummy
TInt iDummyForIText
TInt iExcessHeightRequired
TTmHighlightExtensions *iHighlightExtensions
TBool iIsWndInExternalRedraw
TBool iParInvalid
TBool iReadyToRedraw
TRect iRedrawRect
TInt iScrollFlags
TLayDocTextSource *iSource
CTmTextLayout *iText
TCursorPosition *iTextViewCursorPos
TInt iUnformattedStart
TInt iVisibleHeight
RWindow *iWnd

Constructor & Destructor Documentation

CTextLayout()

IMPORT_CCTextLayout()[private]

~CTextLayout()

IMPORT_C~CTextLayout()

Member Functions Documentation

AddFormattingAtEndL(TTmFormatParamBase &, TInt &, TInt &)

TBool AddFormattingAtEndL(TTmFormatParamBase &aFormatParam,
TInt &aHeightIncrease,
TInt &aParagraphsIncrease
)[private]

Parameters

TTmFormatParamBase & aFormatParam
TInt & aHeightIncrease
TInt & aParagraphsIncrease

AdjustVerticalAlignment(CParaFormat::TAlignment)

IMPORT_C voidAdjustVerticalAlignment(CParaFormat::TAlignmentaVerticalAlignment)

Parameters

CParaFormat::TAlignment aVerticalAlignment

BandHeight()

IMPORT_C TIntBandHeight()const

BandHeightInPixels()

TInt BandHeightInPixels()const [private]

BeginRedraw(const TRect &)

voidBeginRedraw(const TRect &aRect)

Parameters

const TRect & aRect

BeginRedrawCalled()

TBool BeginRedrawCalled()const

CalculateHorizontalExtremes(TInt &, TInt &, TBool)

TBool CalculateHorizontalExtremes(TInt &aLeftX,
TInt &aRightX,
TBoolaOnlyVisibleLines
)const

Parameters

TInt & aLeftX
TInt & aRightX
TBool aOnlyVisibleLines

CalculateHorizontalExtremesL(TInt &, TInt &, TBool, TBool)

IMPORT_C TBoolCalculateHorizontalExtremesL(TInt &aLeftX,
TInt &aRightX,
TBoolaOnlyVisibleLines,
TBoolaIgnoreWrapCharacters = FALSE
)const

Parameters

TInt & aLeftX
TInt & aRightX
TBool aOnlyVisibleLines
TBool aIgnoreWrapCharacters = FALSE

ChangeBandTopL(TInt &, TAllowDisallow)

IMPORT_C TIntChangeBandTopL(TInt &aPixels,
TAllowDisallowaScrollBlankSpace = EFDisallowScrollingBlankSpace
)

Parameters

TInt & aPixels
TAllowDisallow aScrollBlankSpace = EFDisallowScrollingBlankSpace

ChangeBandTopNoLimitBorderL(TInt)

IMPORT_C voidChangeBandTopNoLimitBorderL(TIntaPixels)

Parameters

TInt aPixels

ConstructL(MLayDoc *, TInt)

IMPORT_C voidConstructL(MLayDoc *aDoc,
TIntaWrapWidth
)[private]

Parameters

MLayDoc * aDoc
TInt aWrapWidth

CustomDraw()

IMPORT_C const MFormCustomDraw *CustomDraw()const

CustomWrap()

IMPORT_C const MFormCustomWrap *CustomWrap()const

DiscardFormat()

IMPORT_C voidDiscardFormat()

DocPosToXyPosL(TInt, TPoint &, TUint)

IMPORT_C TBoolDocPosToXyPosL(TIntaDocPos,
TPoint &aPos,
TUintaFlags = 0
)const

Parameters

TInt aDocPos
TPoint & aPos
TUint aFlags = 0

DocumentLength()

IMPORT_C TIntDocumentLength()const

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

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

DrawBorders(const MGraphicsDeviceMap *, CGraphicsContext &, const TRect &, const TParaBorderArray &, const TRgb *, TRegion *, const TRect *)

IMPORT_C voidDrawBorders(const MGraphicsDeviceMap *aGd,
CGraphicsContext &aGc,
const TRect &aRect,
const TParaBorderArray &aBorder,
const TRgb *aBackground = NULL,
TRegion *aClipRegion = NULL,
const TRect *aDrawRect = NULL
)[static]

Parameters

const MGraphicsDeviceMap * aGd
CGraphicsContext & aGc
const TRect & aRect
const TParaBorderArray & aBorder
const TRgb * aBackground = NULL
TRegion * aClipRegion = NULL
const TRect * aDrawRect = NULL

DrawL(const TRect &, const TDrawTextLayoutContext *, const TCursorSelection *)

IMPORT_C voidDrawL(const TRect &aDrawRect,
const TDrawTextLayoutContext *aDrawTextLayoutContext,
const TCursorSelection *aHighlight = NULL
)

Parameters

const TRect & aDrawRect
const TDrawTextLayoutContext * aDrawTextLayoutContext
const TCursorSelection * aHighlight = NULL

EndRedraw()

voidEndRedraw()

ExcludingPartialLines()

IMPORT_C TBoolExcludingPartialLines()const

ExtendFormattingToCoverPosL(TInt)

IMPORT_C voidExtendFormattingToCoverPosL(TIntaDocPos)

Parameters

TInt aDocPos

ExtendFormattingToCoverYL(TInt)

IMPORT_C voidExtendFormattingToCoverYL(TIntaYPos)

Parameters

TInt aYPos

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

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

Parameters

const TTmDocPosSpec & aDocPos
TTmPosInfo2 & aPosInfo
TTmLineInfo * aLineInfo = NULL

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

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

Parameters

const TPoint & aXyPos
TTmPosInfo2 & aPosInfo
TTmLineInfo * aLineInfo = NULL

FirstCharOnLine(TInt)

IMPORT_C TIntFirstCharOnLine(TIntaLineNo)const

Parameters

TInt aLineNo

FirstDocPosFullyInBand()

IMPORT_C TIntFirstDocPosFullyInBand()const

FirstFormattedPos()

IMPORT_C TIntFirstFormattedPos()const

FirstLineInBand()

IMPORT_C TIntFirstLineInBand()const

FontHeightIncreaseFactor()

IMPORT_C TIntFontHeightIncreaseFactor()const

ForceNoWrapping(TBool)

IMPORT_C voidForceNoWrapping(TBoolaNoWrapping = EFAllParagraphsNotWrapped)

Parameters

TBool aNoWrapping = EFAllParagraphsNotWrapped

FormatBandL()

IMPORT_C voidFormatBandL()

FormatBandL(TInt, TInt)

voidFormatBandL(TIntaStartDocPos,
TIntaEndDocPos
)[private]

Parameters

TInt aStartDocPos
TInt aEndDocPos

FormatCharRangeL(TInt, TInt)

IMPORT_C voidFormatCharRangeL(TIntaStartDocPos,
TIntaEndDocPos
)

Parameters

TInt aStartDocPos
TInt aEndDocPos

FormatCharRangeL(TInt, TInt, TInt)

voidFormatCharRangeL(TIntaStartDocPos,
TIntaEndDocPos,
TIntaPixelOffset
)

Parameters

TInt aStartDocPos
TInt aEndDocPos
TInt aPixelOffset

FormatLineL(CParaFormat *, TInt &, TInt &, TBool &)

IMPORT_C TBoolFormatLineL(CParaFormat *aParaFormat,
TInt &aDocPos,
TInt &aHeight,
TBool &aPageBreak
)

Parameters

CParaFormat * aParaFormat
TInt & aDocPos
TInt & aHeight
TBool & aPageBreak

FormatNextLineL(TInt &)

IMPORT_C TBoolFormatNextLineL(TInt &aBotPixel)

Parameters

TInt & aBotPixel

FormattedHeightInPixels()

IMPORT_C TIntFormattedHeightInPixels()const

FormattedLength()

IMPORT_C TIntFormattedLength()const

GetCharacterHeightAndAscentL(TInt, TInt &, TInt &)

IMPORT_C voidGetCharacterHeightAndAscentL(TIntaDocPos,
TInt &aHeight,
TInt &aAscent
)const

Parameters

TInt aDocPos
TInt & aHeight
TInt & aAscent

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

TBool GetCursor(const TTmDocPos &aDocPos,
TTmCursorPlacementaPlacement,
TRect &aLineRect,
TPoint &aOrigin,
TInt &aWidth,
TInt &aAscent,
TInt &aDescent
)const

Parameters

const TTmDocPos & aDocPos
TTmCursorPlacement aPlacement
TRect & aLineRect
TPoint & aOrigin
TInt & aWidth
TInt & aAscent
TInt & aDescent

GetCustomInvisibleCharacterRemapper()

IMPORT_C MFormCustomInvisibleCharacterRemapper *GetCustomInvisibleCharacterRemapper()

GetFontHeightAndAscentL(const TFontSpec &, TInt &, TInt &)

IMPORT_C voidGetFontHeightAndAscentL(const TFontSpec &aFontSpec,
TInt &aHeight,
TInt &aAscent
)const

Parameters

const TFontSpec & aFontSpec
TInt & aHeight
TInt & aAscent

GetHighlightRemnants(const TRect &, const TDrawTextLayoutContext &, TRect *)

voidGetHighlightRemnants(const TRect &aRect,
const TDrawTextLayoutContext &aDrawTextLayoutContext,
TRect *aRemainderRects
)const

Parameters

const TRect & aRect
const TDrawTextLayoutContext & aDrawTextLayoutContext
TRect * aRemainderRects

GetLineNumber(TInt)

IMPORT_C TIntGetLineNumber(TIntaDocPos)

Parameters

TInt aDocPos

GetLineRect(TInt, TRect &)

IMPORT_C TIntGetLineRect(TIntaYPos,
TRect &aLine
)const

Parameters

TInt aYPos
TRect & aLine

GetLineRectL(TInt, TInt)

IMPORT_C TRectGetLineRectL(TIntaDocPos1,
TIntaDocPos2
)const

Parameters

TInt aDocPos1
TInt aDocPos2

GetMinimumSizeL(TInt, TSize &)

IMPORT_C voidGetMinimumSizeL(TIntaWrapWidth,
TSize &aSize
)

Parameters

TInt aWrapWidth
TSize & aSize

GetMinimumSizeL(TInt, TBool, TSize &)

IMPORT_C voidGetMinimumSizeL(TIntaWrapWidth,
TBoolaAllowLegalLineBreaksOnly,
TSize &aSize
)

Parameters

TInt aWrapWidth
TBool aAllowLegalLineBreaksOnly
TSize & aSize

GetNextVisualCursorPos(const TTmDocPosSpec &, TTmPosInfo2 &, TBool)

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

Parameters

const TTmDocPosSpec & aDocPos
TTmPosInfo2 & aPosInfo
TBool aToLeft

GetOrigin(TPoint &)

voidGetOrigin(TPoint &aPoint)const [inline]

Parameters

TPoint & aPoint

GetParagraphRect(const TTmDocPos &, TRect &)

voidGetParagraphRect(const TTmDocPos &aDocPos,
TRect &aRect
)const

Parameters

const TTmDocPos & aDocPos
TRect & aRect

HandleAdditionalCharactersAtEndL(TInt &, TInt &)

IMPORT_C voidHandleAdditionalCharactersAtEndL(TInt &aFirstPixel,
TInt &aLastPixel
)

Parameters

TInt & aFirstPixel
TInt & aLastPixel

HandleBlockChangeL(TCursorSelection, TInt, TViewRectChanges &, TBool)

IMPORT_C voidHandleBlockChangeL(TCursorSelectionaSelection,
TIntaOldCharsChanged,
TViewRectChanges &aViewChanges,
TBoolaFormatChanged
)

Parameters

TCursorSelection aSelection
TInt aOldCharsChanged
TViewRectChanges & aViewChanges
TBool aFormatChanged

HandleCharEditL(TUint, TInt &, TInt &, TInt &, TInt &, TInt &, TBool)

IMPORT_C TBoolHandleCharEditL(TUintaType,
TInt &aCursorPos,
TInt &aGood,
TInt &aFormattedUpTo,
TInt &aFormattedFrom,
TInt &aScroll,
TBoolaFormatChanged
)

Parameters

TUint aType
TInt & aCursorPos
TInt & aGood
TInt & aFormattedUpTo
TInt & aFormattedFrom
TInt & aScroll
TBool aFormatChanged

Highlight(const TRangeChange &, const TRect &, const TDrawTextLayoutContext *)

IMPORT_C voidHighlight(const TRangeChange &aHighlight,
const TRect &aDrawRect,
const TDrawTextLayoutContext *aDrawTextLayoutContext
)

Parameters

const TRangeChange & aHighlight
const TRect & aDrawRect
const TDrawTextLayoutContext * aDrawTextLayoutContext

HighlightExtensions()

const TTmHighlightExtensions &HighlightExtensions()const [inline]

HighlightUsingExtensions(const CTextLayout::TRangeChange &, const TRangeChange &, const TRect &, const TDrawTextLayoutContext *)

voidHighlightUsingExtensions(const CTextLayout::TRangeChange &aChangeHighlight,
const TRangeChange &aFullHighlight,
const TRect &aDrawRect,
const TDrawTextLayoutContext *aDrawTextLayoutContext
)

Parameters

const CTextLayout::TRangeChange & aChangeHighlight
const TRangeChange & aFullHighlight
const TRect & aDrawRect
const TDrawTextLayoutContext * aDrawTextLayoutContext

InitFormatParam(TTmFormatParamBase &)

voidInitFormatParam(TTmFormatParamBase &aParam)[private]

Parameters

TTmFormatParamBase & aParam

InvertRangeL(const TCursorSelection &, const TRect &, const TDrawTextLayoutContext *)

IMPORT_C voidInvertRangeL(const TCursorSelection &aHighlight,
const TRect &aDrawRect,
const TDrawTextLayoutContext *aDrawTextLayoutContext
)

Parameters

const TCursorSelection & aHighlight
const TRect & aDrawRect
const TDrawTextLayoutContext * aDrawTextLayoutContext

IsBackgroundFormatting()

IMPORT_C TBoolIsBackgroundFormatting()const

IsFormattingBand()

IMPORT_C TBoolIsFormattingBand()const

IsWrapping()

IMPORT_C TBoolIsWrapping()const

MajorVersion()

IMPORT_C TIntMajorVersion()const

MakeVisible(TBool)

IMPORT_C voidMakeVisible(TBoolaVisible)

Parameters

TBool aVisible

MinimumLineDescent()

IMPORT_C TIntMinimumLineDescent()const

NewL(MLayDoc *, TInt)

IMPORT_C CTextLayout *NewL(MLayDoc *aDoc,
TIntaWrapWidth
)[static]

Parameters

MLayDoc * aDoc
TInt aWrapWidth

NonPrintingCharsVisibility()

IMPORT_C TNonPrintingCharVisibilityNonPrintingCharsVisibility()const

NotifyTerminateBackgroundFormatting()

IMPORT_C voidNotifyTerminateBackgroundFormatting()

NumFormattedLines()

IMPORT_C TIntNumFormattedLines()const

PageDownL(TInt &, TInt &)

IMPORT_C voidPageDownL(TInt &aYCursorPos,
TInt &aPixelsScrolled
)

Parameters

TInt & aYCursorPos
TInt & aPixelsScrolled

PageUpL(TInt &, TInt &)

IMPORT_C voidPageUpL(TInt &aYCursorPos,
TInt &aPixelsScrolled
)

Parameters

TInt & aYCursorPos
TInt & aPixelsScrolled

Panic(TPanicNumber)

voidPanic(TPanicNumberaNumber)[static]

Parameters

TPanicNumber aNumber

ParagraphHeight(TInt)

IMPORT_C TIntParagraphHeight(TIntaDocPos)const

Parameters

TInt aDocPos

ParagraphRectL(TInt)

IMPORT_C TRectParagraphRectL(TIntaDocPos)const

Parameters

TInt aDocPos

PictureRectangleAndPosL(const TPoint &, TRect &, TBool *)

TInt PictureRectangleAndPosL(const TPoint &aXyPos,
TRect &aPictureRect,
TBool *aCanScaleOrCrop = 0
)const

Parameters

const TPoint & aXyPos
TRect & aPictureRect
TBool * aCanScaleOrCrop = 0

PictureRectangleL(TInt, TRect &, TBool *)

IMPORT_C TBoolPictureRectangleL(TIntaDocPos,
TRect &aPictureRect,
TBool *aCanScaleOrCrop = NULL
)const

Parameters

TInt aDocPos
TRect & aPictureRect
TBool * aCanScaleOrCrop = NULL

PictureRectangleL(const TPoint &, TRect &, TBool *)

IMPORT_C TBoolPictureRectangleL(const TPoint &aXyPos,
TRect &aPictureRect,
TBool *aCanScaleOrCrop = NULL
)const

Parameters

const TPoint & aXyPos
TRect & aPictureRect
TBool * aCanScaleOrCrop = NULL

PixelsAboveBand()

IMPORT_C TIntPixelsAboveBand()const

PosInBand(const TTmDocPos &, TTmLineInfo *)

IMPORT_C TBoolPosInBand(const TTmDocPos &aDocPos,
TTmLineInfo *aLineInfo = NULL
)const

Parameters

const TTmDocPos & aDocPos
TTmLineInfo * aLineInfo = NULL

PosInBand(TTmDocPos, TPoint &)

IMPORT_C TBoolPosInBand(TTmDocPosaDocPos,
TPoint &aXyPos
)const

Parameters

TTmDocPos aDocPos
TPoint & aXyPos

PosInBand(TInt, TPoint &)

IMPORT_C TBoolPosInBand(TIntaDocPos,
TPoint &aXyPos
)const

Parameters

TInt aDocPos
TPoint & aXyPos

PosIsFormatted(TInt)

IMPORT_C TBoolPosIsFormatted(TIntaDocPos)const

Parameters

TInt aDocPos

PosRangeInBand(TInt &)

IMPORT_C TIntPosRangeInBand(TInt &aDocPos)const

Parameters

TInt & aDocPos

PruneFormatL(TBool)

voidPruneFormatL(TBoolaFromStart)[private]

Parameters

TBool aFromStart

ReformatVerticalSpaceL()

IMPORT_C voidReformatVerticalSpaceL()

ResetExternalDraw()

voidResetExternalDraw()

ResetOpaque(void *)

voidResetOpaque(void *aThis)[private, static]

Parameters

void * aThis

RestrictScrollToTopsOfLines(TBool)

voidRestrictScrollToTopsOfLines(TBoolaRestrict)[inline]

Dangerous function. Makes scroll operations set the top of the screen flush to the top of a line. In general this might scroll the cursor off the screen.

Parameters

TBool aRestrict

ScrollDocPosIntoViewL(const TTmDocPos &)

TInt ScrollDocPosIntoViewL(const TTmDocPos &aDocPos)

Parameters

const TTmDocPos & aDocPos

ScrollL(TInt, TAllowDisallow, TBool, TBool)

TInt ScrollL(TIntaDy,
TAllowDisallowaScrollBlankSpace,
TBoolaTopNoLimitBorder = EFalse,
TBoolaBottomNoLimitBorder = EFalse
)[private]

Parameters

TInt aDy
TAllowDisallow aScrollBlankSpace
TBool aTopNoLimitBorder = EFalse
TBool aBottomNoLimitBorder = EFalse

ScrollLinesL(TInt &, TAllowDisallow)

IMPORT_C TIntScrollLinesL(TInt &aNumLines,
TAllowDisallowaScrollBlankSpace = EFDisallowScrollingBlankSpace
)

Parameters

TInt & aNumLines
TAllowDisallow aScrollBlankSpace = EFDisallowScrollingBlankSpace

ScrollParagraphsL(TInt &, TAllowDisallow)

IMPORT_C TIntScrollParagraphsL(TInt &aNumParas,
TAllowDisallowaScrollBlankSpace
)

Parameters

TInt & aNumParas
TAllowDisallow aScrollBlankSpace

SetAmountToFormat(TAmountFormatted)

IMPORT_C voidSetAmountToFormat(TAmountFormattedaAmountOfFormat = EFFormatBand)

Parameters

TAmountFormatted aAmountOfFormat = EFFormatBand

SetBandHeight(TInt)

IMPORT_C voidSetBandHeight(TIntaHeight)

Parameters

TInt aHeight

SetBandTop()

TInt SetBandTop()[private]

SetCustomDraw(const MFormCustomDraw *)

IMPORT_C voidSetCustomDraw(const MFormCustomDraw *aCustomDraw)

Parameters

const MFormCustomDraw * aCustomDraw

SetCustomInvisibleCharacterRemapper(MFormCustomInvisibleCharacterRemapper *)

IMPORT_C voidSetCustomInvisibleCharacterRemapper(MFormCustomInvisibleCharacterRemapper *aInvisibleCharacterRemapper)

Parameters

MFormCustomInvisibleCharacterRemapper * aInvisibleCharacterRemapper

SetCustomWrap(const MFormCustomWrap *)

IMPORT_C voidSetCustomWrap(const MFormCustomWrap *aCustomWrap)

Parameters

const MFormCustomWrap * aCustomWrap

SetExcessHeightRequired(TInt)

voidSetExcessHeightRequired(TIntaExcessHeightRequired)

Parameters

TInt aExcessHeightRequired

SetExcludePartialLines(TBool)

IMPORT_C voidSetExcludePartialLines(TBoolaExcludePartialLines = TRUE)

Parameters

TBool aExcludePartialLines = TRUE

SetExternalDraw(const TRect &)

voidSetExternalDraw(const TRect &aRect)

Parameters

const TRect & aRect

SetFontHeightIncreaseFactor(TInt)

IMPORT_C voidSetFontHeightIncreaseFactor(TIntaPercentage)

Parameters

TInt aPercentage

SetFormatMode(CLayoutData::TFormatMode, TInt, MGraphicsDeviceMap *)

IMPORT_C voidSetFormatMode(CLayoutData::TFormatModeaFormatMode,
TIntaWrapWidth,
MGraphicsDeviceMap *aFormatDevice
)

Parameters

CLayoutData::TFormatMode aFormatMode
TInt aWrapWidth
MGraphicsDeviceMap * aFormatDevice

SetHighlightExtensions(TInt, TInt, TInt, TInt)

IMPORT_C voidSetHighlightExtensions(TIntaLeftExtension,
TIntaRightExtension,
TIntaTopExtension,
TIntaBottomExtension
)

Parameters

TInt aLeftExtension
TInt aRightExtension
TInt aTopExtension
TInt aBottomExtension

SetImageDeviceMap(MGraphicsDeviceMap *)

IMPORT_C voidSetImageDeviceMap(MGraphicsDeviceMap *aGd)

Parameters

MGraphicsDeviceMap * aGd

SetInterfaceProvider(MFormCustomInterfaceProvider *)

IMPORT_C voidSetInterfaceProvider(MFormCustomInterfaceProvider *aProvider)

Parameters

MFormCustomInterfaceProvider * aProvider

SetLabelsDeviceMap(MGraphicsDeviceMap *)

IMPORT_C voidSetLabelsDeviceMap(MGraphicsDeviceMap *aDeviceMap)

Parameters

MGraphicsDeviceMap * aDeviceMap

SetLabelsMarginWidth(TInt)

IMPORT_C voidSetLabelsMarginWidth(TIntaWidth)

Parameters

TInt aWidth

SetLayDoc(MLayDoc *)

IMPORT_C voidSetLayDoc(MLayDoc *aDoc)

Parameters

MLayDoc * aDoc

SetMinimumLineDescent(TInt)

IMPORT_C voidSetMinimumLineDescent(TIntaPixels)

Parameters

TInt aPixels

SetNonPrintingCharsVisibility(TNonPrintingCharVisibility)

IMPORT_C voidSetNonPrintingCharsVisibility(TNonPrintingCharVisibilityaVisibility)

Parameters

TNonPrintingCharVisibility aVisibility

SetOpaqueLC()

voidSetOpaqueLC()

SetReadyToRedraw()

voidSetReadyToRedraw()

SetTextViewCursorPos(TCursorPosition *)

voidSetTextViewCursorPos(TCursorPosition *aPos)

Parameters

TCursorPosition * aPos

SetTruncating(TBool)

IMPORT_C voidSetTruncating(TBoolaOn)

Parameters

TBool aOn

SetTruncatingEllipsis(TChar)

IMPORT_C voidSetTruncatingEllipsis(TCharaEllipsis)

Parameters

TChar aEllipsis

SetViewL(const TTmDocPos &, TInt &, TViewYPosQualifier, TDiscard)

IMPORT_C TIntSetViewL(const TTmDocPos &aDocPos,
TInt &aYPos,
TViewYPosQualifieraYPosQualifier,
TDiscardaDiscardFormat = EFViewDontDiscardFormat
)

Parameters

const TTmDocPos & aDocPos
TInt & aYPos
TViewYPosQualifier aYPosQualifier
TDiscard aDiscardFormat = EFViewDontDiscardFormat

SetViewL(TInt, TInt &, TViewYPosQualifier, TDiscard)

IMPORT_C TIntSetViewL(TIntaDocPos,
TInt &aYPos,
TViewYPosQualifieraYPosQualifier,
TDiscardaDiscardFormat = EFViewDontDiscardFormat
)

Parameters

TInt aDocPos
TInt & aYPos
TViewYPosQualifier aYPosQualifier
TDiscard aDiscardFormat = EFViewDontDiscardFormat

SetWindow(RWindow *)

voidSetWindow(RWindow *aWnd)

Parameters

RWindow * aWnd

SetWrapWidth(TInt)

IMPORT_C voidSetWrapWidth(TIntaWrapWidth)

Parameters

TInt aWrapWidth

SuggestCursorPos(TInt)

TInt SuggestCursorPos(TIntaCurrentCursorPos)const [private]

Parameters

TInt aCurrentCursorPos

TagmaTextLayout()

const CTmTextLayout &TagmaTextLayout()const [inline]

ToParagraphStart(TInt &)

IMPORT_C TIntToParagraphStart(TInt &aDocPos)const

Parameters

TInt & aDocPos

Truncating()

IMPORT_C TBoolTruncating()const

TruncatingEllipsis()

IMPORT_C TCharTruncatingEllipsis()const

VisibleHeightInPixels()

TInt VisibleHeightInPixels()const [private]

WrapWidth()

TInt WrapWidth()const

XyPosToDocPosL(TPoint &, TUint)

IMPORT_C TIntXyPosToDocPosL(TPoint &aPos,
TUintaFlags = 0
)const

Parameters

TPoint & aPos
TUint aFlags = 0

YBottomLastFormattedLine()

IMPORT_C TIntYBottomLastFormattedLine()const

Member Enumerations Documentation

Enum anonymous

Enumerators

EFCharacterInsert

Insert a character, (not a paragraph delimiter).

EFParagraphDelimiter

Insert a paragraph delimiter.

EFLeftDelete

Delete single character to the left.

EFRightDelete

Delete single character to the right.

Enum anonymous

Enumerators

EFScrollRedrawWholeScreen = CLayoutData::EFLargeNumber

A value greater than any possible display height indicates that the entire visible area, at least, was scrolled, and so there is no point in blitting text; a full redraw is needed.

EFMaximumLineWidth = CLayoutData::EFBodyWidthForNoWrapping

The maximum line width when wrapping is unset.

Enum anonymous

Enumerators

EFAllParagraphsNotWrapped = TRUE

Wrapping off; overrides the paragraph format.

EFParagraphsWrappedByDefault = FALSE

Wrapping on, unless CParaFormat::iWrap is false.

Enum TAllowDisallow

Indicates whether blank space should scroll. Used by several CTextView and CTextLayout scrolling functions.

Enumerators

EFAllowScrollingBlankSpace = TRUE

Allow blank space to scroll.

EFDisallowScrollingBlankSpace = FALSE

Disallow blank space from scrolling.

Enum TAmountFormatted

Amount to format. Used by CTextLayout::SetAmountToFormat().

Enumerators

EFFormatAllText = FALSE

Format the whole document.

EFFormatBand = TRUE

Format the visible band only.

Enum TCurrentFormat

Formatting information.

Enumerators

EFNoCurrentFormat = -1

Returned by some CTextLayout enquiry functions to indicate that no formatting has taken place so that the requested value cannot be calculated.

EFNotInCurrentFormat = 0

Returned by CTextLayout::ParagraphHeight() when the paragraph is not formatted.

Enum TDiscard

Flags used by CTextLayout::SetViewL(). Whether to reformat and redraw.

Enumerators

EFViewDiscardAllFormat = TRUE

Discard all formatting; redraw.

EFViewDontDiscardFormat = FALSE

Do not discard all formatting; redraw.

Enum TPanicNumber

Enumerators

EUnimplemented
ENoMemory
EDrawingBorderError
EFormatDeviceNotSet
EImageDeviceNotSet
EPixelNotInFormattedLine
EInvalidDocPos
ENoCharRangeToFormat
ECharacterNotFormatted
EPrintPreviewModeError
EBadCharacterEditType
EInvalidLineNumber
EPosNotFormatted
EMustFormatAllText
EPageScrollError
EInvalidRedraw

Enum TScrollFlags

Enumerators

EFScrollOnlyToTopsOfLines = 1

Member Data Documentation

TInt iBandHeight

TInt iBandHeight[private]

TInt iBandTop

TInt iBandTop[private]

TBool iBeginRedrawCount

TBool iBeginRedrawCount[private]

TInt iDmmyForIHighlightExtensions

TInt iDmmyForIHighlightExtensions[private]

TInt iDmmyForISource

TInt iDmmyForISource[private]

TInt iDummy

TInt iDummy[private]

TInt iDummyForIText

TInt iDummyForIText[private]

TInt iExcessHeightRequired

TInt iExcessHeightRequired[private]

TTmHighlightExtensions * iHighlightExtensions

TTmHighlightExtensions *iHighlightExtensions[private]

TBool iIsWndInExternalRedraw

TBool iIsWndInExternalRedraw[private]

TBool iParInvalid

TBool iParInvalid[private]

TBool iReadyToRedraw

TBool iReadyToRedraw[private]

TRect iRedrawRect

TRect iRedrawRect[private]

TInt iScrollFlags

TInt iScrollFlags[private]

TLayDocTextSource * iSource

TLayDocTextSource *iSource[private]

CTmTextLayout * iText

CTmTextLayout *iText[private]

TCursorPosition * iTextViewCursorPos

TCursorPosition *iTextViewCursorPos[private]

TInt iUnformattedStart

TInt iUnformattedStart[private]

TInt iVisibleHeight

TInt iVisibleHeight[private]

RWindow * iWnd

RWindow *iWnd[private]