#include <frmtlay.h>
Link against: form.lib
class TCursorPosition |
Public Member Enumerations | |
---|---|
enum | TMovementType { EFNoMovement, EFLeft, EFRight, EFLineUp, ..., EFLineEnd } |
enum | TPosHint { EPosHintUndefined, EInsertStrongL2R, EInsertStrongR2L, EPosHintLast } |
enum | TVisualEnd { EVisualLeft, EVisualRight } |
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.
Direction of cursor movement.
Enumerator | Value | Description |
---|---|---|
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 |
Enumerator | Value | Description |
---|---|---|
EPosHintUndefined | 0 | |
EInsertStrongL2R | 1 |
Left to right typing expected. |
EInsertStrongR2L | 2 |
Right to left typing expected. |
EPosHintLast |
Selection of the left end or right end of a run of text.
Enumerator | Value | Description |
---|---|---|
EVisualLeft |
Leftmost end. | |
EVisualRight |
Rightmost end. |
TCursorPosition | ( | ) | [inline] |
Constructs the TCursorPosition object, initializing its members iAnchor, iOldDocPos, iOldAnchor, iFlags, iLatentX, iLatentY to zero, iLayout to NULL, and iPositioningHint to undefined.
void | CancelHighlight | ( | ) | [inline] |
Removes the selection, and redraws the affected part of the screen.
TTmPosInfo2 & | ChoosePosition | ( | TTmPosInfo2 & | aPreferred, |
TTmPosInfo2 & | aBackup | |||
) |
Returns a reference to the more suitable of the positions, taking the cursor positioning hint into account.
Parameters | |
---|---|
aPreferred | The candidate returned if the positioning hint does not decide it. |
aBackup | The alternative candidate; only returned if the positioning hint makes it more desirable than aPreferred. |
TInt | DocPos | ( | ) | const [inline] |
Gets the edge position in the document.
void | DontDrawOldPictureFrame | ( | ) | [inline] |
Sets to not draw the previous picture frame
TBool | DrawHighlight | ( | ) | const [inline] |
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
TBool | DrawNewPictureFrame | ( | ) | const [inline] |
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
TBool | DrawOldPictureFrame | ( | ) | const [inline] |
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
TBool | GetCursor | ( | TTmCursorPlacement | aPlacement, |
TPoint & | aOrigin, | |||
TInt & | aWidth, | |||
TInt & | aAscent, | |||
TInt & | aDescent | |||
) | const |
void | GetOldSelection | ( | TCursorSelection & | aSelection | ) | const |
void | GetSelection | ( | TCursorSelection & | aSelection | ) | const |
TBool | IsNewPictureFrame | ( | ) | const |
TBool | IsPictureFrame | ( | ) | const |
TBool | IsSelection | ( | ) | const [inline] |
Tests whether there is currently a selected region.
TBool | IsSelectionToDraw | ( | ) | const [inline] |
Tests whether there is currently a highlighted region being drawn.
TInt | MoveL | ( | TBool | aDragSelectOn, |
TMovementType & | aMovement, | |||
TBool | aAllowPictureFrame | |||
) |
TPosHint | PositioningHint | ( | ) | const [inline] |
void | SetDocPos | ( | const TTmDocPos & | aDocPos | ) | [inline] |
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 | |
---|---|
aDocPos | the document position |
void | SetLayout | ( | CTextLayout * | aLayout | ) | [inline] |
Sets the text layout which TCursorPosition is related.
Parameters | |
---|---|
aLayout | The text layout. |
void | SetPendingSelection | ( | const TCursorSelection & | aSelection | ) |
void | SetPositioningHint | ( | TPosHint | aHint | ) | [inline] |
TInt | SetSelectionL | ( | const TCursorSelection & | aSelection | ) |
void | SetToCurrentHighlight | ( | ) | [inline] |
Clears the special flag set in SetToPreviousHighlight() so that GetSelection() and IsPictureFrame() will operate on the current highlight.
void | SetToPreviousHighlight | ( | ) | [inline] |
Sets the flag which directs GetSelection() and IsPictureFrame() to operate on the previous highlight instead of the current highlight.
void | TextMoveVertically | ( | ) |
const TTmDocPos & | TmDocPos | ( | ) | const [inline] |
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.
void | UpdateLatentPosition | ( | ) |
void | UpdateLatentX | ( | TInt | aX | ) | [inline] |
Sets the latent horizontal text cursor position. This is the horizontal coordinate to which the text cursor will be moved.
Parameters | |
---|---|
aX | The horizontal coordinate to which the text cursor should be moved |
const TTmDocPos & | VisualEndOfRunL | ( | const TTmDocPos & | aStart, |
const TTmDocPos & | aEnd, | |||
TVisualEnd | aDirection | |||
) |
Selection of the left end or right end of a run of text. If both ends are in one line, the logical end that is visually in the direction specified will be chosen. If aStart and aEnd are in different lines, then we look at whether aEnd is choosing the end that is furthest forwards or furthest back by comparing it against the directionality of the paragraph containing aStart.