Navigation
API > API/Runtime > API/Runtime/Slate
Implements an editable text box that can show auto-complete histories and suggestions lists.
| Name | SSuggestionTextBox |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Input/SSuggestionTextBox.h |
| Include Path | #include "Widgets/Input/SSuggestionTextBox.h" |
Syntax
class SSuggestionTextBox : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SSuggestionTextBox
- FSlateControlledConstruction → SWidget → SCompoundWidget → SSuggestionTextBox
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
SSuggestionTextBox() |
Default constructor. | Widgets/Input/SSuggestionTextBox.h |
Structs
| Name | Remarks |
|---|---|
| FArguments |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CommitsOnSuggestionSelected | bool | Trigger commit text event as soon as suggestion was selected. | Widgets/Input/SSuggestionTextBox.h | |
| IgnoreUIUpdate | bool | Holds a flag to prevent recursive calls in UI callbacks. | Widgets/Input/SSuggestionTextBox.h | |
| MenuAnchor | TSharedPtr< SMenuAnchor > | Holds the box for history and auto-complete suggestions. | Widgets/Input/SSuggestionTextBox.h | |
| OnShowingHistory | FOnShowingHistory | Holds a delegate that is executed before the input history is shown. | Widgets/Input/SSuggestionTextBox.h | |
| OnShowingSuggestions | FOnShowingSuggestions | Holds a delegate that is executed before the suggestions list is shown. | Widgets/Input/SSuggestionTextBox.h | |
| OnTextChanged | FOnTextChanged | Holds a delegate that is executed when the text has changed. | Widgets/Input/SSuggestionTextBox.h | |
| OnTextCommitted | FOnTextCommitted | Holds a delegate that is executed when the text has been committed. | Widgets/Input/SSuggestionTextBox.h | |
| SelectedSuggestion | int32 | Holds the index of the selected suggestion (-1 for no selection). | Widgets/Input/SSuggestionTextBox.h | |
| SuggestionListView | TSharedPtr< SListView< TSharedPtr< FString > > > | Holds the list view that displays the suggestions. | Widgets/Input/SSuggestionTextBox.h | |
| Suggestions | TArray< TSharedPtr< FString > > | Holds the current list of suggestions. | Widgets/Input/SSuggestionTextBox.h | |
| SuggestionTextStyle | const FTextBlockStyle * | The styling of the suggestion text. | Widgets/Input/SSuggestionTextBox.h | |
| TextBox | TSharedPtr< SEditableTextBox > | Holds the editable text box. | Widgets/Input/SSuggestionTextBox.h | |
| VerticalBox | TSharedPtr< SVerticalBox > | The VerticalBox containing the SuggestionList. | Widgets/Input/SSuggestionTextBox.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Construct this widget. Called by the SNew()Slate macro. | Widgets/Input/SSuggestionTextBox.h | |
FText GetText() |
Returns the text string. | Widgets/Input/SSuggestionTextBox.h | |
| Sets an optional error string. | Widgets/Input/SSuggestionTextBox.h | ||
void SetText
(
const TAttribute< FText >& InNewText |
Sets the text string currently being edited | Widgets/Input/SSuggestionTextBox.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ClearSuggestions() |
Clears the list of suggestions and hides the suggestions list. | Widgets/Input/SSuggestionTextBox.h | |
void FocusTextBox() |
Sets the keyboard focus to the text box. | Widgets/Input/SSuggestionTextBox.h | |
FString GetSelectedSuggestionString() |
Gets the string value of the currently selected suggestion. | Widgets/Input/SSuggestionTextBox.h | |
void MarkActiveSuggestion() |
Highlights the selected suggestion in the suggestion list. | Widgets/Input/SSuggestionTextBox.h | |
| Sets the list of suggestions. | Widgets/Input/SSuggestionTextBox.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnFocusLost
(
const FFocusEvent& InFocusEvent |
Widgets/Input/SSuggestionTextBox.h | ||
| Widgets/Input/SSuggestionTextBox.h | |||
virtual bool SupportsKeyboardFocus() |
Widgets/Input/SSuggestionTextBox.h |