#include <frmtlay.h>
class TCursorSelection |
Public Attributes | |
---|---|
TInt | iAnchorPos |
TInt | iCursorPos |
Public Member Functions | |
---|---|
TCursorSelection() | |
TCursorSelection(TInt, TInt) | |
TInt | HigherPos() |
TInt | Length() |
TInt | LowerPos() |
void | SetSelection(TInt, TInt) |
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.
TCursorSelection | ( | ) | [inline] |
Constructs the TCursorSelection object initialising the cursor and anchor positions to zero.
Constructs the TCursorSelection object with a cursor and anchor position.
Parameter | Description |
---|---|
aCursorPos | The cursor position. |
aAnchorPos | The anchor position. |
TInt | HigherPos | ( | ) | const [inline] |
Gets the greater of the cursor and anchor positions.
Returns: The greater of the cursor and anchor positions.
TInt | Length | ( | ) | const [inline] |
Returns the number of characters in the selected range.
Returns: The length of the selection.
TInt | LowerPos | ( | ) | const [inline] |
Gets the lesser of the cursor and anchor positions.
Returns: The lesser of the cursor and anchor positions.