class TCursorPosition |
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.
Private Member Functions | |
---|---|
TBool | CalculateCursorPos(TPoint &) |
TInt | CheckCursorOnScreenL(TInt &) |
void | CheckNullSelection() |
void | CheckSelection(TBool) |
TInt | DoSetDocPosL(const TTmDocPos &) |
TInt | DoSetVisibleDocPosL(const TTmDocPos &) |
void | DoSetXyPos(TPoint &) |
TBool | LeftRightL(TTmPosInfo2 &, TTmLineInfo &, TMovementType &) |
TInt | PageScrollL(TMovementType &) |
void | SetPictureFrame(const TTmDocPos &, TInt, const TRect &) |
void | StartEnd(TTmPosInfo2 &, TTmLineInfo &, TMovementType &) |
void | UpDownL(TTmPosInfo2 &, TTmLineInfo &, TMovementType &) |
void | UpdateLatentY(TInt) |
TInt | ViewTopOfLineL(const TTmDocPos &, TInt &) |
Public Member Enumerations | |
---|---|
enum | TMovementType { EFNoMovement, EFLeft, EFRight, EFLineUp, EFLineDown, EFPageUp, EFPageDown, EFLineBeg, EFLineEnd } |
enum | TPosHint { EPosHintUndefined = 0, EInsertStrongL2R = 1, EInsertStrongR2L = 2, EPosHintLast } |
enum | TVisualEnd { EVisualLeft, EVisualRight } |
Private Member Enumerations | |
---|---|
enum | anonymous { EFAbove = -1, EFInside = 0, EFBelow = 1 } |
enum | anonymous { EDrawHighlight = 1, EDrawOldPictureFrame = 2, EDrawNewPictureFrame = 4, EReturnPreviousHighlight = 8, ESelected = 16 } |
Private Attributes | |
---|---|
TInt | iAnchor |
TTmDocPos | iDocPos |
TUint | iFlags |
TInt | iLatentX |
TInt | iLatentY |
CTextLayout * | iLayout |
TInt | iOldAnchor |
TInt | iOldDocPos |
TPosHint | iPositioningHint |
TCursorPosition | ( | ) | [inline] |
Constructs the TCursorPosition object, initializing its members iAnchor, iOldDocPos, iOldAnchor, iFlags, iLatentX, iLatentY to zero, iLayout to NULL, and iPositioningHint to undefined.
TBool | CalculateCursorPos | ( | TPoint & | aCurPos | ) | [private, inline] |
Caculate x-y position of the cursor If ETrue is returned, places the position of the intersection of the character edge with the baseline in aPos ETrue if the document is in the formatted text, otherwise EFalse.
TPoint & aCurPos | On return, stores the position of the intersection of the character edge with the baseline |
void | CancelHighlight | ( | ) | [inline] |
Removes the selection, and redraws the affected part of the screen.
TTmPosInfo2 & | ChoosePosition | ( | TTmPosInfo2 & | aPreferred, |
TTmPosInfo2 & | aBackup | |||
) |
TTmPosInfo2 & aPreferred | |
TTmPosInfo2 & aBackup |
TInt | DoSetDocPosL | ( | const TTmDocPos & | aDocPos | ) | [private] |
const TTmDocPos & aDocPos |
TInt | DoSetVisibleDocPosL | ( | const TTmDocPos & | aDocPos | ) | [private] |
const TTmDocPos & aDocPos |
TInt | DocPos | ( | ) | const [inline] |
Gets the edge position in the document. 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 True if the highlighted region needs to be drawn. False if not.
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 True if there is a new picture frame that needs to be drawn. False if not.
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 True if there is a previous picture frame that needs to be drawn. False if not.
TBool | GetCursor | ( | TTmCursorPlacement | aPlacement, |
TPoint & | aOrigin, | |||
TInt & | aWidth, | |||
TInt & | aAscent, | |||
TInt & | aDescent | |||
) | const |
TTmCursorPlacement aPlacement | |
TPoint & aOrigin | |
TInt & aWidth | |
TInt & aAscent | |
TInt & aDescent |
void | GetOldSelection | ( | TCursorSelection & | aSelection | ) | const |
TCursorSelection & aSelection |
void | GetSelection | ( | TCursorSelection & | aSelection | ) | const |
TCursorSelection & aSelection |
TBool | IsSelection | ( | ) | const [inline] |
Tests whether there is currently a selected region. True if there is a selected region. False if not.
TBool | IsSelectionToDraw | ( | ) | const [inline] |
Tests whether there is currently a highlighted region being drawn. True if there is a selected region. False if not.
TBool | LeftRightL | ( | TTmPosInfo2 & | aPos, |
TTmLineInfo & | aLine, | |||
TMovementType & | aMove | |||
) | [private] |
TTmPosInfo2 & aPos | |
TTmLineInfo & aLine | |
TMovementType & aMove |
TInt | MoveL | ( | TBool | aDragSelectOn, |
TMovementType & | aMovement, | |||
TBool | aAllowPictureFrame | |||
) |
TBool aDragSelectOn | |
TMovementType & aMovement | |
TBool aAllowPictureFrame |
TInt | PageScrollL | ( | TMovementType & | aMove | ) | [private] |
TMovementType & aMove |
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.
const TTmDocPos & aDocPos | the document position |
void | SetLayout | ( | CTextLayout * | aLayout | ) | [inline] |
Sets the text layout which TCursorPosition is related.
CTextLayout * aLayout | The text layout. |
void | SetPendingSelection | ( | const TCursorSelection & | aSelection | ) |
const TCursorSelection & aSelection |
void | SetPictureFrame | ( | const TTmDocPos & | aDocPos, |
TInt | aAnchor, | |||
const TRect & | aPictureRect | |||
) | [private] |
TInt | SetSelectionL | ( | const TCursorSelection & | aSelection | ) |
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.
TInt | SetXyPosL | ( | TBool | aDragSelectOn, |
TPoint | aPos, | |||
TBool | aAllowPictureFrame | |||
) |
void | StartEnd | ( | TTmPosInfo2 & | aPos, |
TTmLineInfo & | aLine, | |||
TMovementType & | aMove | |||
) | [private] |
TTmPosInfo2 & aPos | |
TTmLineInfo & aLine | |
TMovementType & aMove |
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. the document position
void | UpDownL | ( | TTmPosInfo2 & | aPos, |
TTmLineInfo & | aLine, | |||
TMovementType & | aMove | |||
) | [private] |
TTmPosInfo2 & aPos | |
TTmLineInfo & aLine | |
TMovementType & aMove |
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.
TInt aX | The horizontal coordinate to which the text cursor should be moved |
void | UpdateLatentY | ( | TInt | aY | ) | [private, inline] |
Sets the latent vertical text cursor position. This is the vertical coordinate to which the text cursor will be moved.
TInt aY | The vertical coordinate to which the text cursor should be moved |
TInt | ViewTopOfLineL | ( | const TTmDocPos & | aDocPos, |
TInt & | aYPos | |||
) | [private] |
const TTmDocPos & | VisualEndOfRunL | ( | const TTmDocPos & | aStart, |
const TTmDocPos & | aEnd, | |||
TVisualEnd | aDirection | |||
) |
const TTmDocPos & aStart | |
const TTmDocPos & aEnd | |
TVisualEnd aDirection |
EDrawHighlight = 1 | |
EDrawOldPictureFrame = 2 | |
EDrawNewPictureFrame = 4 | |
EReturnPreviousHighlight = 8 | |
ESelected = 16 |
Direction of cursor movement.
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 |
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.
EVisualLeft |
Leftmost end. |
EVisualRight |
Rightmost end. |