Navigation
API > API/Runtime > API/Runtime/Slate > API/Runtime/Slate/SListView
A WidgetGenerator is a component responsible for creating widgets from data items. It also provides mapping from currently generated widgets to the data items which they represent.
| Name | FWidgetGenerator |
| Type | class |
| Header File | /Engine/Source/Runtime/Slate/Public/Widgets/Views/SListView.h |
| Include Path | #include "Widgets/Views/SListView.h" |
Syntax
class FWidgetGenerator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FWidgetGenerator
(
SListView< ItemType >* InOwnerList |
Widgets/Views/SListView.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ItemsToBeCleanedUp | TArray< ItemType > | Items that need their widgets destroyed because they are no longer on screen. | Widgets/Views/SListView.h | |
| ItemsWithGeneratedWidgets | TArray< TObjectPtrWrapTypeOf< ItemType > > | A set of Items that currently have a generated widget | Widgets/Views/SListView.h | |
| ItemToWidgetMap | TMap< ItemType, TSharedRef< ITableRow >, FDefaultSetAllocator, MapKeyFuncs > | Map of DataItems to corresponding SWidgets | Widgets/Views/SListView.h | |
| OwnerList | SListView< ItemType > * | We store a pointer to the owner list for error purposes, so when asserts occur we can report which list it happened for. | Widgets/Views/SListView.h | |
| TotalItemsLastGeneration | int32 | Total number of DataItems the last time we performed a generation pass. | Widgets/Views/SListView.h | |
| WidgetMapToItem | TMap< const ITableRow *, TObjectPtrWrapTypeOf< ItemType > > | Map of SWidgets to DataItems from which they were generated | Widgets/Views/SListView.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Clear() |
Clear everything so widgets will be regenerated | Widgets/Views/SListView.h | |
TSharedPtr< ITableRow > GetWidgetForItem
(
const ItemType& Item |
Find a widget for this item if it has already been constructed. | Widgets/Views/SListView.h | |
void OnBeginGenerationPass () |
Called at the beginning of the generation pass. | Widgets/Views/SListView.h | |
void OnEndGenerationPass () |
Called at the end of the generation pass. | Widgets/Views/SListView.h | |
void OnItemSeen
(
ItemType InItem, |
Keep track of every item and corresponding widget during a generation pass. | Widgets/Views/SListView.h | |
void ProcessItemCleanUp() |
Widgets/Views/SListView.h | ||
void ValidateWidgetGeneration() |
Widgets/Views/SListView.h |