engine
 
载入中...
搜索中...
未找到
Public 成员函数 | 所有成员列表
TreeFilterHandler< ItemType > 模板类 参考

Handles filtering and expanding a TreeView using an IFilter implementation. 更多...

#include <TreeFilterHandler.h>

Public 成员函数

bool GetIsEnabled ()
 Gets whether or not filtering is enabled for the TreeView.
 
void OnGetFilteredChildren (ItemType Parent, TArray< ItemType > &FilteredChildren)
 Gets the children for a node in the tree which pass the filter if filtering is enabled, or gets all children if the filter is not enabled. 更多...
 
void RefreshAndFilterTree ()
 Refreshes the associated TreeView, filtering items if the filter is enabled. 更多...
 
void RemoveCachedItem (ItemType ItemToRemove)
 Removes any cached references to an item.
 
void SetFilter (IFilter< ItemType > *InFilter)
 Sets the filter which will be used to filter the items in the TreeView.
 
void SetGetChildrenDelegate (FOnGetChildren InGetChildrenDelegate)
 Sets the delegate which should be used for traversing the children of the nodes in the tree.
 
void SetIsEnabled (bool bInIsEnabled)
 Sets whether or not filtering the tree is enabled. 更多...
 
void SetRootItems (TArray< ItemType > *InRootItems, TArray< ItemType > *InTreeRootItems)
 Sets the root data arrays for the tree. 更多...
 
void SetTreeView (STreeView< ItemType > *InTreeView)
 Sets the TreeView to be filtered.
 

详细描述

template<typename ItemType>
class TreeFilterHandler< ItemType >

Handles filtering and expanding a TreeView using an IFilter implementation.

成员函数说明

◆ OnGetFilteredChildren()

template<typename ItemType >
void TreeFilterHandler< ItemType >::OnGetFilteredChildren ( ItemType  Parent,
TArray< ItemType > &  FilteredChildren 
)
inline

Gets the children for a node in the tree which pass the filter if filtering is enabled, or gets all children if the filter is not enabled.

In order for filtering to work correctly this function must be used for the TreeView's OnGetChildren delegate.

◆ RefreshAndFilterTree()

template<typename ItemType >
void TreeFilterHandler< ItemType >::RefreshAndFilterTree ( )
inline

Refreshes the associated TreeView, filtering items if the filter is enabled.

When filtering, the expanded state of the items is saved, and when the filter is cleared the pre-filter expand state is restored.

◆ SetIsEnabled()

template<typename ItemType >
void TreeFilterHandler< ItemType >::SetIsEnabled ( bool  bInIsEnabled)
inline

Sets whether or not filtering the tree is enabled.

Calling this DOES NOT refresh the tree, this must be done by calling RefreshAndFilterTree.

◆ SetRootItems()

template<typename ItemType >
void TreeFilterHandler< ItemType >::SetRootItems ( TArray< ItemType > *  InRootItems,
TArray< ItemType > *  InTreeRootItems 
)
inline

Sets the root data arrays for the tree.

参数
RootItemsAn array of source root items to be displayed by the tree.
TreeRootItemsThe array of root items which are set as the ItemsSource of the tree. This array will be modified to reflect any filtering.

该类的文档由以下文件生成: