Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


BaseTreeViewController

Base collection tree view controller. View controllers of this type are meant to take care of data virtualized by any BaseTreeView inheritor.
Read time 3 minutesLast updated 5 days ago

Definition

public abstract class BaseTreeViewController : CollectionViewController, IDisposable

Constructors

Constructor

Description

BaseTreeViewController()Constructor for a BaseTreeViewController

Properties

Property

Description

baseTreeViewView for this controller, cast as a BaseTreeView.
itemsSourceItems for this tree.

Methods

Method

Description

CanChangeExpandedStateDetermines whether the item with the specified ID can be expanded or collapsed.
CollapseAllCollapses all items in the tree and refreshes the view.
CollapseItemCollapses the item with the specified ID, hiding its children. Allows to collapse the whole hierarchy under that item.
CollapseItemByIndexCollapses the item with the specified index, hiding its children. Allows to collapse the whole hierarchy under that item.
ExistsChecks if an ID exists within this tree.
ExpandAllExpands all items in the tree and refreshes the view.
ExpandItemExpands the item with the specified ID, making its children visible. Allows to expand the whole hierarchy under that item.
ExpandItemByIndexExpands the item with the specified index, making his children visible. Allows to expand the whole hierarchy under that item.
GetAllItemIdsReturns all item IDs that can be found in the tree, optionally specifying root IDs from where to start.
GetChildIndexForIdGets the child index under the parent of the item with the specified ID.
GetChildrenIdsGet all children of a specific ID in the tree.
GetChildrenIdsByIndexGets the children IDs of the item with the specified index.
GetIdForIndexReturns the ID for a specified index in the visible items source.
GetIndentationDepthReturns the depth of the element at that ID.
GetIndentationDepthByIndexReturn the depth of the element at that index.
GetIndexForIdReturns the index in the source of the item, by ID.
GetParentIdReturns the parent ID of an item, by ID.
GetRootItemIdsReturns the root items of the tree, by IDs.
GetTreeItemsCountGet the number of items in the whole tree.
HasChildrenReturn whether the item with the specified ID has one or more child.
HasChildrenByIndexReturn whether the item with the specified index has one or more child.
IsExpandedReturn whether the item with the specified ID is expanded in the tree.
IsExpandedByIndexReturn whether the item with the specified index is expanded in the tree.
MoveMoves an item by ID, to a new parent and child index.
TryRemoveItemRemoves an item by id.

Inheritance