Navigation
API > API/Runtime > API/Runtime/UMG
Similar to ListView, but can display a hierarchical tree of elements. The base items source for the tree identifies the root items, each of which can have n associated child items. There is no hard limit to the nesting - child items can have children and so on
To make a widget usable as an entry in a TreeView, it must inherit from the IUserObjectListEntry interface.
| Name | UTreeView |
| Type | class |
| Header File | /Engine/Source/Runtime/UMG/Public/Components/TreeView.h |
| Include Path | #include "Components/TreeView.h" |
Syntax
UCLASS (MinimalAPI)
class UTreeView : public UListView
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UVisual → UWidget → UListViewBase → UListView → UTreeView
Implements Interfaces
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UTreeView
(
const FObjectInitializer& ObjectInitializer |
Components/TreeView.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BP_OnGetItemChildren | FOnGetItemChildrenDynamic | Called to get the list of children (if any) that correspond to the given item. | Components/TreeView.h |
|
| BP_OnItemExpansionChanged | FOnItemExpansionChangedDynamic | Components/TreeView.h |
|
|
| OnGetItemChildren | TSlateDelegates< UObject * >::FOnGetChildren | Components/TreeView.h | ||
| OnItemExpansionChangedEvent | FOnItemExpansionChanged | Components/TreeView.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void CollapseAll() |
Collapses all currently expanded items | Components/TreeView.h |
|
void ExpandAll() |
Expands all items with children | Components/TreeView.h |
|
void SetItemExpansion
(
UObject* Item, |
Attempts to expand/collapse the given item (only relevant if the item has children) | Components/TreeView.h |
|
void SetOnGetItemChildren
(
ObjectT* InUserObject, |
Components/TreeView.h | ||
void SetOnGetItemChildren
(
TSharedRef< ObjectT > InUserObject, |
Components/TreeView.h |
Overridden from UVisual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void ReleaseSlateResources
(
bool bReleaseChildren |
Components/TreeView.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TSharedRef< TreeViewT< UObject * > > ConstructTreeView() |
STreeView construction helper - useful if using a custom STreeView subclass | Components/TreeView.h |
Overridden from UListViewBase
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< STableViewBase > RebuildListWidget() |
Implement in child classes to construct the actual ListView Slate widget | Components/TreeView.h |
Overridden from ITypedUMGListView
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnGetChildrenInternal
(
UObject* Item, |
TreeViews only. | Components/TreeView.h | |
virtual void OnItemClickedInternal
(
UObject* Item |
ListView events - implement these instead of binding handlers directly to a list | Components/TreeView.h | |
virtual void OnItemExpansionChangedInternal
(
UObject* Item, |
Components/TreeView.h |