Navigation
API > API/Runtime > API/Runtime/UMG
A virtualized list that allows up to thousands of items to be displayed.
An important distinction to keep in mind here is "Item" vs. "Entry" The list itself is based on a list of n items, but only creates as many entry widgets as can fit on screen. For example, a scrolling ListView of 200 items with 5 currently visible will only have created 5 entry widgets.
To make a widget usable as an entry in a ListView, it must inherit from the IUserObjectListEntry interface.
| Name | UListView |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/ListView.h |
| Include Path | #include "Components/ListView.h" |
Syntax
UCLASS (Meta=(EntryInterface="/Script/UMG.UserObjectListEntry"), MinimalAPI)
class UListView :
public UListViewBase ,
public ITypedUMGListView< UObject * >
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UListViewBase → UListView
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UListView
(
const FObjectInitializer& Initializer |
Components/ListView.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BP_OnEntryInitialized | FOnListEntryInitializedDynamic | Called when a row widget is generated for a list item | Components/ListView.h |
|
| BP_OnIsItemSelectableOrNavigable | FOnIsItemSelectableOrNavigableDynamic | Components/ListView.h |
|
|
| BP_OnItemAcceptDrop | FOnItemZoneMulticastDynamic | Components/ListView.h |
|
|
| BP_OnItemClicked | FSimpleListItemEventDynamic | Components/ListView.h |
|
|
| BP_OnItemDoubleClicked | FSimpleListItemEventDynamic | Components/ListView.h |
|
|
| BP_OnItemDragCancelled | FOnItemDragCancelledDynamic | Components/ListView.h |
|
|
| BP_OnItemDragDetected | FOnItemGeometryMulticastDynamic | Components/ListView.h |
|
|
| BP_OnItemDragEnter | FOnItemDragDropMulticastDynamic | Components/ListView.h |
|
|
| BP_OnItemDragLeave | FOnItemDragDropMulticastDynamic | Components/ListView.h |
|
|
| BP_OnItemIsHoveredChanged | FOnItemIsHoveredChangedDynamic | Components/ListView.h |
|
|
| BP_OnItemScrolledIntoView | FOnListItemScrolledIntoViewDynamic | Components/ListView.h |
|
|
| BP_OnItemSelectionChanged | FOnListItemSelectionChangedDynamic | Components/ListView.h |
|
|
| BP_OnListViewDraggingStateChanged | FOnListViewDraggingStateChangedDynamic | Components/ListView.h |
|
|
| BP_OnListViewFinishedScrolling | FOnListViewFinishedScrollingDynamic | Components/ListView.h |
|
|
| BP_OnListViewScrolled | FOnListViewScrolledDynamic | Components/ListView.h |
|
|
| HorizontalEntrySpacing | float | Components/ListView.h |
|
|
| OnFinishedScrollingEvent | FOnFinishedScrolling | Components/ListView.h | ||
| OnGetEntryClassForItemDelegate | FOnGetEntryClassForItem | Components/ListView.h | ||
| OnIsItemSelectableOrNavigableDelegate | FOnIsItemSelectableOrNavigable | Components/ListView.h | ||
| OnItemAcceptDropEvent | FSimpleListItemEvent | Components/ListView.h | ||
| OnItemCanAcceptDropEvent | FOnItemCanAcceptDrop | Components/ListView.h | ||
| OnItemClickedEvent | FSimpleListItemEvent | Components/ListView.h | ||
| OnItemDoubleClickedEvent | FSimpleListItemEvent | Components/ListView.h | ||
| OnItemDragCancelledEvent | FOnItemDragCancelled | Components/ListView.h | ||
| OnItemDragDetectedEvent | FSimpleListItemEvent | Components/ListView.h | ||
| OnItemDragEnterEvent | FSimpleListItemEvent | Components/ListView.h | ||
| OnItemDragLeaveEvent | FSimpleListItemEvent | Components/ListView.h | ||
| OnItemExpansionChangedEvent | FOnItemExpansionChanged | Components/ListView.h | ||
| OnItemIsHoveredChangedEvent | FOnItemIsHoveredChanged | Components/ListView.h | ||
| OnItemScrolledIntoViewEvent | FOnItemScrolledIntoView | Components/ListView.h | ||
| OnItemSelectionChangedEvent | FOnItemSelectionChanged | Components/ListView.h | ||
| OnListViewScrolledEvent | FOnListViewScrolled | Components/ListView.h | ||
| ScrollBarPadding | FMargin | Components/ListView.h |
|
|
| VerticalEntrySpacing | float | Components/ListView.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddItem
(
UObject* Item |
Adds an the item to the list | Components/ListView.h |
|
void ClearListItems() |
Removes all items from the list | Components/ListView.h |
|
RowWidgetT * GetEntryWidgetFromItem
(
const UObject* Item |
Components/ListView.h | ||
float GetHorizontalEntrySpacing() |
Get the horizontal spacing between entries. | Components/ListView.h |
|
int32 GetIndexForItem
(
const UObject* Item |
Returns the index that the specified item is at. Will return the first found, or -1 for not found | Components/ListView.h |
|
UObject * GetItemAt
(
int32 Index |
Returns the item at the given index | Components/ListView.h |
|
const TArray< UObject * > & GetListItems () |
Gets the list of all items in the list. | Components/ListView.h |
|
int32 GetNumItems() |
Returns the total number of items | Components/ListView.h |
|
EOrientation GetOrientation() |
Components/ListView.h | ||
FMargin GetScrollBarPadding() |
Gets padding around the scrollbar. | Components/ListView.h |
|
ObjectT * GetSelectedItem() |
Gets the first selected item, if any; recommended that you only use this for single selection lists. | Components/ListView.h | |
ESelectionMode::Type GetSelectionMode() |
Components/ListView.h | ||
const FScrollBoxStyle & GetShadowBrushStyle() |
Gets the Shadow Brush Style when scrolling | Components/ListView.h | |
float GetVerticalEntrySpacing() |
Get the vertical spacing between entries. | Components/ListView.h |
|
bool IsRefreshPending() |
Returns true if a refresh is pending and the list will be rebuilt on the next tick | Components/ListView.h |
|
void NavigateToIndex
(
int32 Index |
Requests that the item at the given index navigated to, scrolling it into view if needed. | Components/ListView.h |
|
void RemoveItem
(
UObject* Item |
Removes an the item from the list | Components/ListView.h |
|
void ScrollIndexIntoView
(
int32 Index |
Requests that the item at the given index is scrolled into view | Components/ListView.h |
|
void SetHorizontalEntrySpacing
(
float InHorizontalEntrySpacing |
Set the horizontal spacing between entries. | Components/ListView.h | |
void SetListItems
(
const TArray< ItemObjectT, AllocatorType >& InListItems |
Set the list of items to display within this listview | Components/ListView.h | |
void SetScrollBarPadding
(
const FMargin& InScrollBarPadding |
Sets padding around the scrollbar. | Components/ListView.h |
|
void SetScrollIntoViewAlignment
(
EScrollIntoViewAlignment NewScrollIntoViewAlignment |
Sets ScrollIntoViewAlignment which allows to stick the selected item to either side or center | Components/ListView.h |
|
void SetSelectedIndex
(
int32 Index |
Sets the item at the given index as the sole selected item. | Components/ListView.h |
|
void SetSelectedItem
(
const UObject* Item |
Components/ListView.h | ||
void SetSelectionMode
(
TEnumAsByte< ESelectionMode::Type > SelectionMode |
Sets the new selection mode, preserving the current selection where possible. | Components/ListView.h |
|
void SetShadowBrushStyle
(
const FScrollBoxStyle& NewWidgetStyle |
Sets the Shadow Brush Style when scrolling | Components/ListView.h | |
void SetVerticalEntrySpacing
(
float InVerticalEntrySpacing |
Set the vertical spacing between entries. | Components/ListView.h |
Overridden from UListViewBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual UObject * GetListObjectFromEntry
(
UUserWidget& EntryWidget |
Get the corresponding list object for this userwidget entry. | Components/ListView.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/ListView.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostLoad() |
Components/ListView.h |
Overridden from ITypedUMGListView
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSubclassOf< UUserWidget > GetDefaultEntryClass() |
Components/ListView.h | ||
virtual FOnFinishedScrolling & OnFinishedScrolling() |
Components/ListView.h | ||
virtual FOnGetEntryClassForItem & OnGetEntryClassForItem() |
Components/ListView.h | ||
virtual FOnIsItemSelectableOrNavigable & OnIsItemSelectableOrNavigable() |
Components/ListView.h | ||
virtual FSimpleListItemEvent & OnItemAcceptDrop() |
Components/ListView.h | ||
virtual FOnItemCanAcceptDrop & OnItemCanAcceptDrop() |
Components/ListView.h | ||
virtual FSimpleListItemEvent & OnItemClicked() |
Components/ListView.h | ||
virtual FSimpleListItemEvent & OnItemDoubleClicked() |
Components/ListView.h | ||
virtual FOnItemDragCancelled & OnItemDragCancelled() |
Components/ListView.h | ||
virtual FSimpleListItemEvent & OnItemDragDetected() |
Drag and Drop. | Components/ListView.h | |
virtual FSimpleListItemEvent & OnItemDragEnter() |
Components/ListView.h | ||
virtual FSimpleListItemEvent & OnItemDragLeave() |
Components/ListView.h | ||
virtual FOnItemExpansionChanged & OnItemExpansionChanged() |
Components/ListView.h | ||
virtual FOnItemIsHoveredChanged & OnItemIsHoveredChanged() |
Components/ListView.h | ||
virtual FOnItemScrolledIntoView & OnItemScrolledIntoView() |
Components/ListView.h | ||
virtual FOnItemSelectionChanged & OnItemSelectionChanged() |
Components/ListView.h | ||
virtual FOnListViewScrolled & OnListViewScrolled() |
Components/ListView.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedRef< ListViewT< UObject * > > ConstructListView() |
SListView construction helper - useful if using a custom STreeView subclass | Components/ListView.h | |
void HandleOnEntryInitializedInternal
(
UObject* Item, |
Components/ListView.h | ||
void InitHorizontalEntrySpacing
(
float InHorizontalEntrySpacing |
Components/ListView.h | ||
void InitVerticalEntrySpacing
(
float InVerticalEntrySpacing |
Components/ListView.h | ||
| Components/ListView.h | |||
void OnListItemEndPlayed
(
AActor* Item, |
Components/ListView.h | ||
void OnListItemOuterEndPlayed
(
AActor* ItemOuter, |
Components/ListView.h | ||
virtual void OnSelectionChangedInternal
(
UObject* FirstSelectedItem |
Components/ListView.h |
Overridden from UListViewBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FReply HandleListEntryAcceptDrop
(
const FDragDropEvent& DropEvent, |
Components/ListView.h | ||
virtual TOptional< EItemDropZone > HandleListEntryCanAcceptDrop
(
const FDragDropEvent& DropEvent, |
Components/ListView.h | ||
virtual void HandleListEntryDragCancelled
(
const FDragDropEvent& DropEvent |
Components/ListView.h | ||
virtual UDragDropOperation * HandleListEntryDragDetected
(
const FGeometry& MyGeometry, |
Drag Drop handlers. | Components/ListView.h | |
virtual void HandleListEntryDragEnter
(
const FDragDropEvent& DropEvent, |
Components/ListView.h | ||
virtual void HandleListEntryDragLeave
(
const FDragDropEvent& DropEvent, |
Components/ListView.h | ||
virtual void HandleListEntryHovered
(
UUserWidget& EntryWidget |
Components/ListView.h | ||
virtual void HandleListEntryUnhovered
(
UUserWidget& EntryWidget |
Components/ListView.h | ||
virtual void OnRefreshDesignerItems () |
Called during design time to allow lists to generate preview entries via dummy data. | Components/ListView.h | |
virtual TSharedRef< STableViewBase > RebuildListWidget() |
Implement in child classes to construct the actual ListView Slate widget | Components/ListView.h |
Overridden from ITypedUMGListView
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Gets the desired padding for the entry representing the given item | Components/ListView.h | ||
| Components/ListView.h | |||
virtual uint32 GetOwningUserIndex() |
Components/ListView.h | ||
virtual bool IsDesignerPreview() |
Components/ListView.h | ||
virtual UUserWidget & OnGenerateEntryWidgetInternal
(
UObject* Item, |
Generates the actual entry widget that represents the given item. | Components/ListView.h | |
virtual bool OnIsSelectableOrNavigableInternal
(
UObject* FirstSelectedItem |
Components/ListView.h | ||
virtual void OnItemClickedInternal
(
UObject* Item |
ListView events - implement these instead of binding handlers directly to a list | Components/ListView.h | |
virtual void OnItemDoubleClickedInternal
(
UObject* Item |
Components/ListView.h | ||
virtual void OnItemScrolledIntoViewInternal
(
UObject* Item, |
Components/ListView.h | ||
virtual void OnListViewFinishedScrollingInternal() |
Components/ListView.h | ||
virtual void OnListViewScrolledInternal
(
float ItemOffset, |
Components/ListView.h |