Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/Widgets > API/Runtime/Slate/Widgets/Input
Inheritance Hierarchy
- FSlateControlledConstruction
- TSharedFromThis
- SWidget
- SCompoundWidget
- SBorder
- SMultiLineEditableTextBox
- STemplateStringEditableTextBox
References
| Module | Slate |
| Header | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SMultiLineEditableTextBox.h |
| Include | #include "Widgets/Input/SMultiLineEditableTextBox.h" |
Syntax
class SMultiLineEditableTextBox : public SBorder
Remarks
Editable text box widget
Variables
| Type | Name | Description | |
|---|---|---|---|
| TAttribute< bool > | AllowContextMenu | Whether to disable the context menu | |
| TAttribute< FSlateColor > | BackgroundColorOverride | Background color (overrides style) | |
| bool | bHasExternalHScrollBar | Whether we have an externally supplied horizontal scrollbar or one created internally | |
| bool | bHasExternalVScrollBar | Whether we have an externally supplied vertical scrollbar or one created internally | |
| TSharedPtr< SHorizontalBox > | Box | Allows for inserting additional widgets that extend the functionality of the text box | |
| TAttribute< bool > | bSelectWordOnMouseDoubleClick | Whether to select work on mouse double click | |
| TSharedPtr< SMultiLineEditableText > | EditableText | Editable text widget | |
| TSharedPtr< class IErrorReportingWidget > | ErrorReporting | SomeWidget reporting | |
| TAttribute< FSlateColor > | FocusedForegroundColorOverride | Focused foreground color (overrides style) | |
| TAttribute< FSlateFontInfo > | FontOverride | Font (overrides style) | |
| TAttribute< FSlateColor > | ForegroundColorOverride | Foreground color (overrides style) | |
| TSharedPtr< SScrollBar > | HScrollBar | Horiz scrollbar | |
| TSharedPtr< SBox > | HScrollBarPaddingBox | Box around the horiz scrollbar used for adding padding | |
| TAttribute< FMargin > | HScrollBarPaddingOverride | Horiz scrollbar padding (overrides style) | |
| FOnTextChanged | OnTextChanged | Called when the text is changed interactively | |
| FOnTextCommitted | OnTextCommitted | Called when the user commits their change to the editable text control | |
| FOnVerifyTextChanged | OnVerifyTextChanged | Callback to verify text when changed. Will return an error message to denote problems. | |
| TAttribute< FMargin > | PaddingOverride | Padding (overrides style) | |
| TAttribute< FSlateColor > | ReadOnlyForegroundColorOverride | Read-only foreground color (overrides style) | |
| const FEditableTextBoxStyle * | Style | ||
| TSharedPtr< SScrollBar > | VScrollBar | Vert scrollbar | |
| TSharedPtr< SBox > | VScrollBarPaddingBox | Box around the vert scrollbar used for adding padding | |
| TAttribute< FMargin > | VScrollBarPaddingOverride | Vert scrollbar padding (overrides style) |
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 | BeginSearch
(
const FText& InSearchText, |
Begin a new text search (this is called automatically when the bound search text changes) | |
| void | Clear the active text selection | ||
| void | Construct
(
const FArguments& InArgs |
Construct this widget | |
| void | ForceScroll
(
int32 UserIndex, |
||
| void | GetCurrentTextLine
(
FString& OutTextLine |
Return 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 | GetHintText () |
Returns the hint text string | |
| TSharedPtr< const SScrollBar > | Get the horizontal scroll bar widget | ||
| FText | GetPlainText () |
Returns the plain text string without richtext formatting | |
| TSharedPtr< const IRun > | Get the run currently under the cursor, or null if there is no run currently under the cursor | ||
| FText | Get the text that is currently being searched for (if any) | ||
| 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 | ||
| FText | GetText () |
Returns the text string | |
| TSharedPtr< const SScrollBar > | Get the vertical scroll bar widget | ||
| void | GoTo
(
const ETextLocation NewLocation |
Move the cursor to the specified location | |
| void | GoTo
(
const FTextLocation& NewLocation |
Move the cursor to the given location in the document | |
| 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 | |
| void | InsertTextAtCursor
(
const FText& InText |
Insert the given text at the current cursor position, correctly taking into account new line characters | |
| void | OnEditableTextChanged
(
const FText& InText |
Callback for the editable text's OnTextChanged event | |
| void | OnEditableTextCommitted
(
const FText& InText, |
Callback when the editable text is committed. | |
| void | Refresh () |
Refresh this text box immediately, rather than wait for the usual caching mechanisms to take affect on the text Tick | |
| 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 | SetAllowContextMenu
(
const TAttribute< bool >& InAllowContextMenu |
See the AllowContextMenu attribute | |
| void | SetAutoWrapText
(
const TAttribute< bool >& InAutoWrapText |
See AutoWrapText attribute | |
| void | If InError is a non-empty string the TextBox will the ErrorReporting provided during construction If no error reporting was provided, the TextBox will create a default error reporter. | ||
| void | If InError is a non-empty string the TextBox will the ErrorReporting provided during construction If no error reporting was provided, the TextBox will create a default error reporter. | ||
| void | SetHintText
(
const TAttribute< FText >& InHintText |
Sets the text that appears when there is no text in the text box | |
| void | SetIsReadOnly
(
const TAttribute< bool >& InIsReadOnly |
Set the ReadOnly attribute | |
| void | SetJustification
(
const TAttribute< ETextJustify::Type >& InJustification |
See Justification attribute | |
| void | SetLineHeightPercentage
(
const TAttribute< float >& InLineHeightPercentage |
See LineHeightPercentage attribute | |
| void | SetMargin
(
const TAttribute< FMargin >& InMargin |
See Margin attribute | |
| void | SetOnKeyCharHandler
(
FOnKeyChar InOnKeyCharHandler |
Sets the OnKeyCharHandler to provide first chance handling of the SMultiLineEditableText's OnKeyChar event | |
| void | SetOnKeyDownHandler
(
FOnKeyDown InOnKeyDownHandler |
Sets the OnKeyDownHandler to provide first chance handling of the SMultiLineEditableText's OnKeyDown event | |
| void | SetOverflowPolicy
(
TOptional< ETextOverflowPolicy > InOverflowPolicy |
Sets the overflow policy for this text block | |
| void | SetReadOnlyForegroundColor
(
const TAttribute< FSlateColor >& InReadOnlyForegroundColor |
Sets the text color and opacity when read-only (overrides Style) | |
| void | SetSearchText
(
const TAttribute< FText >& InSearchText |
Set the text that is currently being searched for (if any) | |
| void | SetSelectWordOnMouseDoubleClick
(
const TAttribute< bool >& InSelectWordOnMouseDoubleClick |
Sets whether to select word on the mouse double click | |
| void | SetStyle
(
const FEditableTextBoxStyle* InStyle |
See attribute Style | |
| void | SetText
(
const TAttribute< FText >& InNewText |
Sets the text string currently being edited | |
| void | SetTextBoxBackgroundColor
(
const TAttribute< FSlateColor >& InBackgroundColor |
Sets the color of the background/border around the editable text (overrides Style) | |
| void | SetTextBoxForegroundColor
(
const TAttribute< FSlateColor >& InForegroundColor |
Sets the text color and opacity (overrides Style) | |
| void | SetTextFlowDirection
(
const TOptional< ETextFlowDirection >& InTextFlowDirection |
See TextFlowDirection attribute | |
| void | SetTextShapingMethod
(
const TOptional< ETextShapingMethod >& InTextShapingMethod |
See TextShapingMethod attribute | |
| void | SetTextStyle
(
const FTextBlockStyle* InTextStyle |
See attribute TextStyle | |
| void | SetVirtualKeyboardDismissAction
(
TAttribute< EVirtualKeyboardDismissAction > InVirtualKeyboardDismissAction |
Set the VirtualKeyboardDismissAction attribute | |
| void | SetWrappingPolicy
(
const TAttribute< ETextWrappingPolicy >& InWrappingPolicy |
Set WrappingPolicy attribute | |
| void | SetWrapTextAt
(
const TAttribute< float >& InWrapTextAt |
See WrapTextAt attribute |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| bool | Checks to see if this widget currently has the keyboard focus | ||
| FReply | OnFocusReceived
(
const FGeometry& MyGeometry, |
KEY INPUT Called when focus is given to this widget. This event does not bubble. | |
| FReply | Called after a key is pressed when this widget has focus (this event bubbles if not handled) | ||
| bool | Checks to see if this widget supports keyboard focus. Override this in derived classes. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments |