A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
FDlgTreeViewNode< SelfType > Class Template Reference

#include <DlgTreeViewNode.h>

Inheritance diagram for FDlgTreeViewNode< SelfType >:
[legend]

Public Member Functions

 FDlgTreeViewNode (const FText &InDisplayText, const TSharedPtr< SelfType > &InParent)
 
virtual ~FDlgTreeViewNode ()
 
virtual void AddChild (const TSharedPtr< SelfType > &ChildNode)
 
virtual void ClearChildren ()
 
void ClearParent ()
 
bool DoesDisplayTextContains (const FString &InSearch, ESearchCase::Type SearchCase=ESearchCase::IgnoreCase)
 
void ExpandAllChildren (const TSharedPtr< STreeView< TSharedPtr< SelfType > > > &TreeView, bool bRecursive=true)
 
virtual void FilterPathsToNodesThatContainText (const FString &InSearch, TArray< TArray< TSharedPtr< SelfType > > > &OutNodes)
 
void GetAllNodes (TArray< TSharedPtr< SelfType > > &OutNodeArray) const
 
const TArray< TSharedPtr< SelfType > > & GetChildren () const
 
FText GetDisplayText () const
 
FName GetDisplayTextAsFName () const
 
TWeakPtr< SelfType > GetParent () const
 
void GetVisibleChildren (TArray< TSharedPtr< SelfType > > &OutChildren)
 
bool HasChildren () const
 
bool HasParent () const
 
bool IsLeaf () const
 
bool IsRoot () const
 
bool IsVisible () const
 
virtual FReply OnClick ()
 
virtual void SetChildren (const TArray< TSharedPtr< SelfType > > &InChildren)
 
void SetDisplayText (const FText &InText)
 
void SetIsVisible (bool InIsVisible)
 
void SetParent (TWeakPtr< SelfType > InParentNode)
 

Protected Member Functions

virtual bool FilterDoesChildContainText (const TSharedPtr< SelfType > &Child, const FString &InSearch)
 
virtual bool FilterIsChildVisible (const TSharedPtr< SelfType > &GrandChild)
 
virtual void GetPathToChildThatContainsText (const TSharedPtr< SelfType > &Child, const FString &InSearch, TArray< TArray< TSharedPtr< SelfType > > > &OutNodes)
 
virtual void PostBuildPathToTopMostParent (const TSharedPtr< SelfType > &CurrentParentNode)
 
virtual void PostFilterPathsToNodes (const TSharedPtr< SelfType > &Child)
 

Protected Attributes

bool bIsVisible = true
 
TArray< TSharedPtr< SelfType > > Children
 
FText DisplayText
 
TWeakPtr< SelfType > Parent
 

Detailed Description

template<class SelfType>
class FDlgTreeViewNode< SelfType >

Base Tree Node for all Nodes used in the STreeView.

Definition at line 9 of file DlgTreeViewNode.h.

Constructor & Destructor Documentation

◆ FDlgTreeViewNode()

template<class SelfType >
FDlgTreeViewNode< SelfType >::FDlgTreeViewNode ( const FText & InDisplayText,
const TSharedPtr< SelfType > & InParent )
inline

Definition at line 13 of file DlgTreeViewNode.h.

◆ ~FDlgTreeViewNode()

template<class SelfType >
virtual FDlgTreeViewNode< SelfType >::~FDlgTreeViewNode ( )
inlinevirtual

Definition at line 15 of file DlgTreeViewNode.h.

Member Function Documentation

◆ AddChild()

template<class SelfType >
virtual void FDlgTreeViewNode< SelfType >::AddChild ( const TSharedPtr< SelfType > & ChildNode)
inlinevirtual

Reimplemented in FDialogueBrowserTreeNode.

Definition at line 57 of file DlgTreeViewNode.h.

Here is the caller graph for this function:

◆ ClearChildren()

template<class SelfType >
virtual void FDlgTreeViewNode< SelfType >::ClearChildren ( )
inlinevirtual

Reimplemented in FDialogueBrowserTreeNode.

Definition at line 72 of file DlgTreeViewNode.h.

Here is the caller graph for this function:

◆ ClearParent()

template<class SelfType >
void FDlgTreeViewNode< SelfType >::ClearParent ( )
inline

Definition at line 42 of file DlgTreeViewNode.h.

◆ DoesDisplayTextContains()

template<class SelfType >
bool FDlgTreeViewNode< SelfType >::DoesDisplayTextContains ( const FString & InSearch,
ESearchCase::Type SearchCase = ESearchCase::IgnoreCase )
inline

Definition at line 33 of file DlgTreeViewNode.h.

◆ ExpandAllChildren()

template<class SelfType >
void FDlgTreeViewNode< SelfType >::ExpandAllChildren ( const TSharedPtr< STreeView< TSharedPtr< SelfType > > > & TreeView,
bool bRecursive = true )
inline

Takes the tree view and expands its elements for each child.

Parameters
TreeViewThe tree responsible for visualizing this node hierarchy.
bRecursiveDetermines if you want children/descendants to expand their children as well.

Definition at line 93 of file DlgTreeViewNode.h.

Here is the call graph for this function:

◆ FilterDoesChildContainText()

template<class SelfType >
virtual bool FDlgTreeViewNode< SelfType >::FilterDoesChildContainText ( const TSharedPtr< SelfType > & Child,
const FString & InSearch )
inlineprotectedvirtual

Called inside GetPathToChildThatContainsText to determine if the child has the text

Reimplemented in FDlgDataDisplayTreeNode, and FDialogueBrowserTreeNode.

Definition at line 163 of file DlgTreeViewNode.h.

Here is the caller graph for this function:

◆ FilterIsChildVisible()

template<class SelfType >
virtual bool FDlgTreeViewNode< SelfType >::FilterIsChildVisible ( const TSharedPtr< SelfType > & GrandChild)
inlineprotectedvirtual

Called inside GetPathToChildThatContainsText after we got the path of the GrandChild

Reimplemented in FDlgDataDisplayTreeNode, and FDialogueBrowserTreeNode.

Definition at line 157 of file DlgTreeViewNode.h.

Here is the caller graph for this function:

◆ FilterPathsToNodesThatContainText()

template<class SelfType >
virtual void FDlgTreeViewNode< SelfType >::FilterPathsToNodesThatContainText ( const FString & InSearch,
TArray< TArray< TSharedPtr< SelfType > > > & OutNodes )
inlinevirtual

Searches the node so that the OutNodes will only contains paths to nodes that contains the specified string.

Parameters
InSearchThe string to search by
OutNodesArray of arrays, each array inside represents a node path that points to the Node that contains the InSearch

Definition at line 136 of file DlgTreeViewNode.h.

Here is the call graph for this function:

◆ GetAllNodes()

template<class SelfType >
void FDlgTreeViewNode< SelfType >::GetAllNodes ( TArray< TSharedPtr< SelfType > > & OutNodeArray) const
inline

Recursively collects all child/grandchild/descendant nodes. Aka Flattened tree.

Parameters
OutNodeArrayThe array to fill out with descendant nodes.

Definition at line 122 of file DlgTreeViewNode.h.

◆ GetChildren()

template<class SelfType >
const TArray< TSharedPtr< SelfType > > & FDlgTreeViewNode< SelfType >::GetChildren ( ) const
inline

Definition at line 46 of file DlgTreeViewNode.h.

◆ GetDisplayText()

template<class SelfType >
FText FDlgTreeViewNode< SelfType >::GetDisplayText ( ) const
inline

Definition at line 30 of file DlgTreeViewNode.h.

◆ GetDisplayTextAsFName()

template<class SelfType >
FName FDlgTreeViewNode< SelfType >::GetDisplayTextAsFName ( ) const
inline

Definition at line 31 of file DlgTreeViewNode.h.

◆ GetParent()

template<class SelfType >
TWeakPtr< SelfType > FDlgTreeViewNode< SelfType >::GetParent ( ) const
inline

Definition at line 40 of file DlgTreeViewNode.h.

◆ GetPathToChildThatContainsText()

template<class SelfType >
virtual void FDlgTreeViewNode< SelfType >::GetPathToChildThatContainsText ( const TSharedPtr< SelfType > & Child,
const FString & InSearch,
TArray< TArray< TSharedPtr< SelfType > > > & OutNodes )
inlineprotectedvirtual

Definition at line 168 of file DlgTreeViewNode.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetVisibleChildren()

template<class SelfType >
void FDlgTreeViewNode< SelfType >::GetVisibleChildren ( TArray< TSharedPtr< SelfType > > & OutChildren)
inline

Definition at line 47 of file DlgTreeViewNode.h.

◆ HasChildren()

template<class SelfType >
bool FDlgTreeViewNode< SelfType >::HasChildren ( ) const
inline

Definition at line 45 of file DlgTreeViewNode.h.

Here is the caller graph for this function:

◆ HasParent()

template<class SelfType >
bool FDlgTreeViewNode< SelfType >::HasParent ( ) const
inline

Definition at line 39 of file DlgTreeViewNode.h.

◆ IsLeaf()

template<class SelfType >
bool FDlgTreeViewNode< SelfType >::IsLeaf ( ) const
inline

Is this the leaf node? Aka no children.

Definition at line 85 of file DlgTreeViewNode.h.

◆ IsRoot()

template<class SelfType >
bool FDlgTreeViewNode< SelfType >::IsRoot ( ) const
inline

Is this the root node? Aka no parent.

Definition at line 82 of file DlgTreeViewNode.h.

◆ IsVisible()

template<class SelfType >
bool FDlgTreeViewNode< SelfType >::IsVisible ( ) const
inline

Definition at line 78 of file DlgTreeViewNode.h.

◆ OnClick()

◆ PostBuildPathToTopMostParent()

template<class SelfType >
virtual void FDlgTreeViewNode< SelfType >::PostBuildPathToTopMostParent ( const TSharedPtr< SelfType > & CurrentParentNode)
inlineprotectedvirtual

Called inside GetPathToChildThatContainsText after we advanced one parent in the path

Reimplemented in FDlgDataDisplayTreeNode, and FDialogueBrowserTreeNode.

Definition at line 154 of file DlgTreeViewNode.h.

Here is the caller graph for this function:

◆ PostFilterPathsToNodes()

template<class SelfType >
virtual void FDlgTreeViewNode< SelfType >::PostFilterPathsToNodes ( const TSharedPtr< SelfType > & Child)
inlineprotectedvirtual

Called inside FilterPathsToNodesThatContainText after we got the path for the current Child.

Reimplemented in FDlgDataDisplayTreeNode, and FDialogueBrowserTreeNode.

Definition at line 151 of file DlgTreeViewNode.h.

Here is the caller graph for this function:

◆ SetChildren()

template<class SelfType >
virtual void FDlgTreeViewNode< SelfType >::SetChildren ( const TArray< TSharedPtr< SelfType > > & InChildren)
inlinevirtual

Definition at line 63 of file DlgTreeViewNode.h.

◆ SetDisplayText()

template<class SelfType >
void FDlgTreeViewNode< SelfType >::SetDisplayText ( const FText & InText)
inline

Definition at line 32 of file DlgTreeViewNode.h.

◆ SetIsVisible()

template<class SelfType >
void FDlgTreeViewNode< SelfType >::SetIsVisible ( bool InIsVisible)
inline

Definition at line 79 of file DlgTreeViewNode.h.

◆ SetParent()

template<class SelfType >
void FDlgTreeViewNode< SelfType >::SetParent ( TWeakPtr< SelfType > InParentNode)
inline

Definition at line 41 of file DlgTreeViewNode.h.

Member Data Documentation

◆ bIsVisible

template<class SelfType >
bool FDlgTreeViewNode< SelfType >::bIsVisible = true
protected

Is this node displayed?

Definition at line 226 of file DlgTreeViewNode.h.

◆ Children

template<class SelfType >
TArray<TSharedPtr<SelfType> > FDlgTreeViewNode< SelfType >::Children
protected

Any children listed under this node.

Definition at line 217 of file DlgTreeViewNode.h.

◆ DisplayText

template<class SelfType >
FText FDlgTreeViewNode< SelfType >::DisplayText
protected

The displayed text for this item.

Definition at line 223 of file DlgTreeViewNode.h.

◆ Parent

template<class SelfType >
TWeakPtr<SelfType> FDlgTreeViewNode< SelfType >::Parent
protected

The node that this is a direct child of (empty if this is a root node)

Definition at line 220 of file DlgTreeViewNode.h.


The documentation for this class was generated from the following file: