Navigation
API > API/Runtime > API/Runtime/Slate
An editable text widget that supports multiple lines and soft word-wrapping.
| Name | SMultiLineEditableText |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Text/SMultiLineEditableText.h |
| Include Path | #include "Widgets/Text/SMultiLineEditableText.h" |
Syntax
class SMultiLineEditableText :
public SWidget ,
public ISlateEditableTextWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SMultiLineEditableText
- FSlateControlledConstruction → SWidget → SMultiLineEditableText
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SMultiLineEditableText() |
Widgets/Text/SMultiLineEditableText.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~SMultiLineEditableText() |
Widgets/Text/SMultiLineEditableText.h |
Structs
| Name | Remarks |
|---|---|
| FArguments | |
| FScopedEditableTextTransaction | Used to merge multiple text edit transactions within a scope |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnCursorMoved | TBaseDelegate_OneParam< void, const FTextLocation & > | Called when the cursor is moved within the text area | Widgets/Text/SMultiLineEditableText.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AdvanceSearch
(
const bool InReverse |
Advance the current search to the next match (does nothing if not currently searching) | Widgets/Text/SMultiLineEditableText.h | |
bool AnyTextSelected() |
Query to see if any text is selected within the document | Widgets/Text/SMultiLineEditableText.h | |
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) | Widgets/Text/SMultiLineEditableText.h | |
void BeginSearch
(
const FText& InSearchText, |
Begin a new text search (this is called automatically when the bound search text changes) | Widgets/Text/SMultiLineEditableText.h | |
void ClearSelection() |
Clear the active text selection | Widgets/Text/SMultiLineEditableText.h | |
void Construct
(
const FArguments& InArgs |
Widgets/Text/SMultiLineEditableText.h | ||
void DeleteSelectedText() |
Delete any currently selected text | Widgets/Text/SMultiLineEditableText.h | |
void ForceScroll
(
int32 UserIndex, |
Force a single scroll operation. | Widgets/Text/SMultiLineEditableText.h | |
TCHAR GetCharacterAt
(
const FTextLocation& Location |
Get the character at Location | Widgets/Text/SMultiLineEditableText.h | |
void GetCurrentTextLine
(
FString& OutTextLine |
Fill OutTextLine with the text line where the current cursor location is at | Widgets/Text/SMultiLineEditableText.h | |
FTextLocation GetCursorLocation() |
Get the interaction position of the cursor (where to insert, delete, etc, text from/to) | Widgets/Text/SMultiLineEditableText.h | |
FSlateFontInfo GetFont() |
Widgets/Text/SMultiLineEditableText.h | ||
FText GetHintText() |
Get the text that appears when there is no text in the text box | Widgets/Text/SMultiLineEditableText.h | |
TSharedPtr< const SScrollBar > GetHScrollBar() |
Get the horizontal scroll bar widget | Widgets/Text/SMultiLineEditableText.h | |
int32 GetNumSearchResults() |
Get the total number of search results (0 if none) | Widgets/Text/SMultiLineEditableText.h | |
FText GetPlainText() |
Returns the plain text string without richtext formatting | Widgets/Text/SMultiLineEditableText.h | |
TSharedPtr< const IRun > GetRunUnderCursor() |
Get the run currently under the cursor, or null if there is no run currently under the cursor | Widgets/Text/SMultiLineEditableText.h | |
int32 GetSearchResultIndex() |
Get the index of the search result (0 if none) | Widgets/Text/SMultiLineEditableText.h | |
FText GetSearchText() |
Get the text that is currently being searched for (if any) | Widgets/Text/SMultiLineEditableText.h | |
TArray< TSharedRef< const IRun > > GetSelectedRuns() |
Get the runs currently that are current selected, some of which may be only partially selected | Widgets/Text/SMultiLineEditableText.h | |
FText GetSelectedText() |
Get the currently selected text | Widgets/Text/SMultiLineEditableText.h | |
FTextSelection GetSelection() |
Get the current selection | Widgets/Text/SMultiLineEditableText.h | |
FText GetText() |
Returns the text string | Widgets/Text/SMultiLineEditableText.h | |
void GetTextLine
(
const int32 InLineIndex, |
Fill OutTextLine with the text line at the specified index | Widgets/Text/SMultiLineEditableText.h | |
int32 GetTextLineCount() |
Get the number of Text Lines | Widgets/Text/SMultiLineEditableText.h | |
TSharedPtr< const SScrollBar > GetVScrollBar() |
Get the vertical scroll bar widget | Widgets/Text/SMultiLineEditableText.h | |
void GoTo
(
const ETextLocation NewLocation |
Move the cursor specified location | Widgets/Text/SMultiLineEditableText.h | |
void GoTo
(
const FTextLocation& NewLocation |
Move the cursor to the given location in the document (will also scroll to this point) | Widgets/Text/SMultiLineEditableText.h | |
void InsertRunAtCursor
(
TSharedRef< IRun > InRun |
Insert the given run at the current cursor position | Widgets/Text/SMultiLineEditableText.h | |
void InsertTextAtCursor
(
const FString& InString |
Widgets/Text/SMultiLineEditableText.h | ||
void InsertTextAtCursor
(
const FText& InText |
Insert the given text at the current cursor position, correctly taking into account new line characters | Widgets/Text/SMultiLineEditableText.h | |
void Refresh() |
Refresh this editable text immediately, rather than wait for the usual caching mechanisms to take affect on the text Tick | Widgets/Text/SMultiLineEditableText.h | |
void ScrollTo
(
const FTextLocation& NewLocation |
Scroll to the given location in the document (without moving the cursor) | Widgets/Text/SMultiLineEditableText.h | |
void ScrollTo
(
const ETextLocation NewLocation |
Scroll to the given location in the document (without moving the cursor) | Widgets/Text/SMultiLineEditableText.h | |
void SelectAllText() |
Select all the text in the document | Widgets/Text/SMultiLineEditableText.h | |
void SelectText
(
const FTextLocation& InSelectionStart, |
Select a block of text | Widgets/Text/SMultiLineEditableText.h | |
void SetAllowContextMenu
(
const TAttribute< bool >& InAllowContextMenu |
See the AllowContextMenu attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetApplyLineHeightToBottomLine
(
const TAttribute< bool >& InApplyLineHeightToBottomLine |
See ApplyLineHeightToBottomLine attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetAutoWrapText
(
const TAttribute< bool >& InAutoWrapText |
See AutoWrapText attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetClearKeyboardFocusOnCommit
(
const TAttribute< bool >& InClearKeyboardFocusOnCommit |
Sets whether to clear keyboard focus when pressing enter to commit changes | Widgets/Text/SMultiLineEditableText.h | |
void SetClearTextSelectionOnFocusLoss
(
const TAttribute< bool >& InClearTextSelectionOnFocusLoss |
Sets whether to clear text selection when focus is lost | Widgets/Text/SMultiLineEditableText.h | |
void SetFont
(
const TAttribute< FSlateFontInfo >& InNewFont |
See attribute Font | Widgets/Text/SMultiLineEditableText.h | |
void SetHintText
(
const TAttribute< FText >& InHintText |
Sets the text that appears when there is no text in the text box | Widgets/Text/SMultiLineEditableText.h | |
void SetIsReadOnly
(
const TAttribute< bool >& InIsReadOnly |
Sets the ReadOnly attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetJustification
(
const TAttribute< ETextJustify::Type >& InJustification |
See Justification attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetLineHeightPercentage
(
const TAttribute< float >& InLineHeightPercentage |
See LineHeightPercentage attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetMargin
(
const TAttribute< FMargin >& InMargin |
See Margin attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetOnKeyCharHandler
(
FOnKeyChar InOnKeyCharHandler |
Sets the OnKeyCharHandler to provide first chance handling of the OnKeyChar event | Widgets/Text/SMultiLineEditableText.h | |
void SetOnKeyDownHandler
(
FOnKeyDown InOnKeyDownHandler |
Sets the OnKeyDownHandler to provide first chance handling of the OnKeyDown event | Widgets/Text/SMultiLineEditableText.h | |
void SetOverflowPolicy
(
TOptional< ETextOverflowPolicy > InOverflowPolicy |
Sets the overflow policy for this text block | Widgets/Text/SMultiLineEditableText.h | |
void SetRevertTextOnEscape
(
const TAttribute< bool >& InRevertTextOnEscape |
Sets whether to allow the user to back out of changes when they press the escape key | Widgets/Text/SMultiLineEditableText.h | |
void SetSearchText
(
const TAttribute< FText >& InSearchText |
Set the text that is currently being searched for (if any) | Widgets/Text/SMultiLineEditableText.h | |
void SetSelectAllTextWhenFocused
(
const TAttribute< bool >& InSelectAllTextWhenFocused |
Sets whether to select all text when the user clicks to give focus on the widget | Widgets/Text/SMultiLineEditableText.h | |
void SetSelectWordOnMouseDoubleClick
(
const TAttribute< bool >& InSelectWordOnMouseDoubleClick |
Sets whether to select word on the mouse double click | Widgets/Text/SMultiLineEditableText.h | |
void SetText
(
const TAttribute< FText >& InText |
Sets the text for this text block | Widgets/Text/SMultiLineEditableText.h | |
void SetTextFlowDirection
(
const TOptional< ETextFlowDirection >& InTextFlowDirection |
See TextFlowDirection attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetTextShapingMethod
(
const TOptional< ETextShapingMethod >& InTextShapingMethod |
See TextShapingMethod attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetTextStyle
(
const FTextBlockStyle* InTextStyle |
See attribute TextStyle | Widgets/Text/SMultiLineEditableText.h | |
void SetVirtualKeyboardDismissAction
(
TAttribute< EVirtualKeyboardDismissAction > InVirtualKeyboardDismissAction |
Set the VirtualKeyboardDismissAction attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetWrappingPolicy
(
const TAttribute< ETextWrappingPolicy >& InWrappingPolicy |
Set WrappingPolicy attribute | Widgets/Text/SMultiLineEditableText.h | |
void SetWrapTextAt
(
const TAttribute< float >& InWrapTextAt |
See WrapTextAt attribute | Widgets/Text/SMultiLineEditableText.h |
Overridden from ISlateEditableTextWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsIntegratedKeyboardEnabled() |
Is the widget currently has IntegratedKeyboard enabled? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool IsMultiLineTextEdit() |
Is the text edit multi-line aware? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool IsTextPassword() |
Is the text displaying a password and should be obscured? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool IsTextReadOnly() |
Is the text currently read-only? | Widgets/Text/SMultiLineEditableText.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void BeginEditTransaction() |
Called to begin an undoable editable text transaction, marked as protected for use with FScopedEditableTextTransaction only | Widgets/Text/SMultiLineEditableText.h | |
void EndEditTransaction() |
Called to end an undoable editable text transaction, marked as protected for use with FScopedEditableTextTransaction only | Widgets/Text/SMultiLineEditableText.h | |
bool IsRightClickScrolling() |
Return whether a RMB+Drag scroll operation is taking place | Widgets/Text/SMultiLineEditableText.h | |
virtual void OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
void OnHScrollBarMoved
(
const float InScrollOffsetFraction |
Widgets/Text/SMultiLineEditableText.h | ||
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Widgets/Text/SMultiLineEditableText.h | ||
void OnVScrollBarMoved
(
const float InScrollOffsetFraction |
Widgets/Text/SMultiLineEditableText.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CacheDesiredSize
(
float LayoutScaleMultiplier |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FVector2D ComputeDesiredSize
(
float LayoutScaleMultiplier |
Widgets/Text/SMultiLineEditableText.h | ||
virtual bool ComputeVolatility() |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FChildren * GetChildren() |
Widgets/Text/SMultiLineEditableText.h | ||
virtual bool IsInteractable() |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FCursorReply OnCursorQuery
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
virtual void OnFocusLost
(
const FFocusEvent& InFocusEvent |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FReply OnFocusReceived
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FReply OnKeyChar
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
| Widgets/Text/SMultiLineEditableText.h | |||
| Widgets/Text/SMultiLineEditableText.h | |||
virtual FReply OnMouseButtonDoubleClick
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FReply OnMouseButtonDown
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FReply OnMouseButtonUp
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FReply OnMouseMove
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
virtual FReply OnMouseWheel
(
const FGeometry& MyGeometry, |
Widgets/Text/SMultiLineEditableText.h | ||
virtual bool SupportsKeyboardFocus() |
Widgets/Text/SMultiLineEditableText.h | ||
virtual void Tick
(
const FGeometry& AllottedGeometry, |
Widgets/Text/SMultiLineEditableText.h |
Overridden from ISlateEditableTextWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< SWidget > BuildContextMenuContent() |
Build the context menu content to use for this widget (if any) | Widgets/Text/SMultiLineEditableText.h | |
virtual bool CanInsertCarriageReturn() |
Are we currently able to insert a carriage return? (some widgets have modifier keys that need to be pressed) | Widgets/Text/SMultiLineEditableText.h | |
virtual bool CanTypeCharacter
(
const TCHAR InChar |
Are we able to insert the given character into our text? | Widgets/Text/SMultiLineEditableText.h | |
virtual void EnsureActiveTick() |
Ensure that we will get a Tick() soon (either due to having active focus, or something having changed progmatically and requiring an update) Does nothing if the active tick timer is already enabled | Widgets/Text/SMultiLineEditableText.h | |
virtual TSharedRef< SWidget > GetSlateWidget() |
Get the Slate widget this interface is representing (may not be called during destruction) | Widgets/Text/SMultiLineEditableText.h | |
virtual TSharedPtr< SWidget > GetSlateWidgetPtr() |
Get the Slate widget this interface is representing (may be null during destruction) | Widgets/Text/SMultiLineEditableText.h | |
virtual EVirtualKeyboardDismissAction GetVirtualKeyboardDismissAction() |
Get the message action to take when the virtual keyboard is dismissed by the user | Widgets/Text/SMultiLineEditableText.h | |
virtual FVirtualKeyboardOptions GetVirtualKeyboardOptions() |
Get the options for the virtual keyboard used for this widget | Widgets/Text/SMultiLineEditableText.h | |
virtual EVirtualKeyboardTrigger GetVirtualKeyboardTrigger() |
Get the type of event that will trigger the display of the virtual keyboard | Widgets/Text/SMultiLineEditableText.h | |
virtual EKeyboardType GetVirtualKeyboardType() |
Get the type of virtual keyboard to use for this widget | Widgets/Text/SMultiLineEditableText.h | |
virtual void OnBeginTextEdit
(
const FText& InText |
Called when the text starts to be edited | Widgets/Text/SMultiLineEditableText.h | |
virtual void OnCursorMoved
(
const FTextLocation& InLocation |
Called when the cursor is moved within the text area | Widgets/Text/SMultiLineEditableText.h | |
virtual void OnTextChanged
(
const FText& InText |
Called when the text has been changed by an edit operation | Widgets/Text/SMultiLineEditableText.h | |
virtual void OnTextCommitted
(
const FText& InText, |
Called when the text control has committed its current edit changes | Widgets/Text/SMultiLineEditableText.h | |
virtual bool ShouldClearKeyboardFocusOnCommit() |
Should we clear the keyboard focus when the user commits text to this widget? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool ShouldClearTextSelectionOnFocusLoss() |
Should the text clear its selection the widget loses focus? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool ShouldJumpCursorToEndWhenFocused() |
Should the cursor be jumped to the end of the document when the widget gains focus? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool ShouldRevertTextOnEscape() |
Should we revert the text back to its original state when the user presses escape? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool ShouldSelectAllTextOnCommit() |
Should we select all text when the user commits text to this widget? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool ShouldSelectAllTextWhenFocused() |
Should the text be selected when the widget gains focus? | Widgets/Text/SMultiLineEditableText.h | |
virtual bool ShouldSelectWordOnMouseDoubleClick() |
Should we select word on mouse double click? | Widgets/Text/SMultiLineEditableText.h | |
virtual float UpdateAndClampHorizontalScrollBar
(
const float InViewOffset, |
Called when the fraction and offset of the horizontal scroll area has been recalculated. | Widgets/Text/SMultiLineEditableText.h | |
virtual float UpdateAndClampVerticalScrollBar
(
const float InViewOffset, |
Called when the fraction and offset of the vertical scroll area has been recalculated. | Widgets/Text/SMultiLineEditableText.h |