Show / Hide Table of Contents

Class TreeView

Inheritance
Object
TreeView
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: UnityEditor.IMGUI.Controls
Assembly: UnityEditor.dll
Syntax
public abstract class TreeView

Constructors

| Improve this Doc View Source

TreeView(TreeViewState)

Declaration
public TreeView(TreeViewState state)
Parameters
Type Name Description
TreeViewState state
| Improve this Doc View Source

TreeView(TreeViewState, MultiColumnHeader)

Declaration
public TreeView(TreeViewState state, MultiColumnHeader multiColumnHeader)
Parameters
Type Name Description
TreeViewState state
MultiColumnHeader multiColumnHeader

Properties

| Improve this Doc View Source

baseIndent

Declaration
protected float baseIndent { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

cellMargin

Declaration
protected float cellMargin { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

columnIndexForTreeFoldouts

Declaration
protected int columnIndexForTreeFoldouts { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

customFoldoutYOffset

Declaration
protected float customFoldoutYOffset { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

depthIndentWidth

Declaration
protected float depthIndentWidth { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

extraSpaceBeforeIconAndLabel

Declaration
protected float extraSpaceBeforeIconAndLabel { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

foldoutOverride

Declaration
protected TreeView.DoFoldoutCallback foldoutOverride { get; set; }
Property Value
Type Description
TreeView.DoFoldoutCallback
| Improve this Doc View Source

foldoutWidth

Declaration
protected float foldoutWidth { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

getNewSelectionOverride

Declaration
protected TreeView.GetNewSelectionFunction getNewSelectionOverride { set; }
Property Value
Type Description
TreeView.GetNewSelectionFunction
| Improve this Doc View Source

hasSearch

Declaration
public bool hasSearch { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isDragging

Declaration
protected bool isDragging { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

isInitialized

Declaration
protected bool isInitialized { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

multiColumnHeader

Declaration
public MultiColumnHeader multiColumnHeader { get; set; }
Property Value
Type Description
MultiColumnHeader
| Improve this Doc View Source

rootItem

Declaration
protected TreeViewItem rootItem { get; }
Property Value
Type Description
TreeViewItem
| Improve this Doc View Source

rowHeight

Declaration
protected float rowHeight { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

searchString

Declaration
public string searchString { get; set; }
Property Value
Type Description
String
| Improve this Doc View Source

showAlternatingRowBackgrounds

Declaration
protected bool showAlternatingRowBackgrounds { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

showBorder

Declaration
protected bool showBorder { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

showingHorizontalScrollBar

Declaration
protected bool showingHorizontalScrollBar { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

showingVerticalScrollBar

Declaration
protected bool showingVerticalScrollBar { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

state

Declaration
public TreeViewState state { get; }
Property Value
Type Description
TreeViewState
| Improve this Doc View Source

totalHeight

Declaration
public float totalHeight { get; }
Property Value
Type Description
Single
| Improve this Doc View Source

treeViewControlID

Declaration
public int treeViewControlID { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

treeViewRect

Declaration
protected Rect treeViewRect { get; set; }
Property Value
Type Description
Rect
| Improve this Doc View Source

useScrollView

Declaration
protected bool useScrollView { get; set; }
Property Value
Type Description
Boolean

Methods

| Improve this Doc View Source

AddExpandedRows(TreeViewItem, IList<TreeViewItem>)

Declaration
protected void AddExpandedRows(TreeViewItem root, IList<TreeViewItem> rows)
Parameters
Type Name Description
TreeViewItem root
IList<TreeViewItem> rows
| Improve this Doc View Source

AfterRowsGUI()

Declaration
protected virtual void AfterRowsGUI()
| Improve this Doc View Source

BeforeRowsGUI()

Declaration
protected virtual void BeforeRowsGUI()
| Improve this Doc View Source

BeginRename(TreeViewItem)

Declaration
public bool BeginRename(TreeViewItem item)
Parameters
Type Name Description
TreeViewItem item
Returns
Type Description
Boolean
| Improve this Doc View Source

BeginRename(TreeViewItem, Single)

Declaration
public bool BeginRename(TreeViewItem item, float delay)
Parameters
Type Name Description
TreeViewItem item
Single delay
Returns
Type Description
Boolean
| Improve this Doc View Source

BuildRoot()

Declaration
protected abstract TreeViewItem BuildRoot()
Returns
Type Description
TreeViewItem
| Improve this Doc View Source

BuildRows(TreeViewItem)

Declaration
protected virtual IList<TreeViewItem> BuildRows(TreeViewItem root)
Parameters
Type Name Description
TreeViewItem root
Returns
Type Description
IList<TreeViewItem>
| Improve this Doc View Source

CanBeParent(TreeViewItem)

Declaration
protected virtual bool CanBeParent(TreeViewItem item)
Parameters
Type Name Description
TreeViewItem item
Returns
Type Description
Boolean
| Improve this Doc View Source

CanChangeExpandedState(TreeViewItem)

Declaration
protected virtual bool CanChangeExpandedState(TreeViewItem item)
Parameters
Type Name Description
TreeViewItem item
Returns
Type Description
Boolean
| Improve this Doc View Source

CanMultiSelect(TreeViewItem)

Declaration
protected virtual bool CanMultiSelect(TreeViewItem item)
Parameters
Type Name Description
TreeViewItem item
Returns
Type Description
Boolean
| Improve this Doc View Source

CanRename(TreeViewItem)

Declaration
protected virtual bool CanRename(TreeViewItem item)
Parameters
Type Name Description
TreeViewItem item
Returns
Type Description
Boolean
| Improve this Doc View Source

CanStartDrag(TreeView.CanStartDragArgs)

Declaration
protected virtual bool CanStartDrag(TreeView.CanStartDragArgs args)
Parameters
Type Name Description
TreeView.CanStartDragArgs args
Returns
Type Description
Boolean
| Improve this Doc View Source

CenterRectUsingSingleLineHeight(ref Rect)

Declaration
protected void CenterRectUsingSingleLineHeight(ref Rect rect)
Parameters
Type Name Description
Rect rect
| Improve this Doc View Source

CollapseAll()

Declaration
public void CollapseAll()
| Improve this Doc View Source

CommandEventHandling()

Declaration
protected virtual void CommandEventHandling()
| Improve this Doc View Source

ContextClicked()

Declaration
protected virtual void ContextClicked()
| Improve this Doc View Source

ContextClickedItem(Int32)

Declaration
protected virtual void ContextClickedItem(int id)
Parameters
Type Name Description
Int32 id
| Improve this Doc View Source

CreateChildListForCollapsedParent()

Declaration
protected static List<TreeViewItem> CreateChildListForCollapsedParent()
Returns
Type Description
List<TreeViewItem>
| Improve this Doc View Source

DoesItemMatchSearch(TreeViewItem, String)

Declaration
protected virtual bool DoesItemMatchSearch(TreeViewItem item, string search)
Parameters
Type Name Description
TreeViewItem item
String search
Returns
Type Description
Boolean
| Improve this Doc View Source

DoubleClickedItem(Int32)

Declaration
protected virtual void DoubleClickedItem(int id)
Parameters
Type Name Description
Int32 id
| Improve this Doc View Source

EndRename()

Declaration
public void EndRename()
| Improve this Doc View Source

ExpandAll()

Declaration
public void ExpandAll()
| Improve this Doc View Source

ExpandedStateChanged()

Declaration
protected virtual void ExpandedStateChanged()
| Improve this Doc View Source

FindItem(Int32, TreeViewItem)

Declaration
protected TreeViewItem FindItem(int id, TreeViewItem searchFromThisItem)
Parameters
Type Name Description
Int32 id
TreeViewItem searchFromThisItem
Returns
Type Description
TreeViewItem
| Improve this Doc View Source

FindRows(IList<Int32>)

Declaration
protected IList<TreeViewItem> FindRows(IList<int> ids)
Parameters
Type Name Description
IList<Int32> ids
Returns
Type Description
IList<TreeViewItem>
| Improve this Doc View Source

FrameItem(Int32)

Declaration
public void FrameItem(int id)
Parameters
Type Name Description
Int32 id
| Improve this Doc View Source

GetAncestors(Int32)

Declaration
protected virtual IList<int> GetAncestors(int id)
Parameters
Type Name Description
Int32 id
Returns
Type Description
IList<Int32>
| Improve this Doc View Source

GetCellRectForTreeFoldouts(Rect)

Declaration
protected Rect GetCellRectForTreeFoldouts(Rect rowRect)
Parameters
Type Name Description
Rect rowRect
Returns
Type Description
Rect
| Improve this Doc View Source

GetContentIndent(TreeViewItem)

Declaration
protected float GetContentIndent(TreeViewItem item)
Parameters
Type Name Description
TreeViewItem item
Returns
Type Description
Single
| Improve this Doc View Source

GetCustomRowHeight(Int32, TreeViewItem)

Declaration
protected virtual float GetCustomRowHeight(int row, TreeViewItem item)
Parameters
Type Name Description
Int32 row
TreeViewItem item
Returns
Type Description
Single
| Improve this Doc View Source

GetDescendantsThatHaveChildren(Int32)

Declaration
protected virtual IList<int> GetDescendantsThatHaveChildren(int id)
Parameters
Type Name Description
Int32 id
Returns
Type Description
IList<Int32>
| Improve this Doc View Source

GetExpanded()

Declaration
public IList<int> GetExpanded()
Returns
Type Description
IList<Int32>
| Improve this Doc View Source

GetFirstAndLastVisibleRows(out Int32, out Int32)

Declaration
protected void GetFirstAndLastVisibleRows(out int firstRowVisible, out int lastRowVisible)
Parameters
Type Name Description
Int32 firstRowVisible
Int32 lastRowVisible
| Improve this Doc View Source

GetFoldoutIndent(TreeViewItem)

Declaration
protected float GetFoldoutIndent(TreeViewItem item)
Parameters
Type Name Description
TreeViewItem item
Returns
Type Description
Single
| Improve this Doc View Source

GetRenameRect(Rect, Int32, TreeViewItem)

Declaration
protected virtual Rect GetRenameRect(Rect rowRect, int row, TreeViewItem item)
Parameters
Type Name Description
Rect rowRect
Int32 row
TreeViewItem item
Returns
Type Description
Rect
| Improve this Doc View Source

GetRowRect(Int32)

Declaration
protected Rect GetRowRect(int row)
Parameters
Type Name Description
Int32 row
Returns
Type Description
Rect
| Improve this Doc View Source

GetRows()

Declaration
public virtual IList<TreeViewItem> GetRows()
Returns
Type Description
IList<TreeViewItem>
| Improve this Doc View Source

GetSelection()

Declaration
public IList<int> GetSelection()
Returns
Type Description
IList<Int32>
| Improve this Doc View Source

HandleDragAndDrop(TreeView.DragAndDropArgs)

Declaration
protected virtual DragAndDropVisualMode HandleDragAndDrop(TreeView.DragAndDropArgs args)
Parameters
Type Name Description
TreeView.DragAndDropArgs args
Returns
Type Description
DragAndDropVisualMode
| Improve this Doc View Source

HasFocus()

Declaration
public bool HasFocus()
Returns
Type Description
Boolean
| Improve this Doc View Source

HasSelection()

Declaration
public bool HasSelection()
Returns
Type Description
Boolean
| Improve this Doc View Source

IsChildListForACollapsedParent(IList<TreeViewItem>)

Declaration
protected static bool IsChildListForACollapsedParent(IList<TreeViewItem> childList)
Parameters
Type Name Description
IList<TreeViewItem> childList
Returns
Type Description
Boolean
| Improve this Doc View Source

IsExpanded(Int32)

Declaration
public bool IsExpanded(int id)
Parameters
Type Name Description
Int32 id
Returns
Type Description
Boolean
| Improve this Doc View Source

IsSelected(Int32)

Declaration
public bool IsSelected(int id)
Parameters
Type Name Description
Int32 id
Returns
Type Description
Boolean
| Improve this Doc View Source

KeyEvent()

Declaration
protected virtual void KeyEvent()
| Improve this Doc View Source

OnGUI(Rect)

Declaration
public virtual void OnGUI(Rect rect)
Parameters
Type Name Description
Rect rect
| Improve this Doc View Source

RefreshCustomRowHeights()

Declaration
protected virtual void RefreshCustomRowHeights()
| Improve this Doc View Source

Reload()

Declaration
public void Reload()
| Improve this Doc View Source

RenameEnded(TreeView.RenameEndedArgs)

Declaration
protected virtual void RenameEnded(TreeView.RenameEndedArgs args)
Parameters
Type Name Description
TreeView.RenameEndedArgs args
| Improve this Doc View Source

Repaint()

Declaration
public void Repaint()
| Improve this Doc View Source

RowGUI(TreeView.RowGUIArgs)

Declaration
protected virtual void RowGUI(TreeView.RowGUIArgs args)
Parameters
Type Name Description
TreeView.RowGUIArgs args
| Improve this Doc View Source

SearchChanged(String)

Declaration
protected virtual void SearchChanged(string newSearch)
Parameters
Type Name Description
String newSearch
| Improve this Doc View Source

SelectAllRows()

Declaration
public void SelectAllRows()
| Improve this Doc View Source

SelectionChanged(IList<Int32>)

Declaration
protected virtual void SelectionChanged(IList<int> selectedIds)
Parameters
Type Name Description
IList<Int32> selectedIds
| Improve this Doc View Source

SelectionClick(TreeViewItem, Boolean)

Declaration
protected void SelectionClick(TreeViewItem item, bool keepMultiSelection)
Parameters
Type Name Description
TreeViewItem item
Boolean keepMultiSelection
| Improve this Doc View Source

SetExpanded(IList<Int32>)

Declaration
public void SetExpanded(IList<int> ids)
Parameters
Type Name Description
IList<Int32> ids
| Improve this Doc View Source

SetExpanded(Int32, Boolean)

Declaration
public bool SetExpanded(int id, bool expanded)
Parameters
Type Name Description
Int32 id
Boolean expanded
Returns
Type Description
Boolean
| Improve this Doc View Source

SetExpandedRecursive(Int32, Boolean)

Declaration
public void SetExpandedRecursive(int id, bool expanded)
Parameters
Type Name Description
Int32 id
Boolean expanded
| Improve this Doc View Source

SetFocus()

Declaration
public void SetFocus()
| Improve this Doc View Source

SetFocusAndEnsureSelectedItem()

Declaration
public void SetFocusAndEnsureSelectedItem()
| Improve this Doc View Source

SetSelection(IList<Int32>)

Declaration
public void SetSelection(IList<int> selectedIDs)
Parameters
Type Name Description
IList<Int32> selectedIDs
| Improve this Doc View Source

SetSelection(IList<Int32>, TreeViewSelectionOptions)

Declaration
public void SetSelection(IList<int> selectedIDs, TreeViewSelectionOptions options)
Parameters
Type Name Description
IList<Int32> selectedIDs
TreeViewSelectionOptions options
| Improve this Doc View Source

SetupDepthsFromParentsAndChildren(TreeViewItem)

Declaration
protected static void SetupDepthsFromParentsAndChildren(TreeViewItem root)
Parameters
Type Name Description
TreeViewItem root
| Improve this Doc View Source

SetupDragAndDrop(TreeView.SetupDragAndDropArgs)

Declaration
protected virtual void SetupDragAndDrop(TreeView.SetupDragAndDropArgs args)
Parameters
Type Name Description
TreeView.SetupDragAndDropArgs args
| Improve this Doc View Source

SetupParentsAndChildrenFromDepths(TreeViewItem, IList<TreeViewItem>)

Declaration
protected static void SetupParentsAndChildrenFromDepths(TreeViewItem root, IList<TreeViewItem> rows)
Parameters
Type Name Description
TreeViewItem root
IList<TreeViewItem> rows
| Improve this Doc View Source

SingleClickedItem(Int32)

Declaration
protected virtual void SingleClickedItem(int id)
Parameters
Type Name Description
Int32 id
| Improve this Doc View Source

SortItemIDsInRowOrder(IList<Int32>)

Declaration
protected IList<int> SortItemIDsInRowOrder(IList<int> ids)
Parameters
Type Name Description
IList<Int32> ids
Returns
Type Description
IList<Int32>

Extension Methods

MustExtensions.MustBeEqual<T>(T, T)
MustExtensions.MustBeEqual<T>(T, T, String)
MustExtensions.MustNotBeEqual<T>(T, T)
MustExtensions.MustNotBeEqual<T>(T, T, String)
MustExtensions.MustBeNull<T>(T)
MustExtensions.MustBeNull<T>(T, String)
MustExtensions.MustNotBeNull<T>(T)
MustExtensions.MustNotBeNull<T>(T, String)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX