Location:
FRMTLAY.H
class TCursorSelection;
The cursor or cursor selection within a document.
If the cursor and anchor position differ, the selection covers the text from the lower to the higher position, not including the character after the higher position. If the selection is changed (by shift plus arrow keys in many UIs) the cursor position changes and the anchor remains the same.
Defined in TCursorSelection
:
HigherPos()
, Length()
, LowerPos()
, SetSelection()
, TCursorSelection()
, TCursorSelection()
, iAnchorPos
, iCursorPos
inline TCursorSelection();
Constructs the TCursorSelection object initialising the cursor and anchor positions to zero.
inline TCursorSelection(TInt aCursorPos, TInt aAnchorPos);
Constructs the TCursorSelection object with a cursor and anchor position.
|
inline void SetSelection(TInt aCursorPos, TInt aAnchorPos);
Sets the cursor and anchor positions for the selection.
|
inline TInt LowerPos() const;
Gets the lesser of the cursor and anchor positions.
|
inline TInt HigherPos() const;
Gets the greater of the cursor and anchor positions.
|
inline TInt Length() const;
Returns the number of characters in the selected range.
|
TInt iAnchorPos;
The anchor position.