Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: FRMTLAY.H
Link against: form.lib

Class TCursorPosition

class TCursorPosition;

Description

Cursor position.

The TMovementType enum defined in this class is used to indicate the direction of a scroll or cursor movement. The remainder of this class does not form part of the API.

Members

Defined in TCursorPosition:
CancelHighlight(), DocPos(), DontDrawOldPictureFrame(), DrawHighlight(), DrawNewPictureFrame(), DrawOldPictureFrame(), EFLeft, EFLineBeg, EFLineDown, EFLineEnd, EFLineUp, EFNoMovement, EFPageDown, EFPageUp, EFRight, EInsertStrongL2R, EInsertStrongR2L, EPosHintLast, EPosHintUndefined, EVisualLeft, EVisualRight, IsSelection(), IsSelectionToDraw(), PositioningHint(), SetDocPos(), SetLayout(), SetPositioningHint(), SetToCurrentHighlight(), SetToPreviousHighlight(), TCursorPosition(), TMovementType, TPosHint, TVisualEnd, TmDocPos(), UpdateLatentX()


Construction and destruction


TCursorPosition()

inline TCursorPosition();

Description

Constructs the TCursorPosition object, initializing its members iAnchor, iOldDocPos, iOldAnchor, iFlags, iLatentX, iLatentY to zero, iLayout to NULL, and iPositioningHint to undefined.

[Top]


Member functions


SetLayout()

inline void SetLayout(CTextLayout *aLayout);

Description

Sets the text layout which TCursorPosition is related.

Parameters

CTextLayout *aLayout

The text layout.


UpdateLatentX()

inline void UpdateLatentX(TInt aX);

Description

Sets the latent horizontal text cursor position. This is the horizontal coordinate to which the text cursor will be moved.

Parameters

TInt aX

The horizontal coordinate to which the text cursor should be moved


SetToPreviousHighlight()

inline void SetToPreviousHighlight();

Description

Sets the flag which directs GetSelection() and IsPictureFrame() to operate on the previous highlight instead of the current highlight.


SetToCurrentHighlight()

inline void SetToCurrentHighlight();

Description

Clears the special flag set in SetToPreviousHighlight() so that GetSelection() and IsPictureFrame() will operate on the current highlight.


CancelHighlight()

inline void CancelHighlight();

Description

Removes the selection, and redraws the affected part of the screen.


SetDocPos()

inline void SetDocPos(const TTmDocPos &aDocPos);

Description

Sets the document position, the structure for holding a raw document position that can be converted to or from an x-y position and compared ordinally, which cannot be done with the more abstract TTmDocPosSpec class.

Parameters

const TTmDocPos &aDocPos

the document position


DontDrawOldPictureFrame()

inline void DontDrawOldPictureFrame();

Description

Sets to not draw the previous picture frame


IsSelection()

inline TBool IsSelection() const;

Description

Tests whether there is currently a selected region.

Return value

TBool

True if there is a selected region. False if not.


IsSelectionToDraw()

inline TBool IsSelectionToDraw() const;

Description

Tests whether there is currently a highlighted region being drawn.

Return value

TBool

True if there is a selected region. False if not.


TmDocPos()

inline const TTmDocPos &TmDocPos() const;

Description

Gets the document position, the structure for holding a raw document position that can be converted to or from an x-y position and compared ordinally, which cannot be done with the more abstract TTmDocPosSpec class.

Return value

const TTmDocPos &

the document position


DocPos()

inline TInt DocPos() const;

Description

Gets the edge position in the document.

Return value

TInt

the edge position in the document.


DrawHighlight()

inline TBool DrawHighlight() const;

Description

Tests whether the highlighted region needs to be drawn. The function will be called by CTextView::UpdateHighlightL() to correct the highlight after a cursor movement

Return value

TBool

True if the highlighted region needs to be drawn. False if not.


DrawOldPictureFrame()

inline TBool DrawOldPictureFrame() const;

Description

Tests whether there is a previous picture frame that needs to be drawn. The function will be called by CTextView::UpdateHighlightL() to correct the highlight after a cursor movement

Return value

TBool

True if there is a previous picture frame that needs to be drawn. False if not.


DrawNewPictureFrame()

inline TBool DrawNewPictureFrame() const;

Description

Tests whether there is a new picture frame that needs to be drawn. The function will be called by CTextView::UpdateHighlightL() to correct the highlight after a cursor movement

Return value

TBool

True if there is a new picture frame that needs to be drawn. False if not.


PositioningHint()

inline TPosHint PositioningHint() const;

Description

Return value

TPosHint


SetPositioningHint()

inline void SetPositioningHint(TPosHint aHint);

Description

Parameters

TPosHint aHint

[Top]


Member enumerations


Enum TMovementType

TMovementType

Description

Direction of cursor movement.

EFNoMovement

No cursor movement

EFLeft

Single character cursor movement to the left

EFRight

Single character cursor movement to the right

EFLineUp

Line up cursor movement

EFLineDown

Line down cursor movement

EFPageUp

Page up cursor movement

EFPageDown

Page down cursor movement

EFLineBeg

Cursor movement to line start

EFLineEnd

Cursor movement to line end


Enum TVisualEnd

TVisualEnd

Description

Selection of the left end or right end of a run of text.

EVisualLeft

Leftmost end.

EVisualRight

Rightmost end.


Enum TPosHint

TPosHint

Description

EPosHintUndefined

EInsertStrongL2R

Left to right typing expected.

EInsertStrongR2L

Right to left typing expected.

EPosHintLast