CTextView Class Reference

class CTextView : public CBase

Lays out formatted text for display.

The class provides functions to:

convert between document positions and x,y coordinates

set the dimensions of the rectangle in which text can be viewed (the view rectangle)

set margin widths

do horizontal and vertical scrolling

do text selection

set the cursor position and appearance

After a change has been made to the text layout, a reformat and redraw should normally take place. CTextView provides functions which are optimised to reformat the minimum amount necessary. For example, when a global formatting parameter is changed (e.g. the wrap width), the whole document's layout needs to be recalculated, so HandleGlobalChangeL() should be called. If the change involves the insertion or deletion of a single character, only a single line may be affected; for this, HandleCharEditL() is appropriate. Most CTextView reformatting functions do scrolling (using block transfer), if necessary, and a redraw.

For maximum responsiveness, CTextView uses an active object to carry out reformatting as a background task, so that the application can continue to receive user input. Many CTextView functions force background formatting to complete before they take effect.

When scrolling vertically, positive numbers of pixels, lines, paragraphs, pages, etc., mean that the text moves down, and vice versa. When scrolling horizontally, positive numbers of pixels mean that the text moves left and vice versa.

A text view can display up to two cursors and up to three margins. The cursors are the text cursor and the line cursor. The purpose of the line cursor is to make it easier to see which line the text cursor (or the selection extension point) is on. The three margins are the label margin (for paragraph labels), the line cursor margin (for the line cursor) and the left text margin (the gap between the edge of the page and the text). All are optional, but if present, they appear in that order, starting at the left edge of the view rectangle.

An object of class CTextLayout is used by the text view to calculate changes to the layout. This object must be specified when constructing the text view. It is also used to set layout attributes, including the wrap width, the height of the visible portion of the document (the "band"), whether formatting is set to the band or to the whole document and the text object which is the source of the text and formatting information.

The x-y pixel coordinates used by CTextView are called window coordinates. Window coordinates have their origin at the top left corner of the view window (unlike class CTextLayout whose coordinates have their origin at the top left corner of the area within the view rectangle in which text can appear). As in most bitmap graphics systems, x coordinates increase rightwards and y coordinates increase downwards.

Inherits from

Public Member Functions
~CTextView()
IMPORT_C voidAlterViewRect(const TRect &)
IMPORT_C const TRect &AlteredViewRect()
IMPORT_C CBitmapContext *BitmapContext()
IMPORT_C voidCalculateHorizontalExtremesL(TInt &, TInt &, TBool)
IMPORT_C voidCancelSelectionL()
IMPORT_C voidClearSelectionL()
voidDisableFlickerFreeRedraw()
IMPORT_C TBoolDocPosToXyPosL(TInt, TPoint &)
IMPORT_C voidDrawL(TRect)
IMPORT_C voidDrawL(TRect, CBitmapContext &)
voidEnableFlickerFreeRedraw()
IMPORT_C voidEnablePictureFrameL(TBool)
IMPORT_C TBoolFindDocPosL(const TTmDocPosSpec &, TTmPosInfo2 &, TTmLineInfo *)
IMPORT_C TBoolFindXyPosL(const TPoint &, TTmPosInfo2 &, TTmLineInfo *)
IMPORT_C voidFinishBackgroundFormattingL()
TBool FlickerFreeRedraw()
IMPORT_C voidFormatTextL()
IMPORT_C TCursorSelectionGetBackwardDeletePositionL()
IMPORT_C voidGetCursorPos(TTmDocPos &)
IMPORT_C TCursorSelectionGetForwardDeletePositionL()
voidGetOrigin(TPoint &)
IMPORT_C TBoolGetPictureRectangleL(TInt, TRect &, TBool *)
IMPORT_C TBoolGetPictureRectangleL(TPoint, TRect &, TBool *)
IMPORT_C voidHandleAdditionalCharactersAtEndL()
IMPORT_C TIntHandleCharEditL(TUint, TBool)
IMPORT_C voidHandleGlobalChangeL(TViewYPosQualifier)
IMPORT_C voidHandleGlobalChangeNoRedrawL(TViewYPosQualifier)
IMPORT_C TPointHandleInsertDeleteL(TCursorSelection, TInt, TBool)
IMPORT_C TPointHandleRangeFormatChangeL(TCursorSelection, TBool)
IMPORT_C TIntHorizontalScrollJump()
IMPORT_C TBoolIsPictureFrameSelected(TRect &, TInt &)
const CTextLayout *Layout()
IMPORT_C TIntLeftTextMargin()
IMPORT_C voidMakeVisible(TBool)
IMPORT_C voidMarginWidths(TInt &, TInt &)
IMPORT_C voidMatchCursorHeightL(const TFontSpec &)
IMPORT_C voidMatchCursorHeightToAdjacentChar(TBeforeAfter)
IMPORT_C TPointMoveCursorL(TCursorPosition::TMovementType &, TBool)
IMPORT_C CTextView *NewL(CTextLayout *, const TRect &, CBitmapDevice *, MGraphicsDeviceMap *, RWindow *, RWindowGroup *, RWsSession *)
IMPORT_C TRectParagraphRectL(TInt)
IMPORT_C TIntScrollDisplayL(TCursorPosition::TMovementType, CTextLayout::TAllowDisallow)
IMPORT_C TIntScrollDisplayLinesL(TInt &, CTextLayout::TAllowDisallow)
IMPORT_C TIntScrollDisplayParagraphsL(TInt &, CTextLayout::TAllowDisallow)
IMPORT_C voidScrollDisplayPixelsL(TInt &)
IMPORT_C voidScrollDisplayPixelsNoLimitBorderL(TInt)
IMPORT_C TCursorSelectionSelection()
IMPORT_C TBoolSelectionVisible()
IMPORT_C voidSetBackgroundColor(TRgb)
IMPORT_C voidSetCursorExtensions(TInt, TInt)
IMPORT_C voidSetCursorFlash(TBool)
IMPORT_C voidSetCursorPlacement(TTmCursorPlacement)
IMPORT_C voidSetCursorPositioningHintL(TCursorPosition::TPosHint)
IMPORT_C voidSetCursorVisibilityL(TUint, TUint)
IMPORT_C voidSetCursorWeight(TInt)
IMPORT_C voidSetCursorWidthTypeL(TTextCursor::EType, TInt)
IMPORT_C voidSetCursorXorColor(TRgb)
IMPORT_C voidSetDisplayContextL(CBitmapDevice *, RWindow *, RWindowGroup *, RWsSession *)
IMPORT_C TPointSetDocPosL(const TTmDocPosSpec &, TBool)
IMPORT_C TPointSetDocPosL(TInt, TBool)
IMPORT_C TPointSetDocPosL(const TTmDocPos &, TBool)
IMPORT_C voidSetExcessHeightRequired(TInt)
IMPORT_C voidSetHighlightExtensions(TInt, TInt, TInt, TInt)
IMPORT_C voidSetHorizontalScrollJump(TInt)
IMPORT_C voidSetLatentXPosition(TInt)
IMPORT_C voidSetLayout(CTextLayout *)
IMPORT_C voidSetLeftTextMargin(TInt)
IMPORT_C voidSetLineCursorBitmap(const CFbsBitmap *)
IMPORT_C voidSetMarginWidths(TInt, TInt)
voidSetObserver(MObserver *)
IMPORT_C voidSetOpaque(TBool)
IMPORT_C voidSetParagraphFillTextOnly(TBool)
IMPORT_C voidSetPendingSelection(const TCursorSelection &)
IMPORT_C TPointSetSelectionL(const TCursorSelection &)
IMPORT_C voidSetSelectionVisibilityL(TBool)
IMPORT_C voidSetTextColorOverride(const TRgb *)
IMPORT_C TPointSetViewL(TInt, TInt &, TViewYPosQualifier, TDiscard, TDoHorizontalScroll)
IMPORT_C TPointSetViewLineAtTopL(TInt)
IMPORT_C voidSetViewRect(const TRect &)
IMPORT_C TPointSetXyPosL(TPoint, TBool, TRect *&, TInt &)
IMPORT_C const TRect &ViewRect()
IMPORT_C const TTmDocPos &VisualEndOfRunL(const TTmDocPos &, const TTmDocPos &, TCursorPosition::TVisualEnd)
IMPORT_C TIntXyPosToDocPosL(TPoint &)
Private Member Functions
CTextView()
voidAdjustRectForScrolling(TRect &, TInt, TInt)
TInt CalculateBaseLinePos(TTmDocPos &)
voidCalculateHorizontalExtremes(TInt &, TInt &, TBool)
TInt CheckHorizontalScroll(const TTmDocPos &)
voidCheckScrollUpL()
voidClearRectAtBottom(TInt)
IMPORT_C voidConstructL(CTextLayout *, const TRect &, CBitmapDevice *, MGraphicsDeviceMap *, RWindow *, RWindowGroup *, RWsSession *)
voidDestroyWindowServerObjects()
voidDisplayLineRangeL(TInt, TInt)
voidDisplayNewLinesL(TInt, TInt)
voidDoClearSelectionL(const TCursorSelection &, TBool)
voidDoDrawTextSupportL(const TRect &, const TCursorSelection *)
voidDoDrawTextSupportOpaqueL(const TRect &, const TCursorSelection *)
TPoint DoHandleGlobalChangeL(TViewYPosQualifier, CTextView::TDiscard)
TInt DoHorizontalScrollDisplayL(TCursorPosition::TMovementType, CTextLayout::TAllowDisallow)
TPoint DoMoveCursorL(TBool, TCursorPosition::TMovementType &, TBool)
TInt DoScrollDisplayL(TCursorPosition::TMovementType, CTextLayout::TAllowDisallow)
TInt DrawAfterCursorMoveL(TInt)
voidDrawCursor(TUint)
voidDrawPictureFrameL(TRect &)
voidDrawTextL(TInt, TInt)
voidDrawTextSupportL(const TRect &, const TCursorSelection *)
voidDrawWithCurrentHighlight()
voidDrawWithPreviousHighlight()
TBool ExtendedHighlightExists()
TPoint HandleBlockChangeL(TCursorSelection, TInt, TBool)
voidHighlightUsingExtensions(CTextLayout::TRangeChange, CTextLayout::TRangeChange)
IMPORT_C TIntIdleL(TAny *)
TBool IsFormatting()
TBool NextLineL()
TBool NoMemoryCheckL()
voidNoMemoryL(TInt)
voidNotifyReformatL()
voidRecoverNoMemoryL()
voidRecreateWindowServerObjectsL()
voidRedrawPictureFrameRectL(TInt)
voidResetExternalDraw(TAny *)
voidResetOffScreenBitmapContext(TAny *)
voidScrollDisplayL()
voidScrollRect(TRect &, TInt, TInt, TInt, TBool)
voidScrollRect(TInt, TInt &, TInt &)
voidScrollTextL(TInt, TInt, TInt, TBool)
voidStartIdleObject()
TInt TopViewRect()
voidUpdateHighlightL()
voidUpdatePictureFrameL()
TPoint ViewL(const TTmDocPos &, TInt &, TViewYPosQualifier, CTextView::TDiscard, TDoHorizontalScroll)
TPoint ViewTopOfLineL(const TTmDocPos &, TInt &, CTextView::TDiscard, TDoHorizontalScroll)
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 { EFFirstCharOnLine = -1000000, EFLastCharOnLine = 1000000 }
enumTBeforeAfter { EFCharacterBefore = ETrue, EFCharacterAfter = EFalse }
enumTDiscard { EFViewDiscardAllFormat, EFViewDontDiscardFormat, EFViewDiscardAllNoRedraw, EFViewDontDiscardFullRedraw }
enumTDoHorizontalScroll { EFNoHorizontalScroll = EFalse, EFCheckForHorizontalScroll = ETrue }
enumTPriorities { EFBackgroundFormattingPriority = (CActive::EPriorityIdle + CActive::EPriorityLow) / 2 }
Private Member Enumerations
enumanonymous { EFSelectionVisible = 1, EFPictureFrameEnabled = 2, EFEverythingVisible = 3, EFFlickerFreeRedraw = 4, EFTextVisible = 8 }
enumTDrawParameters { EFDrawAllWindow = CLayoutData::EFLargeNumber }
enumTExtendedHighlightRedraw { EFTopEdge = 0x0001, EFBottomEdge = 0x0002 }
enumTHorizontalScroll { EFNoPreviousHorizontalScroll = 0, EFPreviousHorizontalScroll }
enumTHorizontalScrollJump { EFDefaultHorizontalScrollJump = 20 }
enumTMemoryStatus { EFMemoryOK, EFOutOfMemory, EFRecovering }
enumTPictureFrameBlobWidths { EFFrameVisibleBlobWidth = 10, EFFrameActiveBlobWidth = 20 }
Private Attributes
TBool iContextIsNavigation
TCursor iCursor
TCursorPosition iCursorPos
RScreenDisplay iDisplay
TBool iDrawOpaque
TDrawTextLayoutContext iDrawTextLayoutContext
TUint iDummy
TUint iFlags
TInt iFormattedUpTo
TInt iGood
TInt iHeightNotDrawn
TUint iHorizontalScroll
TInt iHorizontalScrollJump
CTextLayout *iLayout
TMemoryStatus iNoMemory
MObserver *iObserver
CBitmapContext *iOffScreenContext
TFrameOverlay *iPictureFrame
TRect iReducedDrawingAreaRect
CIdle *iWrap

Constructor & Destructor Documentation

CTextView()

IMPORT_CCTextView()[private]

~CTextView()

IMPORT_C~CTextView()

Member Functions Documentation

AdjustRectForScrolling(TRect &, TInt, TInt)

voidAdjustRectForScrolling(TRect &aRect,
TIntaScrollY,
TIntaScrollX
)const [private]

Parameters

TRect & aRect
TInt aScrollY
TInt aScrollX

AlterViewRect(const TRect &)

IMPORT_C voidAlterViewRect(const TRect &aViewRect)

Parameters

const TRect & aViewRect

AlteredViewRect()

IMPORT_C const TRect &AlteredViewRect()const

BitmapContext()

IMPORT_C CBitmapContext *BitmapContext()

CalculateBaseLinePos(TTmDocPos &)

TInt CalculateBaseLinePos(TTmDocPos &aDocPos)[private]

Parameters

TTmDocPos & aDocPos

CalculateHorizontalExtremes(TInt &, TInt &, TBool)

voidCalculateHorizontalExtremes(TInt &aLeftX,
TInt &aRightX,
TBoolaOnlyVisibleLines
)[private]

Parameters

TInt & aLeftX
TInt & aRightX
TBool aOnlyVisibleLines

CalculateHorizontalExtremesL(TInt &, TInt &, TBool)

IMPORT_C voidCalculateHorizontalExtremesL(TInt &aLeftX,
TInt &aRightX,
TBoolaOnlyVisibleLines
)

Parameters

TInt & aLeftX
TInt & aRightX
TBool aOnlyVisibleLines

CancelSelectionL()

IMPORT_C voidCancelSelectionL()

CheckHorizontalScroll(const TTmDocPos &)

TInt CheckHorizontalScroll(const TTmDocPos &aDocPos)[private]

Parameters

const TTmDocPos & aDocPos

CheckScrollUpL()

voidCheckScrollUpL()[private]

ClearRectAtBottom(TInt)

voidClearRectAtBottom(TIntaHeight)[private]

Parameters

TInt aHeight

ClearSelectionL()

IMPORT_C voidClearSelectionL()

ConstructL(CTextLayout *, const TRect &, CBitmapDevice *, MGraphicsDeviceMap *, RWindow *, RWindowGroup *, RWsSession *)

IMPORT_C voidConstructL(CTextLayout *aLayout,
const TRect &aDisplay,
CBitmapDevice *aGd,
MGraphicsDeviceMap *aDeviceMap,
RWindow *aWin,
RWindowGroup *aGroupWin,
RWsSession *aSession
)[private]

Parameters

CTextLayout * aLayout
const TRect & aDisplay
CBitmapDevice * aGd
MGraphicsDeviceMap * aDeviceMap
RWindow * aWin
RWindowGroup * aGroupWin
RWsSession * aSession

DestroyWindowServerObjects()

voidDestroyWindowServerObjects()[private]

DisableFlickerFreeRedraw()

voidDisableFlickerFreeRedraw()[inline]

DisplayLineRangeL(TInt, TInt)

voidDisplayLineRangeL(TIntaFrom,
TIntaTo
)[private]

Parameters

TInt aFrom
TInt aTo

DisplayNewLinesL(TInt, TInt)

voidDisplayNewLinesL(TIntaFrom,
TIntaTo
)[private]

Parameters

TInt aFrom
TInt aTo

DoClearSelectionL(const TCursorSelection &, TBool)

voidDoClearSelectionL(const TCursorSelection &aSelection,
TBoolaIsPictureFrame
)[private]

Parameters

const TCursorSelection & aSelection
TBool aIsPictureFrame

DoDrawTextSupportL(const TRect &, const TCursorSelection *)

voidDoDrawTextSupportL(const TRect &aRect,
const TCursorSelection *aHighlight
)[private]

Parameters

const TRect & aRect
const TCursorSelection * aHighlight

DoDrawTextSupportOpaqueL(const TRect &, const TCursorSelection *)

voidDoDrawTextSupportOpaqueL(const TRect &aRect,
const TCursorSelection *aHighlight
)[private]

Parameters

const TRect & aRect
const TCursorSelection * aHighlight

DoHandleGlobalChangeL(TViewYPosQualifier, CTextView::TDiscard)

TPoint DoHandleGlobalChangeL(TViewYPosQualifieraYPosQualifier,
CTextView::TDiscardaDiscard
)[private]

Parameters

TViewYPosQualifier aYPosQualifier
CTextView::TDiscard aDiscard

DoHorizontalScrollDisplayL(TCursorPosition::TMovementType, CTextLayout::TAllowDisallow)

TInt DoHorizontalScrollDisplayL(TCursorPosition::TMovementTypeaMovement,
CTextLayout::TAllowDisallowaScrollBlankSpace
)[private]

Parameters

TCursorPosition::TMovementType aMovement
CTextLayout::TAllowDisallow aScrollBlankSpace

DoMoveCursorL(TBool, TCursorPosition::TMovementType &, TBool)

TPoint DoMoveCursorL(TBoolaDragSelectOn,
TCursorPosition::TMovementType &aMovement,
TBoolaAllowPictureFrame
)[private]

Parameters

TBool aDragSelectOn
TCursorPosition::TMovementType & aMovement
TBool aAllowPictureFrame

DoScrollDisplayL(TCursorPosition::TMovementType, CTextLayout::TAllowDisallow)

TInt DoScrollDisplayL(TCursorPosition::TMovementTypeaMovement,
CTextLayout::TAllowDisallowaScrollBlankSpace
)[private]

Parameters

TCursorPosition::TMovementType aMovement
CTextLayout::TAllowDisallow aScrollBlankSpace

DocPosToXyPosL(TInt, TPoint &)

IMPORT_C TBoolDocPosToXyPosL(TIntaDocPos,
TPoint &aPoint
)

Parameters

TInt aDocPos
TPoint & aPoint

DrawAfterCursorMoveL(TInt)

TInt DrawAfterCursorMoveL(TIntaVerticalScrollBy)[private]

Parameters

TInt aVerticalScrollBy

DrawCursor(TUint)

voidDrawCursor(TUintaCursors = TCursor::EFBothCursors)[private]

Parameters

TUint aCursors = TCursor::EFBothCursors

DrawL(TRect)

IMPORT_C voidDrawL(TRectaRect)

Parameters

TRect aRect

DrawL(TRect, CBitmapContext &)

IMPORT_C voidDrawL(TRectaRect,
CBitmapContext &aGc
)

Parameters

TRect aRect
CBitmapContext & aGc

DrawPictureFrameL(TRect &)

voidDrawPictureFrameL(TRect &aClipRect)[private]

Parameters

TRect & aClipRect

DrawTextL(TInt, TInt)

voidDrawTextL(TIntaFromHeight = 0,
TIntaToHeight = EFDrawAllWindow
)[private]

Parameters

TInt aFromHeight = 0
TInt aToHeight = EFDrawAllWindow

DrawTextSupportL(const TRect &, const TCursorSelection *)

voidDrawTextSupportL(const TRect &aRect,
const TCursorSelection *aHighlight
)[private]

Parameters

const TRect & aRect
const TCursorSelection * aHighlight

DrawWithCurrentHighlight()

voidDrawWithCurrentHighlight()[private, inline]

DrawWithPreviousHighlight()

voidDrawWithPreviousHighlight()[private, inline]

EnableFlickerFreeRedraw()

voidEnableFlickerFreeRedraw()[inline]

EnablePictureFrameL(TBool)

IMPORT_C voidEnablePictureFrameL(TBoolaEnabled)

Parameters

TBool aEnabled

ExtendedHighlightExists()

TBool ExtendedHighlightExists()const [private]

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

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

Parameters

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

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

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

Parameters

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

FinishBackgroundFormattingL()

IMPORT_C voidFinishBackgroundFormattingL()

FlickerFreeRedraw()

TBool FlickerFreeRedraw()const [inline]

FormatTextL()

IMPORT_C voidFormatTextL()

GetBackwardDeletePositionL()

IMPORT_C TCursorSelectionGetBackwardDeletePositionL()

GetCursorPos(TTmDocPos &)

IMPORT_C voidGetCursorPos(TTmDocPos &aPos)const

Parameters

TTmDocPos & aPos

GetForwardDeletePositionL()

IMPORT_C TCursorSelectionGetForwardDeletePositionL()

GetOrigin(TPoint &)

voidGetOrigin(TPoint &aPoint)const [inline]

Gets the origin of the cursor.

Parameters

TPoint & aPointOn return, the cursor origin.

GetPictureRectangleL(TInt, TRect &, TBool *)

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

Parameters

TInt aDocPos
TRect & aPictureRect
TBool * aCanScaleOrCrop = NULL

GetPictureRectangleL(TPoint, TRect &, TBool *)

IMPORT_C TBoolGetPictureRectangleL(TPointaXyPos,
TRect &aPictureRect,
TBool *aCanScaleOrCrop = NULL
)

Parameters

TPoint aXyPos
TRect & aPictureRect
TBool * aCanScaleOrCrop = NULL

HandleAdditionalCharactersAtEndL()

IMPORT_C voidHandleAdditionalCharactersAtEndL()

HandleBlockChangeL(TCursorSelection, TInt, TBool)

TPoint HandleBlockChangeL(TCursorSelectionaSelection,
TIntaOldCharsChanged,
TBoolaFormatChanged
)[private]

Parameters

TCursorSelection aSelection
TInt aOldCharsChanged
TBool aFormatChanged

HandleCharEditL(TUint, TBool)

IMPORT_C TIntHandleCharEditL(TUintaType = CTextLayout::EFCharacterInsert,
TBoolaFormatChanged = EFalse
)

Parameters

TUint aType = CTextLayout::EFCharacterInsert
TBool aFormatChanged = EFalse

HandleGlobalChangeL(TViewYPosQualifier)

IMPORT_C voidHandleGlobalChangeL(TViewYPosQualifieraYPosQualifier =  TViewYPosQualifier())

Parameters

TViewYPosQualifier aYPosQualifier =  TViewYPosQualifier()

HandleGlobalChangeNoRedrawL(TViewYPosQualifier)

IMPORT_C voidHandleGlobalChangeNoRedrawL(TViewYPosQualifieraYPosQualifier =  TViewYPosQualifier())

Parameters

TViewYPosQualifier aYPosQualifier =  TViewYPosQualifier()

HandleInsertDeleteL(TCursorSelection, TInt, TBool)

IMPORT_C TPointHandleInsertDeleteL(TCursorSelectionaSelection,
TIntaDeletedChars,
TBoolaFormatChanged = EFalse
)

Parameters

TCursorSelection aSelection
TInt aDeletedChars
TBool aFormatChanged = EFalse

HandleRangeFormatChangeL(TCursorSelection, TBool)

IMPORT_C TPointHandleRangeFormatChangeL(TCursorSelectionaSelection,
TBoolaFormatChanged = EFalse
)

Parameters

TCursorSelection aSelection
TBool aFormatChanged = EFalse

HighlightUsingExtensions(CTextLayout::TRangeChange, CTextLayout::TRangeChange)

voidHighlightUsingExtensions(CTextLayout::TRangeChangeaOptimizedRange,
CTextLayout::TRangeChangeaOriginalRange
)[private]

Parameters

CTextLayout::TRangeChange aOptimizedRange
CTextLayout::TRangeChange aOriginalRange

HorizontalScrollJump()

IMPORT_C TIntHorizontalScrollJump()const

IdleL(TAny *)

IMPORT_C TIntIdleL(TAny *aSelf)[private, static]

Parameters

TAny * aSelf

IsFormatting()

TBool IsFormatting()const [private, inline]

IsPictureFrameSelected(TRect &, TInt &)

IMPORT_C TBoolIsPictureFrameSelected(TRect &aPictureFrameRect,
TInt &aDocPos
)const

Parameters

TRect & aPictureFrameRect
TInt & aDocPos

Layout()

const CTextLayout *Layout()const [inline]

Returns a pointer to the text layout object used by the text view. A pointer to the text layout object used by the text view.

LeftTextMargin()

IMPORT_C TIntLeftTextMargin()const

MakeVisible(TBool)

IMPORT_C voidMakeVisible(TBoolaVisible)

Parameters

TBool aVisible

MarginWidths(TInt &, TInt &)

IMPORT_C voidMarginWidths(TInt &aLabels,
TInt &aLineCursor
)const

Parameters

TInt & aLabels
TInt & aLineCursor

MatchCursorHeightL(const TFontSpec &)

IMPORT_C voidMatchCursorHeightL(const TFontSpec &aFontSpec)

Parameters

const TFontSpec & aFontSpec

MatchCursorHeightToAdjacentChar(TBeforeAfter)

IMPORT_C voidMatchCursorHeightToAdjacentChar(TBeforeAfteraBasedOn = EFCharacterBefore)

Parameters

TBeforeAfter aBasedOn = EFCharacterBefore

MoveCursorL(TCursorPosition::TMovementType &, TBool)

IMPORT_C TPointMoveCursorL(TCursorPosition::TMovementType &aMovement,
TBoolaDragSelectOn
)

Parameters

TCursorPosition::TMovementType & aMovement
TBool aDragSelectOn

NewL(CTextLayout *, const TRect &, CBitmapDevice *, MGraphicsDeviceMap *, RWindow *, RWindowGroup *, RWsSession *)

IMPORT_C CTextView *NewL(CTextLayout *aLayout,
const TRect &aDisplay,
CBitmapDevice *aGd,
MGraphicsDeviceMap *aDeviceMap,
RWindow *aWin,
RWindowGroup *aGroupWin,
RWsSession *aSession
)[static]

Parameters

CTextLayout * aLayout
const TRect & aDisplay
CBitmapDevice * aGd
MGraphicsDeviceMap * aDeviceMap
RWindow * aWin
RWindowGroup * aGroupWin
RWsSession * aSession

NextLineL()

TBool NextLineL()[private]

NoMemoryCheckL()

TBool NoMemoryCheckL()[private]

NoMemoryL(TInt)

voidNoMemoryL(TIntaErr)[private]

Parameters

TInt aErr

NotifyReformatL()

voidNotifyReformatL()[private, inline]

ParagraphRectL(TInt)

IMPORT_C TRectParagraphRectL(TIntaDocPos)const

Parameters

TInt aDocPos

RecoverNoMemoryL()

voidRecoverNoMemoryL()[private]

RecreateWindowServerObjectsL()

voidRecreateWindowServerObjectsL()[private]

RedrawPictureFrameRectL(TInt)

voidRedrawPictureFrameRectL(TIntaPos)[private]

Parameters

TInt aPos

ResetExternalDraw(TAny *)

voidResetExternalDraw(TAny *aTextView)[private, static]

Parameters

TAny * aTextView

ResetOffScreenBitmapContext(TAny *)

voidResetOffScreenBitmapContext(TAny *aTextView)[private, static]

Parameters

TAny * aTextView

ScrollDisplayL(TCursorPosition::TMovementType, CTextLayout::TAllowDisallow)

IMPORT_C TIntScrollDisplayL(TCursorPosition::TMovementTypeaMovement,
CTextLayout::TAllowDisallowaScrollBlankSpace = CTextLayout::EFDisallowScrollingBlankSpace
)

Parameters

TCursorPosition::TMovementType aMovement
CTextLayout::TAllowDisallow aScrollBlankSpace = CTextLayout::EFDisallowScrollingBlankSpace

ScrollDisplayL()

voidScrollDisplayL()[private]

ScrollDisplayLinesL(TInt &, CTextLayout::TAllowDisallow)

IMPORT_C TIntScrollDisplayLinesL(TInt &aDeltaLines,
CTextLayout::TAllowDisallowaScrollBlankSpace = CTextLayout::EFDisallowScrollingBlankSpace
)

Parameters

TInt & aDeltaLines
CTextLayout::TAllowDisallow aScrollBlankSpace = CTextLayout::EFDisallowScrollingBlankSpace

ScrollDisplayParagraphsL(TInt &, CTextLayout::TAllowDisallow)

IMPORT_C TIntScrollDisplayParagraphsL(TInt &aDeltaParas,
CTextLayout::TAllowDisallowaScrollBlankSpace = CTextLayout::EFDisallowScrollingBlankSpace
)

Parameters

TInt & aDeltaParas
CTextLayout::TAllowDisallow aScrollBlankSpace = CTextLayout::EFDisallowScrollingBlankSpace

ScrollDisplayPixelsL(TInt &)

IMPORT_C voidScrollDisplayPixelsL(TInt &aDeltaY)

Parameters

TInt & aDeltaY

ScrollDisplayPixelsNoLimitBorderL(TInt)

IMPORT_C voidScrollDisplayPixelsNoLimitBorderL(TIntaDeltaY)

Parameters

TInt aDeltaY

ScrollRect(TRect &, TInt, TInt, TInt, TBool)

voidScrollRect(TRect &aRect,
TIntaScrollY,
TIntaFrom,
TIntaScrollX,
TBoolaScrollBackground
)[private]

Parameters

TRect & aRect
TInt aScrollY
TInt aFrom
TInt aScrollX
TBool aScrollBackground

ScrollRect(TInt, TInt &, TInt &)

voidScrollRect(TIntaScrollY,
TInt &aFrom,
TInt &aTo
)[private]

Parameters

TInt aScrollY
TInt & aFrom
TInt & aTo

ScrollTextL(TInt, TInt, TInt, TBool)

voidScrollTextL(TIntaScrollY,
TIntaFrom,
TIntaScrollX,
TBoolaScrollBackground
)[private]

Parameters

TInt aScrollY
TInt aFrom
TInt aScrollX
TBool aScrollBackground

Selection()

IMPORT_C TCursorSelectionSelection()const

SelectionVisible()

IMPORT_C TBoolSelectionVisible()const

SetBackgroundColor(TRgb)

IMPORT_C voidSetBackgroundColor(TRgbaColor)

Parameters

TRgb aColor

SetCursorExtensions(TInt, TInt)

IMPORT_C voidSetCursorExtensions(TIntaFirstExtension,
TIntaSecondExtension
)

Parameters

TInt aFirstExtension
TInt aSecondExtension

SetCursorFlash(TBool)

IMPORT_C voidSetCursorFlash(TBoolaEnabled)

Parameters

TBool aEnabled

SetCursorPlacement(TTmCursorPlacement)

IMPORT_C voidSetCursorPlacement(TTmCursorPlacementaPlacement)

Parameters

TTmCursorPlacement aPlacement

SetCursorPositioningHintL(TCursorPosition::TPosHint)

IMPORT_C voidSetCursorPositioningHintL(TCursorPosition::TPosHintaHint)

Parameters

TCursorPosition::TPosHint aHint

SetCursorVisibilityL(TUint, TUint)

IMPORT_C voidSetCursorVisibilityL(TUintaLineCursor,
TUintaTextCursor
)

Parameters

TUint aLineCursor
TUint aTextCursor

SetCursorWeight(TInt)

IMPORT_C voidSetCursorWeight(TIntaWeight)

Parameters

TInt aWeight

SetCursorWidthTypeL(TTextCursor::EType, TInt)

IMPORT_C voidSetCursorWidthTypeL(TTextCursor::ETypeaType,
TIntaWidth = 0
)

Parameters

TTextCursor::EType aType
TInt aWidth = 0

SetCursorXorColor(TRgb)

IMPORT_C voidSetCursorXorColor(TRgbaColor)

Parameters

TRgb aColor

SetDisplayContextL(CBitmapDevice *, RWindow *, RWindowGroup *, RWsSession *)

IMPORT_C voidSetDisplayContextL(CBitmapDevice *aGd,
RWindow *aWin,
RWindowGroup *aGroupWin,
RWsSession *aSession
)

Parameters

CBitmapDevice * aGd
RWindow * aWin
RWindowGroup * aGroupWin
RWsSession * aSession

SetDocPosL(const TTmDocPosSpec &, TBool)

IMPORT_C TPointSetDocPosL(const TTmDocPosSpec &aDocPos,
TBoolaDragSelectOn = EFalse
)

Parameters

const TTmDocPosSpec & aDocPos
TBool aDragSelectOn = EFalse

SetDocPosL(TInt, TBool)

IMPORT_C TPointSetDocPosL(TIntaDocPos,
TBoolaDragSelectOn = EFalse
)

Parameters

TInt aDocPos
TBool aDragSelectOn = EFalse

SetDocPosL(const TTmDocPos &, TBool)

IMPORT_C TPointSetDocPosL(const TTmDocPos &aDocPos,
TBoolaDragSelectOn = EFalse
)

Parameters

const TTmDocPos & aDocPos
TBool aDragSelectOn = EFalse

SetExcessHeightRequired(TInt)

IMPORT_C voidSetExcessHeightRequired(TIntaExcessHeightRequired)

Parameters

TInt aExcessHeightRequired

SetHighlightExtensions(TInt, TInt, TInt, TInt)

IMPORT_C voidSetHighlightExtensions(TIntaLeftExtension,
TIntaRightExtension,
TIntaTopExtension,
TIntaBottomExtension
)

Parameters

TInt aLeftExtension
TInt aRightExtension
TInt aTopExtension
TInt aBottomExtension

SetHorizontalScrollJump(TInt)

IMPORT_C voidSetHorizontalScrollJump(TIntaScrollJump)

Parameters

TInt aScrollJump

SetLatentXPosition(TInt)

IMPORT_C voidSetLatentXPosition(TIntaLatentX)

Parameters

TInt aLatentX

SetLayout(CTextLayout *)

IMPORT_C voidSetLayout(CTextLayout *aLayout)

Parameters

CTextLayout * aLayout

SetLeftTextMargin(TInt)

IMPORT_C voidSetLeftTextMargin(TIntaLeftMargin)

Parameters

TInt aLeftMargin

SetLineCursorBitmap(const CFbsBitmap *)

IMPORT_C voidSetLineCursorBitmap(const CFbsBitmap *aLineCursorBitmap)

Parameters

const CFbsBitmap * aLineCursorBitmap

SetMarginWidths(TInt, TInt)

IMPORT_C voidSetMarginWidths(TIntaLabels,
TIntaLineCursor
)

Parameters

TInt aLabels
TInt aLineCursor

SetObserver(MObserver *)

voidSetObserver(MObserver *aObserver)[inline]

Sets a text view observer. This provides notification to the owner of the text view object of changes to the formatting. Its OnReformatL() function is called after reformatting but before redisplay, so that edit windows etc. can be resized.

Parameters

MObserver * aObserverPointer to text view observer object.

SetOpaque(TBool)

IMPORT_C voidSetOpaque(TBoolaDrawOpaque)

Parameters

TBool aDrawOpaque

SetParagraphFillTextOnly(TBool)

IMPORT_C voidSetParagraphFillTextOnly(TBoolaFillTextOnly)

Parameters

TBool aFillTextOnly

SetPendingSelection(const TCursorSelection &)

IMPORT_C voidSetPendingSelection(const TCursorSelection &aSelection)

Parameters

const TCursorSelection & aSelection

SetSelectionL(const TCursorSelection &)

IMPORT_C TPointSetSelectionL(const TCursorSelection &aSelection)

Parameters

const TCursorSelection & aSelection

SetSelectionVisibilityL(TBool)

IMPORT_C voidSetSelectionVisibilityL(TBoolaSelectionVisible)

Parameters

TBool aSelectionVisible

SetTextColorOverride(const TRgb *)

IMPORT_C voidSetTextColorOverride(const TRgb *aOverrideColor = NULL)

Parameters

const TRgb * aOverrideColor = NULL

SetViewL(TInt, TInt &, TViewYPosQualifier, TDiscard, TDoHorizontalScroll)

IMPORT_C TPointSetViewL(TIntaDocPos,
TInt &aYPos,
TViewYPosQualifieraYPosQualifier =  TViewYPosQualifier(),
TDiscardaDiscardFormat = EFViewDontDiscardFormat,
TDoHorizontalScrollaDoHorizontalScroll = EFCheckForHorizontalScroll
)

Parameters

TInt aDocPos
TInt & aYPos
TViewYPosQualifier aYPosQualifier =  TViewYPosQualifier()
TDiscard aDiscardFormat = EFViewDontDiscardFormat
TDoHorizontalScroll aDoHorizontalScroll = EFCheckForHorizontalScroll

SetViewLineAtTopL(TInt)

IMPORT_C TPointSetViewLineAtTopL(TIntaLineNo)

Parameters

TInt aLineNo

SetViewRect(const TRect &)

IMPORT_C voidSetViewRect(const TRect &aDisplay)

Parameters

const TRect & aDisplay

SetXyPosL(TPoint, TBool, TRect *&, TInt &)

IMPORT_C TPointSetXyPosL(TPointaPos,
TBoolaDragSelectOn,
TRect *&aPictureRect,
TInt &aPictureFrameEdges
)

Parameters

TPoint aPos
TBool aDragSelectOn
TRect *& aPictureRect
TInt & aPictureFrameEdges

StartIdleObject()

voidStartIdleObject()[private]

TopViewRect()

TInt TopViewRect()const [private, inline]

UpdateHighlightL()

voidUpdateHighlightL()[private]

UpdatePictureFrameL()

voidUpdatePictureFrameL()[private]

ViewL(const TTmDocPos &, TInt &, TViewYPosQualifier, CTextView::TDiscard, TDoHorizontalScroll)

TPoint ViewL(const TTmDocPos &aDocPos,
TInt &aYPos,
TViewYPosQualifieraYPosQualifier =  TViewYPosQualifier(),
CTextView::TDiscardaDiscardFormat = EFViewDontDiscardFormat,
TDoHorizontalScrollaHorizontalScroll = EFCheckForHorizontalScroll
)[private]

Parameters

const TTmDocPos & aDocPos
TInt & aYPos
TViewYPosQualifier aYPosQualifier =  TViewYPosQualifier()
CTextView::TDiscard aDiscardFormat = EFViewDontDiscardFormat
TDoHorizontalScroll aHorizontalScroll = EFCheckForHorizontalScroll

ViewRect()

IMPORT_C const TRect &ViewRect()const

ViewTopOfLineL(const TTmDocPos &, TInt &, CTextView::TDiscard, TDoHorizontalScroll)

TPoint ViewTopOfLineL(const TTmDocPos &aDocPos,
TInt &aYPos,
CTextView::TDiscardaDiscardFormat = EFViewDontDiscardFormat,
TDoHorizontalScrollaHorizontalScroll = EFCheckForHorizontalScroll
)[private]

Parameters

const TTmDocPos & aDocPos
TInt & aYPos
CTextView::TDiscard aDiscardFormat = EFViewDontDiscardFormat
TDoHorizontalScroll aHorizontalScroll = EFCheckForHorizontalScroll

VisualEndOfRunL(const TTmDocPos &, const TTmDocPos &, TCursorPosition::TVisualEnd)

IMPORT_C const TTmDocPos &VisualEndOfRunL(const TTmDocPos &aStart,
const TTmDocPos &aEnd,
TCursorPosition::TVisualEndaDirection
)

Parameters

const TTmDocPos & aStart
const TTmDocPos & aEnd
TCursorPosition::TVisualEnd aDirection

XyPosToDocPosL(TPoint &)

IMPORT_C TIntXyPosToDocPosL(TPoint &aPoint)

Parameters

TPoint & aPoint

Member Enumerations Documentation

Enum anonymous

deprecated 8.0

Enumerators

EFFirstCharOnLine = -1000000
EFLastCharOnLine = 1000000

Enum anonymous

Enumerators

EFSelectionVisible = 1
EFPictureFrameEnabled = 2
EFEverythingVisible = 3
EFFlickerFreeRedraw = 4
EFTextVisible = 8

Enum TBeforeAfter

Cursor height matching.

Passed as an argument to MatchCursorHeightToAdjacentChar().

Enumerators

EFCharacterBefore = ETrue

Text cursor height is matched to preceding character.

EFCharacterAfter = EFalse

Text cursor height is matched to following character.

Enum TDiscard

Whether to reformat and redraw. Argument to SetViewL().

Enumerators

EFViewDiscardAllFormat

Discard all formatting; redraw.

EFViewDontDiscardFormat

Do not discard all formatting; redraw.

EFViewDiscardAllNoRedraw

Discard all formatting; no redraw.

EFViewDontDiscardFullRedraw

Do not discard all formatting; redraw.

Enum TDoHorizontalScroll

Enumerators

EFNoHorizontalScroll = EFalse
EFCheckForHorizontalScroll = ETrue

Enum TDrawParameters

Enumerators

EFDrawAllWindow = CLayoutData::EFLargeNumber

Enum TExtendedHighlightRedraw

Enumerators

EFTopEdge = 0x0001
EFBottomEdge = 0x0002

Enum THorizontalScroll

Enumerators

EFNoPreviousHorizontalScroll = 0
EFPreviousHorizontalScroll

Enum THorizontalScrollJump

Enumerators

EFDefaultHorizontalScrollJump = 20

Enum TMemoryStatus

Enumerators

EFMemoryOK
EFOutOfMemory
EFRecovering

Enum TPictureFrameBlobWidths

Enumerators

EFFrameVisibleBlobWidth = 10
EFFrameActiveBlobWidth = 20

Enum TPriorities

Enumerators

EFBackgroundFormattingPriority = (CActive::EPriorityIdle + CActive::EPriorityLow) / 2

Member Data Documentation

TBool iContextIsNavigation

TBool iContextIsNavigation[private]

TCursor iCursor

TCursor iCursor[private]

TCursorPosition iCursorPos

TCursorPosition iCursorPos[private]

RScreenDisplay iDisplay

RScreenDisplay iDisplay[private]

TBool iDrawOpaque

TBool iDrawOpaque[private]

TDrawTextLayoutContext iDrawTextLayoutContext

TDrawTextLayoutContext iDrawTextLayoutContext[private]

TUint iDummy

TUint iDummy[private]

TUint iFlags

TUint iFlags[private]

TInt iFormattedUpTo

TInt iFormattedUpTo[private]

TInt iGood

TInt iGood[private]

TInt iHeightNotDrawn

TInt iHeightNotDrawn[private]

TUint iHorizontalScroll

TUint iHorizontalScroll[private]

TInt iHorizontalScrollJump

TInt iHorizontalScrollJump[private]

CTextLayout * iLayout

CTextLayout *iLayout[private]

TMemoryStatus iNoMemory

TMemoryStatus iNoMemory[private]

MObserver * iObserver

MObserver *iObserver[private]

CBitmapContext * iOffScreenContext

CBitmapContext *iOffScreenContext[private]

TFrameOverlay * iPictureFrame

TFrameOverlay *iPictureFrame[private]

TRect iReducedDrawingAreaRect

TRect iReducedDrawingAreaRect[private]

CIdle * iWrap

CIdle *iWrap[private]