Navigation
API > API/Editor > API/Editor/UnrealEd
Inheritance Hierarchy
- STableViewBase
- TListTypeTraits< ItemType >::SerializerType
- ITypedTableView
- SListView
- STreeView
- ISequencerTreeView
- SBaseHierarchyTreeView
- SCommonTreeView
- SCurveEditorTree
- SMLDeformerBonePickerTreeWidget
- SMLDeformerInputBoneTreeWidget
- SNeuralMorphBoneGroupsWidget
- SNeuralMorphCurveGroupsWidget
- SOutlinerView
- SSceneOutlinerTreeView
- SSCSEditorDragDropTree
- SSubobjectEditorDragDropTree
- SUsdTreeView
- SUsdStagePreviewTree
References
| Module | UnrealEd |
| Header | /Engine/Source/Editor/UnrealEd/Public/DiffUtils.h |
| Include | #include "DiffUtils.h" |
Syntax
template<typename ItemType>
class STreeView : public SListView< ItemType >
Remarks
This assumes you are familiar with SListView; see SListView.
TreeView setup is virtually identical to that of ListView. Additionally, TreeView introduces a new delegate: OnGetChildren(). OnGetChildren() takes some DataItem being observed by the tree and returns that item's children. Like ListView, TreeView operates exclusively with pointers to DataItems.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TArray< FItemInfo > | DenseItemInfos | Info needed by every item in the linearized version of the tree. | |
| TArray< ItemType > | LinearizedItems | A linearized version of the items being observed by the tree view. | |
| FOnExpansionChanged | OnExpansionChanged | The delegate that is invoked whenever an item in the tree is expanded or collapsed. | |
| FOnGetChildren | OnGetChildren | The delegate that is invoked whenever we need to gather an item's children. | |
| FOnSetExpansionRecursive | OnSetExpansionRecursive | The delegate that is invoked to recursively expand/collapse a tree items children. | |
| TSparseItemMap | SparseItemInfos | Info needed by a small fraction of tree items; some of these are not visible to the user. | |
| const FTableViewStyle * | Style | Style resource for the tree |
Constructors
| Type | Name | Description | |
|---|---|---|---|
STreeView () |
Default constructor. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Clears the entire set of expanded items. | ||
| void | |||
| void | Construct
(
const FArguments& InArgs |
Construct this widget | |
| void | GetExpandedItems
(
TItemSet& ExpandedItems |
Generates a set of items that are currently expanded. | |
| TArrayView< const ItemType > | GetRootItems () |
||
| bool | |||
| bool | IsItemExpanded
(
const ItemType& InItem |
||
| bool | PopulateLinearizedItems
(
TArrayView< const ItemType > InItemsSource, |
Given: an array of items (ItemsSource) each of which potentially has a child. | |
| int32 | PopulatePinnedItems
(
const TArray< ItemType >& InItemsSource, |
||
| void | |||
| void | SetItemExpansion
(
const ItemType& InItem, |
Set whether some data item is expanded or not. | |
| void | SetRootItemsSource
(
const TArray< ItemType >* InItemsSource |
Set the Root items. The tree will generate widgets to represent these items. | |
| void | SetRootItemsSource
(
TSharedRef< UE::Slate::Containers::TObservableArray< ItemType >> InItemsSource |
Set the RootItemsSource. The tree will generate widgets to represent these items. | |
| void | SetRootItemsSource
(
TUniquePtr< UE::Slate::ItemsSource::IItemsSource< ItemType >> Provider |
Establishes a new list of root items being observed by the list. | |
| void | SetSingleExpandedItem
(
const ItemType& InItem |
Collapse all the items in the tree and expand InItem | |
| void | SetStyle
(
const FTableViewStyle* InStyle |
||
| void | SetTreeItemsSource
(
const TArray< ItemType >* InItemsSource |
Set the TreeItemsSource. The Tree will generate widgets to represent these items. |
Overridden from SListView
| Type | Name | Description | |
|---|---|---|---|
| TSharedRef< ITableRow > | GenerateNewWidget
(
ItemType InItem |
Given a TreeItem, create a Widget to represent it in the tree view. |
Overridden from STableViewBase
| Type | Name | Description | |
|---|---|---|---|
| void | RebuildList () |
Completely wipe existing widgets and fully regenerate them on next tick. | |
| STableViewBase::FReGenerateResults | ReGenerateItems
(
const FGeometry& MyGeometry |
Update generate Widgets for Items as needed and clean up any Widgets that are no longer needed. | |
| void | Queue up a regeneration of the linearized items on the next tick. |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| FReply | Called after a key is pressed when this widget has focus (this event bubbles if not handled) | ||
| void | See SWidget::Tick() |
Overridden from ITypedTableView
| Type | Name | Description | |
|---|---|---|---|
| void | Private_SignalSelectionChanged
(
ESelectInfo::Type SelectInfo |
Notify the ItemsWidget that we changed its selection. |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments |
Typedefs
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| const TArray< ItemType > * | TreeItemsSource | Protected access to TreeItemsSource is deprecated. Please use GetTreeItems, SetTreeItemsSource or HasValidTreeItemsSource. |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ClearItemsSource is deprecated. You probably want to use ClearRootItemsSource. | ||
| TArrayView< const ItemType > | GetItems () |
GetItems is deprecated. You probably want to use GetRootItems. | |
| bool | HasValidItemsSource is deprecated. You probably want to use HasValidRootItemsSource. | ||
| void | SetItemsSource
(
const TArray< ItemType >* InListItemsSource |
SetItemsSource is deprecated. You probably want to use SetTreeItemsSource. | |
| void | SetItemsSource
(
TSharedRef<::UE::Slate::Containers::TObservableArray< ItemType >> InListItemsSource |
SetItemsSource is deprecated. You probably want to use SetTreeItemsSource. | |
| void | SetItemsSource
(
TUniquePtr< UE::Slate::ItemsSource::IItemsSource< ItemType >> Provider |
SetItemsSource is deprecated. You probably want to use SetTreeItemsSource. |