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)

void Draw ( TUint aCursors )

Draws the specified cursors.

Parameters

TUint aCursors

DrawLineCursor(TInt)

void DrawLineCursor ( TInt aHeight ) [private]

Parameters

TInt aHeight

DrawTextCursor(TPoint, TInt, TInt, TInt)

void DrawTextCursor ( TPoint aOrigin,
TInt aWidth,
TInt aAscent,
TInt aDescent
) [private]

Draws the text cursor.

Parameters

TPoint aOrigin
TInt aWidth
TInt aAscent
TInt aDescent

LineCursorVisibility()

TUint LineCursorVisibility ( ) [inline]

MatchCursorHeightToAdjacentChar()

void MatchCursorHeightToAdjacentChar ( )

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()

void RemoveLineCursor ( ) [private]

RemoveTextCursor()

void RemoveTextCursor ( ) [private]

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

SetAscentAndDescent(TInt, TInt)

void SetAscentAndDescent ( TInt aAscent,
TInt aDescent
)

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)

void SetExtensions ( TInt aFirstExtension,
TInt aSecondExtension
)

Parameters

TInt aFirstExtension
TInt aSecondExtension

SetFlash(TBool)

void SetFlash ( TBool aEnabled )

Sets the flashing state of the cursor and redraws it.

Parameters

TBool aEnabled

SetLineCursorBitmap(const CFbsBitmap *)

void SetLineCursorBitmap ( const CFbsBitmap * aLineCursorBitmap )

Parameters

const CFbsBitmap * aLineCursorBitmap

SetPlacement(TTmCursorPlacement)

void SetPlacement ( TTmCursorPlacement aPlacement )

Parameters

TTmCursorPlacement aPlacement

SetType(TTextCursor::EType)

void SetType ( TTextCursor::EType aType )

Parameters

TTextCursor::EType aType

SetVisibility(TVisibility, TVisibility)

void SetVisibility ( TVisibility aLineCursor,
TVisibility aTextCursor
)

Parameters

TVisibility aLineCursor
TVisibility aTextCursor

SetWeight(TInt)

void SetWeight ( TInt aWeight )

Changes the cursor weight and redraws it.

Parameters

TInt aWeight

SetXorColor(TRgb)

void SetXorColor ( TRgb aColor )

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]