Navigation
API > API/Developer > API/Developer/ToolWidgets
A SearchBox widget that contains support for displaying search history When used with a FilterBar widget (
| Name | SFilterSearchBox |
| Type | class |
| Header File | /Engine/Source/Developer/ToolWidgets/Public/Filters/SFilterSearchBox.h |
| Include Path | #include "Filters/SFilterSearchBox.h" |
Syntax
class SFilterSearchBox : public SCompoundWidget
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SFilterSearchBox
- FSlateControlledConstruction → SWidget → SCompoundWidget → SFilterSearchBox
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnSaveSearchClicked | TBaseDelegate_OneParam< void, const FText & > | Filters/SFilterSearchBox.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bShowSearchHistory | TAttribute< bool > | Whether we are showing the search history | Filters/SFilterSearchBox.h | |
| EmptySearchHistoryText | TSharedPtr< FText > | The Text that shows up when there are no items in the search history | Filters/SFilterSearchBox.h | |
| MaxSearchHistory | int32 | The max amount of items to show in the Search History | Filters/SFilterSearchBox.h | |
| OnTextChanged | FOnTextChanged | Delegate for when text is changed in the edit box | Filters/SFilterSearchBox.h | |
| OnTextCommitted | FOnTextCommitted | Delegate for when text is changed in the edit box | Filters/SFilterSearchBox.h | |
| SearchBox | TSharedPtr< SFilterSearchBoxImpl > | The actual Search Box | Filters/SFilterSearchBox.h | |
| SearchHistory | TArray< TSharedPtr< FText > > | The array containing the last few searched items | Filters/SFilterSearchBox.h | |
| SearchHistoryBox | TSharedPtr< SMenuAnchor > | Search History elements | Filters/SFilterSearchBox.h | |
| SearchHistoryListView | TSharedPtr< SListView< TSharedPtr< FText > > > | The ListView containing our search history | Filters/SFilterSearchBox.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Constructs this widget with InArgs | Filters/SFilterSearchBox.h | |
| Get the current Search History excluding the placeholder empty search text | Filters/SFilterSearchBox.h | ||
FTextSelection GetSelection() |
Get the current selection | Filters/SFilterSearchBox.h | |
FText GetText() |
Get the text string currently being edited | Filters/SFilterSearchBox.h | |
void SelectText
(
const FTextLocation& InSelectionStart, |
Select a block of text | Filters/SFilterSearchBox.h | |
| Set or clear the current error reporting information for this search box | Filters/SFilterSearchBox.h | ||
| Filters/SFilterSearchBox.h | |||
void SetOnSaveSearchHandler
(
FOnSaveSearchClicked InOnSaveSearchHandler |
Show a + button next to the current search, and set the handler for when that is clicked | Filters/SFilterSearchBox.h | |
void SetText
(
const TAttribute< FText >& InNewText |
Sets the text string currently being edited | Filters/SFilterSearchBox.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool HasKeyboardFocus() |
Filters/SFilterSearchBox.h | ||
virtual void OnFocusLost
(
const FFocusEvent& InFocusEvent |
SWidget interface | Filters/SFilterSearchBox.h | |
virtual FReply OnFocusReceived
(
const FGeometry& MyGeometry, |
Filters/SFilterSearchBox.h | ||
virtual bool SupportsKeyboardFocus() |
Filters/SFilterSearchBox.h |
See Also
-
SBasicFilterBar or SFilterBar)
-
it allows the user to save searches from the history as filter pills