TCursor Class Reference

class TCursor

Visibility of line and text cursor.

The TVisibility enumeration defined in this class is used in calls to CTextView::SetCursorVisibilityL(). The remainder of this class does not form part of the API.

Constructor & Destructor Documentation

TCursor(TCursorPosition &, RScreenDisplay &)

TCursor(TCursorPosition &aCursorPos,
RScreenDisplay &aDisplay
)

Parameters

TCursorPosition & aCursorPos
RScreenDisplay & aDisplay

Member Functions Documentation

Draw(TUint)

voidDraw(TUintaCursors)

Draws the specified cursors.

Parameters

TUint aCursors

DrawLineCursor(TInt)

voidDrawLineCursor(TIntaHeight)[private]

Parameters

TInt aHeight

DrawTextCursor(TPoint, TInt, TInt, TInt)

voidDrawTextCursor(TPointaOrigin,
TIntaWidth,
TIntaAscent,
TIntaDescent
)[private]

Draws the text cursor.

Parameters

TPoint aOrigin
TInt aWidth
TInt aAscent
TInt aDescent

LineCursorVisibility()

TUint LineCursorVisibility()[inline]

MatchCursorHeightToAdjacentChar()

voidMatchCursorHeightToAdjacentChar()

Sets the cursor so that when it is next drawn its metrics will match those of adjacent text: cancels any overriding metrics. Does not redraw.

RemoveLineCursor()

voidRemoveLineCursor()[private]

RemoveTextCursor()

voidRemoveTextCursor()[private]

Removes the text cursor only if it is currently visible in this window.

SetAscentAndDescent(TInt, TInt)

voidSetAscentAndDescent(TIntaAscent,
TIntaDescent
)

Sets the ascent and descent of the text cursor in pixels and redraw it. To use the ascent or descent of the adjacent character pass a value of -1.

Parameters

TInt aAscent
TInt aDescent

SetExtensions(TInt, TInt)

voidSetExtensions(TIntaFirstExtension,
TIntaSecondExtension
)

Parameters

TInt aFirstExtension
TInt aSecondExtension

SetFlash(TBool)

voidSetFlash(TBoolaEnabled)

Sets the flashing state of the cursor and redraws it.

Parameters

TBool aEnabled

SetLineCursorBitmap(const CFbsBitmap *)

voidSetLineCursorBitmap(const CFbsBitmap *aLineCursorBitmap)

Parameters

const CFbsBitmap * aLineCursorBitmap

SetPlacement(TTmCursorPlacement)

voidSetPlacement(TTmCursorPlacementaPlacement)

Parameters

TTmCursorPlacement aPlacement

SetType(TTextCursor::EType)

voidSetType(TTextCursor::ETypeaType)

Parameters

TTextCursor::EType aType

SetVisibility(TVisibility, TVisibility)

voidSetVisibility(TVisibilityaLineCursor,
TVisibilityaTextCursor
)

Parameters

TVisibility aLineCursor
TVisibility aTextCursor

SetWeight(TInt)

voidSetWeight(TIntaWeight)

Changes the cursor weight and redraws it.

Parameters

TInt aWeight

SetXorColor(TRgb)

voidSetXorColor(TRgbaColor)

Sets the XOR colour of the cursor and redraws it.

Parameters

TRgb aColor

TextCursorVisibility()

TUint TextCursorVisibility()[inline]

Member Enumerations Documentation

Enum anonymous

Enumerators

ELineCursorToLabelGap = 2
ETextCursorWeight = 3
ETextCursorInvertColor = 0xFFFFFF

Enum TCursors

Enumerators

EFNeitherCursor = 0
EFTextCursor = 1
EFLineCursor = 2
EFBothCursors = EFTextCursor | EFLineCursor

Enum TVisibility

Cursor visibility

Enumerators

EFCursorInvisible = 0

Indicates that the cursor should be invisible.

EFCursorVisible

Indicates that the cursor should be visible.

EFCursorFlashing

Indicates a flashing text cursor. When specified for the line cursor, is equivalent to EFCursorVisible, as the line cursor cannot flash. Note that a non-flashing text cursor should only be used when there is to be no editing, reformatting, scrolling or cursor movement.

Member Data Documentation

TInt iAscent

TInt iAscent[private]

TCursorPosition & iCursorPos

TCursorPosition &iCursorPos[private]

TInt iDescent

TInt iDescent[private]

RScreenDisplay & iDisplay

RScreenDisplay &iDisplay[private]

TInt iFirstExtension

TInt iFirstExtension[private]

TBool iFlash

TBool iFlash[private]

TVisibility iLineCursor

TVisibility iLineCursor[private]

const CFbsBitmap * iLineCursorBitmap

const CFbsBitmap *iLineCursorBitmap[private]

TTmCursorPlacement iPlacement

TTmCursorPlacement iPlacement[private]

TInt iReserved

TInt iReserved[private]

TInt iSecondExtension

TInt iSecondExtension[private]

TVisibility iTextCursor

TVisibility iTextCursor[private]

TTextCursor::EType iType

TTextCursor::EType iType[private]

TBool iVisible

TBool iVisible[private]

TInt iWeight

TInt iWeight[private]

TRgb iXorColor

TRgb iXorColor[private]