Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Text
References
| Module | Slate |
| Header | /Engine/Source/Runtime/Slate/Public/Widgets/Text/SlateEditableTextLayout.h |
| Include | #include "Widgets/Text/SlateEditableTextLayout.h" |
Syntax
class FSlateEditableTextLayout
Remarks
Class to handle the cached layout of SEditableText/SMultiLineEditableText by proxying around a FTextLayout
Constructors
| Type | Name | Description | |
|---|---|---|---|
FSlateEditableTextLayout
(
ISlateEditableTextWidget& InOwnerWidget, |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AdvanceSearch
(
const bool InReverse |
Advance the current search to the next match (does nothing if not currently searching) | |
| bool | Query to see if any text is selected within the document | ||
| void | ApplyToSelection
(
const FRunInfo& InRunInfo, |
Apply the given style to the currently selected text (or insert a new run at the current cursor position if no text is selected) | |
| void | Called to begin an undoable editable text transaction | ||
| void | BeginSearch
(
const FText& InSearchText, |
Begin a new text search (this is called automatically when BoundSearchText changes) | |
| TSharedRef< SWidget > | BuildDefaultContextMenu
(
const TSharedPtr< FExtender >& InMenuExtender |
||
| void | CacheDesiredSize
(
float LayoutScaleMultiplier |
||
| bool | Are we able to copy the currently selected text? | ||
| bool | Are we able to cut the currently selected text? | ||
| bool | Are we able to delete the currently selected text? | ||
| bool | Are we able to paste the text from the clipboard into this document? | ||
| bool | Are we currently able to execute a redo action? | ||
| bool | Are we able to execute the "Select All" command? | ||
| bool | Are we currently able to execute an undo action? | ||
| void | Clear the active text selection | ||
| void | Clear the current undo stack | ||
| FVector2D | ComputeDesiredSize
(
float LayoutScaleMultiplier |
||
| bool | |||
| void | Copy the currently selected text and place it on the clipboard | ||
| void | Cut the currently selected text and place it on the clipboard | ||
| void | Delete any currently selected text | ||
| void | Register and activate the IME context for this text layout | ||
| void | Called to end an undoable editable text transaction | ||
| void | ForceRefreshTextLayout
(
const FText& CurrentText |
Force the text layout to be updated from the marshaller | |
| bool | Returns whether or not we are auto wrapping text | ||
| TCHAR | GetCharacterAt
(
const FTextLocation& Location |
Get the character at Location | |
| FChildren * | GetChildren () |
||
| float | Returns the computed wrap location for this layout | ||
| void | GetCurrentTextLine
(
FString& OutTextLine |
Fill OutTextLine with the text line where the current cursor location is at | |
| FTextLocation | Get the interaction position of the cursor (where to insert, delete, etc, text from/to) | ||
| FText | Gets the current editable text for this text block Note: We don't store text in this form (it's stored as lines in the text layout) so every call to this function has to reconstruct it | ||
| FText | GetHintText () |
||
| int32 | Get the total number of search results (0 if none) | ||
| FText | GetPlainText () |
Get the plain text string without rich-text formatting | |
| TSharedPtr< const IRun > | Get the run currently under the cursor, or null if there is no run currently under the cursor | ||
| UE::Slate::FDeprecateVector2DResult | Get the absolute scroll offset value | ||
| int32 | Get the index of the search result (0 if none) | ||
| FText | |||
| TArray< TSharedRef< const IRun > > | Get the runs currently that are current selected, some of which may be only partially selected | ||
| FText | Get the currently selected text | ||
| FTextSelection | GetSelection () |
Get the current selection | |
| UE::Slate::FDeprecateVector2DResult | GetSize () |
||
| FText | GetText () |
||
| TSharedRef< ITextInputMethodContext > | Get the IME context for this text layout | ||
| void | GetTextLine
(
const int32 InLineIndex, |
Fill OutTextLine with the text line at the specified index | |
| int32 | Get the number of Text Lines | ||
| const FTextBlockStyle & | GetTextStyle () |
||
| TSharedRef< IVirtualKeyboardEntry > | Get the virtual keyboard handler for this text layout | ||
| void | GoTo
(
const ETextLocation NewLocation |
Move the cursor specified location | |
| void | GoTo
(
const FTextLocation& NewLocation |
Move the cursor to the given location in the document (will also scroll to this point) | |
| bool | Called to handle a backspace action acting on the current selection or at the cursor position | ||
| bool | HandleCarriageReturn
(
bool isRepeat |
Called to handle a carriage return action acting on the current selection or at the cursor position | |
| bool | HandleDelete () |
Called to handle a delete action acting on the current selection or at the cursor position | |
| bool | HandleEscape () |
Called to handle an escape action acting on the current selection | |
| bool | HandleFocusLost
(
const FFocusEvent& InFocusEvent |
Called when our parent widget loses focus | |
| bool | HandleFocusReceived
(
const FFocusEvent& InFocusEvent |
Called when our parent widget receives focus | |
| FReply | HandleKeyChar
(
const FCharacterEvent& InCharacterEvent |
Called to handle an OnKeyChar event from our parent widget | |
| FReply | HandleKeyDown
(
const FKeyEvent& InKeyEvent |
Called to handle an OnKeyDown event from our parent widget | |
| FReply | HandleKeyUp
(
const FKeyEvent& InKeyEvent |
Called to handle an OnKeyUp event from our parent widget | |
| FReply | HandleMouseButtonDoubleClick
(
const FGeometry& InMyGeometry, |
Called to handle an OnMouseButtonDoubleClick event from our parent widget | |
| FReply | HandleMouseButtonDown
(
const FGeometry& MyGeometry, |
Called to handle an OnMouseButtonDown event from our parent widget | |
| FReply | HandleMouseButtonUp
(
const FGeometry& MyGeometry, |
Called to handle an OnMouseButtonUp event from our parent widget | |
| FReply | HandleMouseMove
(
const FGeometry& InMyGeometry, |
Called to handle an OnMouseMove event from our parent widget | |
| bool | HandleTypeChar
(
const TCHAR InChar |
Called to handle a typing a character on the current selection or at the cursor position | |
| bool | |||
| bool | Returns whether the current text varies from the original | ||
| void | InsertRunAtCursor
(
TSharedRef< IRun > InRun |
Insert the given run at the current cursor position | |
| void | InsertTextAtCursor
(
const FString& InString |
Insert the given text at the current cursor position, correctly taking into account new line characters | |
| bool | IsAtBeginningOfDocument
(
const FTextLocation& Location |
Are we at the beginning of all the text. | |
| bool | IsAtBeginningOfLine
(
const FTextLocation& Location |
Is this location the beginning of a line | |
| bool | IsAtEndOfDocument
(
const FTextLocation& Location |
Are we at the end of all the text. | |
| bool | IsAtEndOfLine
(
const FTextLocation& Location |
Is this location the end of a line. | |
| bool | IsAtWordStart
(
const FTextLocation& Location |
Are we currently at the beginning of a word | |
| bool | IsTextSelectedAt
(
const UE::Slate::FDeprecateVector2DParameter& InLocalPosition |
Query to see if the text under the given position is currently selected (the position is local to the text layout space) | |
| bool | IsTextSelectedAt
(
const FGeometry& MyGeometry, |
Query to see if the text under the given position is currently selected | |
| void | JumpTo
(
ETextLocation JumpLocation, |
Jump the cursor to the given location in the document | |
| void | LoadText () |
||
| void | MakeUndoState
(
SlateEditableTextTypes::FUndoState& OutUndoState |
Create an undo state that reflects the current state of the document | |
| bool | MoveCursor
(
const FMoveCursor& InArgs |
Move the cursor in the document using the specified move method | |
| void | OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
||
| int32 | OnPaint
(
const FPaintArgs& Args, |
||
| void | Paste the text from the clipboard into this document | ||
| void | PushUndoState
(
const SlateEditableTextTypes::FUndoState& InUndoState |
Push the given undo state onto the undo stack | |
| void | Redo () |
Execute a redo action | |
| bool | Refresh () |
Refresh this editable text immediately, rather than wait for the usual caching mechanisms to take affect on the text Tick | |
| void | Remove any active cursor highlights | ||
| void | Restores the text to the original state | ||
| void | |||
| FTextLocation | ScanForWordBoundary
(
const FTextLocation& Location, |
Find the closest word boundary | |
| void | ScrollTo
(
const ETextLocation NewLocation |
Scroll to the given location in the document (without moving the cursor) | |
| void | ScrollTo
(
const FTextLocation& NewLocation |
Scroll to the given location in the document (without moving the cursor) | |
| void | Select all the text in the document | ||
| void | SelectText
(
const FTextLocation& InSelectionStart, |
Select a block of text | |
| void | SelectWordAt
(
const UE::Slate::FDeprecateVector2DParameter& InLocalPosition |
Select the word under the given position (the position is local to the text layout space) | |
| void | SelectWordAt
(
const FGeometry& MyGeometry, |
Select the word under the given position | |
| void | SetAutoWrapText
(
const TAttribute< bool >& InAutoWrapText |
Set whether to wrap text automatically based on the widget's computed horizontal space | |
| void | SetCompositionBrush
(
const TAttribute< const FSlateBrush* >& InCompositionBrush |
Set the brush to use when drawing the composition highlight | |
| void | SetCursorBrush
(
const TAttribute< const FSlateBrush* >& InCursorBrush |
Set the brush to use when drawing the cursor | |
| void | SetDebugSourceInfo
(
const TAttribute< FString >& InDebugSourceInfo |
Set the information used to help identify who owns this text layout in the case of an error | |
| bool | SetEditableText
(
const FText& TextToSet, |
Sets the current editable text for this text block Note: Doesn't update the value of BoundText, nor does it call OnTextChanged | |
| void | SetHintText
(
const TAttribute< FText >& InHintText |
||
| UE::Slate::FDeprecateVector2DResult | SetHorizontalScrollFraction
(
const float InScrollOffsetFraction |
Update the horizontal scroll amount from the given fraction | |
| void | SetJustification
(
const TAttribute< ETextJustify::Type >& InJustification |
Set how the text should be aligned with the margin | |
| void | SetLineHeightPercentage
(
const TAttribute< float >& InLineHeightPercentage |
Set the amount to scale each lines height by | |
| void | SetMargin
(
const TAttribute< FMargin >& InMargin |
Set the amount of blank space left around the edges of text area | |
| void | SetOverflowPolicy
(
TOptional< ETextOverflowPolicy > InOverflowPolicy |
Set the text overflow policy that should be used to determine what happens to clipped text | |
| UE::Slate::FDeprecateVector2DResult | SetScrollOffset
(
const UE::Slate::FDeprecateVector2DParameter& InScrollOffset, |
Set the absolute scroll offset value | |
| void | SetSearchText
(
const TAttribute< FText >& InSearchText |
||
| void | SetText
(
const TAttribute< FText >& InText |
||
| void | SetTextFlowDirection
(
const TOptional< ETextFlowDirection >& InTextFlowDirection |
Set the text flow direction that the internal text layout should use | |
| void | SetTextShapingMethod
(
const TOptional< ETextShapingMethod >& InTextShapingMethod |
Set the text shaping method that the internal text layout should use | |
| void | SetTextStyle
(
const FTextBlockStyle& InTextStyle |
||
| void | SetTextWrapping
(
const TAttribute< float >& InWrapTextAt, |
Set the wrapping to use for this document | |
| UE::Slate::FDeprecateVector2DResult | SetVerticalScrollFraction
(
const float InScrollOffsetFraction |
Update the vertical scroll amount from the given fraction | |
| void | SetWrappingPolicy
(
const TAttribute< ETextWrappingPolicy >& InWrappingPolicy |
Set the wrapping policy to use | |
| void | SetWrapTextAt
(
const TAttribute< float >& InWrapTextAt |
Set whether text wraps onto a new line when it's length exceeds this width; if this value is zero or negative, no wrapping occurs | |
| void | |||
| FTextLocation | TranslatedLocation
(
const FTextLocation& CurrentLocation, |
Given a location and a Direction to offset, return a new location. | |
| void | TranslateLocationVertical
(
const FTextLocation& Location, |
Given a location and a Direction to offset, return a new location. | |
| void | Undo () |
Execute an undo action | |
| void | Update the active cursor highlight based on the state of the text layout | ||
| void | Update the preferred offset of the cursor, based on the current state of the text layout |