Navigation
API > API/Editor > API/Editor/DataHierarchyEditor
The main controller class for the SHierarchyEditor widget. Defines core hierarchy rules. Inherit from this and override the required virtual functions, instantiate an object, Initialize it and pass it to the SHierarchyEditor widget.
| Name | UDataHierarchyViewModelBase |
| Type | class |
| Header File | /Engine/Source/Editor/DataHierarchyEditor/Public/DataHierarchyViewModelBase.h |
| Include Path | #include "DataHierarchyViewModelBase.h" |
Syntax
UCLASS (MinimalAPI, Abstract, Transient)
class UDataHierarchyViewModelBase :
public UObject ,
public FSelfRegisteringEditorUndoClient
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UDataHierarchyViewModelBase
- FEditorUndoClient → FSelfRegisteringEditorUndoClient → UDataHierarchyViewModelBase
Derived Classes
UDataHierarchyViewModelBase derived class hierarchy
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
UDataHierarchyViewModelBase() |
DataHierarchyViewModelBase.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~UDataHierarchyViewModelBase() |
DataHierarchyViewModelBase.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FOnHierarchyChanged | TMulticastDelegate_OneParam< void, const TInstancedStruct< FHierarchyChangedPayload > & > | DataHierarchyViewModelBase.h | |
| FOnNavigateToElementIdentityInHierarchyRequested | TBaseDelegate_OneParam< void, FHierarchyElementIdentity Identity > | DataHierarchyViewModelBase.h | |
| FOnNavigateToElementInHierarchyRequested | TBaseDelegate_OneParam< void, TSharedPtr< FHierarchyElementViewModel > ElementViewModel > | DataHierarchyViewModelBase.h | |
| FOnRefreshViewRequested | TBaseDelegate_OneParam< void, bool bForceFullRefresh > | DataHierarchyViewModelBase.h | |
| FOnSectionActivated | TBaseDelegate_OneParam< void, TSharedPtr< FHierarchySectionViewModel > Section > | DataHierarchyViewModelBase.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| AllSectionDisplayName | FText | DataHierarchyViewModelBase.h | |
| AllSectionHierarchyObjectName | FName | DataHierarchyViewModelBase.h | |
| AllSectionSourceObjectName | FName | DataHierarchyViewModelBase.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllSection | TObjectPtr< UHierarchySection > | We construct a transient all section that isn't actually contained within the hierarchy. | DataHierarchyViewModelBase.h |
|
| bIsFinalized | bool | DataHierarchyViewModelBase.h |
|
|
| bIsInitialized | bool | DataHierarchyViewModelBase.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddCategory
(
TSharedPtr< FHierarchyElementViewModel > CategoryParent |
DataHierarchyViewModelBase.h | ||
void AddElementUnderRoot
(
TSubclassOf< UHierarchyElement > NewChildClass, |
DataHierarchyViewModelBase.h | ||
TSharedPtr< FHierarchyElementViewModel > CreateViewModelForElement
(
UHierarchyElement* Element, |
Creates view model hierarchy elements. | DataHierarchyViewModelBase.h | |
void DeleteElements
(
TArray< TSharedPtr< FHierarchyElementViewModel > > ViewModels |
Delete all specified elements. | DataHierarchyViewModelBase.h | |
void DeleteElementWithIdentity
(
FHierarchyElementIdentity Identity |
Special case for deleting a specific element based on its identity. | DataHierarchyViewModelBase.h | |
void Finalize() |
Call Finalize manually when you no longer need the HierarchyViewModel. | DataHierarchyViewModelBase.h | |
void ForceFullRefresh() |
Refreshes all data and widgets | DataHierarchyViewModelBase.h | |
void ForceFullRefreshOnTimer() |
DataHierarchyViewModelBase.h | ||
const UHierarchySection * GetActiveHierarchySectionData() |
DataHierarchyViewModelBase.h | ||
TSharedPtr< FHierarchySectionViewModel > GetActiveHierarchySectionViewModel() |
DataHierarchyViewModelBase.h | ||
TSharedRef< FUICommandList > GetCommands() |
DataHierarchyViewModelBase.h | ||
FName GetContextMenuName() |
DataHierarchyViewModelBase.h | ||
TSharedPtr< struct FHierarchySectionViewModel > GetDefaultHierarchySectionViewModel() |
DataHierarchyViewModelBase.h | ||
const TArray< TSharedPtr< FHierarchyElementViewModel > > & GetHierarchyItems () |
Hierarchy items reflect the already edited hierarchy. | DataHierarchyViewModelBase.h | |
TSharedPtr< struct FHierarchyRootViewModel > GetHierarchyRootViewModel() |
Get the root view model associated with the hierarchy. | DataHierarchyViewModelBase.h | |
FOnHierarchyChanged & GetOnHierarchyChangedDelegate() |
Delegates for external systems. | DataHierarchyViewModelBase.h | |
const UHierarchyDataRefreshContext * GetRefreshContext() |
DataHierarchyViewModelBase.h | ||
void Initialize () |
Initialize is called automatically for you, but it is recommended to call it manually after creating the HierarchyViewModel in your own Initialize function. | DataHierarchyViewModelBase.h | |
bool IsFinalized() |
DataHierarchyViewModelBase.h | ||
bool IsHierarchySectionActive
(
const UHierarchySection* Section |
DataHierarchyViewModelBase.h | ||
bool IsInitialized() |
DataHierarchyViewModelBase.h | ||
bool IsValid() |
DataHierarchyViewModelBase.h | ||
void NavigateToElementInHierarchy
(
const FHierarchyElementIdentity& HierarchyIdentity |
DataHierarchyViewModelBase.h | ||
void NavigateToElementInHierarchy
(
const TSharedRef< FHierarchyElementViewModel > HierarchyElement |
DataHierarchyViewModelBase.h | ||
FString OnElementToStringDebug
(
TSharedPtr< FHierarchyElementViewModel > ElementViewModel |
DataHierarchyViewModelBase.h | ||
void OnGetChildren
(
TSharedPtr< FHierarchyElementViewModel > Element, |
DataHierarchyViewModelBase.h | ||
FOnSectionActivated & OnHierarchySectionActivated() |
DataHierarchyViewModelBase.h | ||
FSimpleDelegate & OnInitialized() |
DataHierarchyViewModelBase.h | ||
FOnNavigateToElementIdentityInHierarchyRequested & OnNavigateToElementIdentityInHierarchyRequested() |
DataHierarchyViewModelBase.h | ||
FOnNavigateToElementInHierarchyRequested & OnNavigateToElementInHierarchyRequested() |
DataHierarchyViewModelBase.h | ||
FOnRefreshViewRequested & OnRefreshHierarchyView() |
DataHierarchyViewModelBase.h | ||
FSimpleDelegate & OnRefreshSectionsView() |
DataHierarchyViewModelBase.h | ||
FSimpleDelegate & OnRefreshSourceItemsRequested() |
Delegate that call functions from SHierarchyEditor. | DataHierarchyViewModelBase.h | |
FOnRefreshViewRequested & OnRefreshSourceView() |
DataHierarchyViewModelBase.h | ||
FOnRefreshViewRequested & OnRefreshViewRequested() |
DataHierarchyViewModelBase.h | ||
void RefreshAllViews
(
bool bFullRefresh |
DataHierarchyViewModelBase.h | ||
void RefreshHierarchyView
(
bool bFullRefresh |
DataHierarchyViewModelBase.h | ||
void RefreshSectionsView() |
DataHierarchyViewModelBase.h | ||
void RefreshSourceView
(
bool bFullRefresh |
DataHierarchyViewModelBase.h | ||
void RequestFullRefreshNextFrame() |
DataHierarchyViewModelBase.h | ||
void SetActiveHierarchySection
(
TSharedPtr< struct FHierarchySectionViewModel > |
Sections. | DataHierarchyViewModelBase.h | |
void SetRefreshContext
(
UHierarchyDataRefreshContext* InContext |
Set the refresh context to easily allow Hierarchy Elements representing external data to access whether the external data still exists. | DataHierarchyViewModelBase.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TSharedRef< FHierarchyDragDropOp > CreateDragDropOp
(
const FDataHierarchyDragDropContext& DragContext |
Function to implement drag drop ops. | DataHierarchyViewModelBase.h | |
virtual TArray< TSubclassOf< UHierarchyElement > > GetAdditionalTypesToAddInUi() |
If specified, will add a button in the Data Hierarchy Editor that allows adding the given types from a menu rather than drag & dropping them into the hierarchy. | DataHierarchyViewModelBase.h | |
virtual TSubclassOf< UHierarchyCategory > GetCategoryDataClass () |
The class used for creating categories. | DataHierarchyViewModelBase.h | |
virtual UHierarchyRoot * GetHierarchyRoot () |
The hierarchy root the widget is editing. | DataHierarchyViewModelBase.h | |
virtual ESelectionMode::Type GetHierarchySelectionMode () |
The selection mode used for the hierarchy tree view. | DataHierarchyViewModelBase.h | |
| Overriding this allows to define details panel instance customizations for specific UClasses | DataHierarchyViewModelBase.h | ||
virtual UObject * GetOuterForSourceRoot() |
The outer for the transient source root creation can be overridden. | DataHierarchyViewModelBase.h | |
virtual TSubclassOf< UHierarchySection > GetSectionDataClass () |
The class used for creating sections. | DataHierarchyViewModelBase.h | |
virtual void OnHierarchyChanged
(
const TInstancedStruct< FHierarchyChangedPayload >& Payload |
Generic callback for when something in the hierarchy has changed. | DataHierarchyViewModelBase.h | |
virtual void PrepareSourceItems
(
UHierarchyRoot* SourceRoot, |
Prepares the items we want to create a hierarchy for. | DataHierarchyViewModelBase.h | |
virtual bool SelectRootInsteadOfNone () |
Attempts to select the root object when no object is selected. | DataHierarchyViewModelBase.h | |
virtual bool SupportsDetailsPanel() |
This needs to return true if you want the details panel to show up. | DataHierarchyViewModelBase.h | |
virtual bool SupportsMultiEditInDetailsPanel () |
If true, selecting multiple elements will show a multi-object details panel. | DataHierarchyViewModelBase.h | |
virtual bool SupportsSourcePanel() |
If false, disables source item functionality (left panel). | DataHierarchyViewModelBase.h |
Protected Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool MatchesContext
(
const FTransactionContext& InContext, |
DataHierarchyViewModelBase.h | ||
virtual void PostRedo
(
bool bSuccess |
DataHierarchyViewModelBase.h | ||
virtual void PostUndo
(
bool bSuccess |
DataHierarchyViewModelBase.h | ||
virtual void SetupCommands() |
Additional commands can be specified overriding the SetupCommands function. | DataHierarchyViewModelBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void GenerateDynamicContextMenu
(
UToolMenu* ToolMenu |
DataHierarchyViewModelBase.h |