Navigation
API > API/Runtime > API/Runtime/Slate
Store the information about the current cursor position
| Name | FCursorInfo |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Text/SlateEditableTextTypes.h |
| Include Path | #include "Widgets/Text/SlateEditableTextTypes.h" |
Syntax
class FCursorInfo
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCursorInfo() |
Widgets/Text/SlateEditableTextTypes.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CursorAlignment | ECursorAlignment | Cursor alignment (horizontal) within its position. | Widgets/Text/SlateEditableTextTypes.h | |
| CursorPosition | FTextLocation | Current cursor position; there is always one. | Widgets/Text/SlateEditableTextTypes.h | |
| CursorTextDirection | TextBiDi::ETextDirection | The direction of the text under the cursor | Widgets/Text/SlateEditableTextTypes.h | |
| LastCursorInteractionTime | double | Last time the user did anything with the cursor. | Widgets/Text/SlateEditableTextTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCursorInfo CreateUndo() |
Create an undo for this cursor data | Widgets/Text/SlateEditableTextTypes.h | |
ECursorAlignment GetCursorAlignment() |
Get the alignment of the cursor | Widgets/Text/SlateEditableTextTypes.h | |
FTextLocation GetCursorInteractionLocation() |
Get the interaction position of the cursor (where to insert, delete, etc, text from/to) | Widgets/Text/SlateEditableTextTypes.h | |
FTextLocation GetCursorLocation() |
Get the literal position of the cursor (note: this may not be the correct place to insert text to, use GetCursorInteractionLocation for that) | Widgets/Text/SlateEditableTextTypes.h | |
TextBiDi::ETextDirection GetCursorTextDirection() |
Get the direction of the text under the cursor | Widgets/Text/SlateEditableTextTypes.h | |
double GetLastCursorInteractionTime() |
Widgets/Text/SlateEditableTextTypes.h | ||
void RestoreFromUndo
(
const FCursorInfo& UndoData |
Restore this cursor data from an undo | Widgets/Text/SlateEditableTextTypes.h | |
void SetCursorLocationAndAlignment
(
const FTextLayout& InTextLayout, |
Set the literal position and alignment of the cursor | Widgets/Text/SlateEditableTextTypes.h | |
void SetCursorLocationAndCalculateAlignment
(
const FTextLayout& InTextLayout, |
Set the position of the cursor, and then work out the correct alignment based on the current text layout | Widgets/Text/SlateEditableTextTypes.h | |
void UpdateLastCursorInteractionTime() |
Update the last cursor interaction time to now | Widgets/Text/SlateEditableTextTypes.h |