Navigation
API > API/Editor > API/Editor/EditorWidgets
A Filter Bar widget, which can be used to filter items of type [FilterType] given a list of custom filters along with built in support for Asset Type filters
Sample Usage: SAssignNew(MyFilterBar, SFilterBar
| Name | SFilterBar |
| Type | class |
| Header File | /Engine/Source/Editor/EditorWidgets/Public/Filters/SFilterBar.h |
| Include Path | #include "Filters/SFilterBar.h" |
Syntax
template<typename FilterType>
class SFilterBar : public SAssetFilterBar< FilterType >
Inheritance Hierarchy
- FFilterBarBase → SAssetFilterBar → SFilterBar
- FSharedFromThisBase → TSharedFromThis → SWidget → SCompoundWidget → SBasicFilterBar → SAssetFilterBar → SFilterBar
- FSlateControlledConstruction → SWidget → SCompoundWidget → SBasicFilterBar → SAssetFilterBar → SFilterBar
- SFilterBar
Structs
| Name | Remarks |
|---|---|
| FArguments |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FCompareItemWithClassNames | typename FAssetFilter< FilterType >::FCompareItemWithClassNames | Filters/SFilterBar.h | |
| FConvertItemToAssetData | typename FAssetFilter< FilterType >::FConvertItemToAssetData | Filters/SFilterBar.h | |
| FCreateTextFilter | typename SBasicFilterBar< FilterType >::FCreateTextFilter | Filters/SFilterBar.h | |
| FOnFilterChanged | typename SBasicFilterBar< FilterType >::FOnFilterChanged | Filters/SFilterBar.h | |
| SFilter | typename SBasicFilterBar< FilterType >::SFilter | Filters/SFilterBar.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AssetFilter | TSharedPtr< FAssetFilter< FilterType > > | The invisible filter used to conduct Asset Type filtering | Filters/SFilterBar.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Construct
(
const FArguments& InArgs |
Constructs this widget with InArgs | Filters/SFilterBar.h |
Overridden from SBasicFilterBar
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedPtr< TFilterCollection< FilterType > > GetAllActiveFilters() |
Use this function to get all currently active filters (to filter your items) NOTE: Must be called every time the filters change (OnFilterChanged) to make sure you get the correct combined filter | Filters/SFilterBar.h |
See Also
-
SBasicFilterBar if you don't want Asset Type filters
-
or if you want a filter bar usable in non-editor situations NOTE: You will need to also add "ToolWidgets" as a dependency to your module to use this widget NOTE: The filter functions create copies
-
so you want to use SFilterBar
> etc instead of SFilterBar when possible NOTE: The user must specify one of the following: a) OnConvertItemToAssetData: A conversion function to convert FilterType to an FAssetData. Specifying this will filter the asset type through the AssetRegistry -
which is potentially more thorough and fast b) OnCompareItemWithClassName: A comparison function to check if an Item (FilterType) is the same as an AssetType (represented by an FName). This allows to user to directly text compare with ClassNames (UObjectBase::GetFName)
-
which is easier but potentially slower
-
FGenericFilter to create simple delegate based filters) .OnConvertItemToAssetData() // Conversion Function as mentioned above