Class NestedListViewController<TData, TItem, TIndex> | List View Framework | 1.1.7-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class NestedListViewController<TData, TItem, TIndex>

    Extended ListViewController for representing nested/hierarchical data

    Inheritance
    Object
    Object
    Component
    Behaviour
    MonoBehaviour
    ListViewControllerBase
    ListViewController<TData, TItem, TIndex>
    NestedListViewController<TData, TItem, TIndex>
    Inherited Members
    ListViewController<TData, TItem, TIndex>.m_Data
    ListViewController<TData, TItem, TIndex>.m_TemplateDictionary
    ListViewController<TData, TItem, TIndex>.m_ListItems
    ListViewController<TData, TItem, TIndex>.m_GrabbedRows
    ListViewController<TData, TItem, TIndex>.data
    ListViewController<TData, TItem, TIndex>.listHeight
    ListViewController<TData, TItem, TIndex>.multiSelectMode
    ListViewController<TData, TItem, TIndex>.Awake()
    ListViewController<TData, TItem, TIndex>.Start()
    ListViewController<TData, TItem, TIndex>.UpdateItems()
    ListViewController<TData, TItem, TIndex>.Recycle(TIndex)
    ListViewController<TData, TItem, TIndex>.RecycleItem(String, TItem)
    ListViewController<TData, TItem, TIndex>.UpdateVisibleItem(TData, Int32, Single, Boolean)
    ListViewController<TData, TItem, TIndex>.UpdateItem(IListViewItem, Int32, Single, Boolean, Boolean)
    ListViewController<TData, TItem, TIndex>.SetRowGrabbed(TIndex, Transform, Boolean)
    ListViewController<TData, TItem, TIndex>.GetGrabbedRow(Transform)
    ListViewController<TData, TItem, TIndex>.GetListItem(TIndex)
    ListViewController<TData, TItem, TIndex>.GetNewItem(TData, TItem)
    ListViewController<TData, TItem, TIndex>.InstantiateItem(TData)
    ListViewController<TData, TItem, TIndex>.SetMultiSelectMode(Boolean)
    ListViewController<TData, TItem, TIndex>.HasData()
    ListViewControllerBase.m_ScrollOffset
    ListViewControllerBase.m_Padding
    ListViewControllerBase.m_SettleSpeed
    ListViewControllerBase.m_Templates
    ListViewControllerBase.m_EnableSettling
    ListViewControllerBase.m_Settling
    ListViewControllerBase.m_ItemSize
    ListViewControllerBase.m_StartPosition
    ListViewControllerBase.m_Scrolling
    ListViewControllerBase.m_ScrollReturn
    ListViewControllerBase.m_ScrollDelta
    ListViewControllerBase.m_Size
    ListViewControllerBase.m_Extents
    ListViewControllerBase.scrollOffset
    ListViewControllerBase.scrollSpeed
    ListViewControllerBase.itemSize
    ListViewControllerBase.size
    ListViewControllerBase.Update()
    ListViewControllerBase.UpdateView()
    ListViewControllerBase.ComputeConditions()
    ListViewControllerBase.ScrollNext()
    ListViewControllerBase.ScrollPrevious()
    ListViewControllerBase.ScrollTo(Int32)
    ListViewControllerBase.UpdateItem(IListViewItem, Int32, Single, Boolean, Boolean)
    ListViewControllerBase.UpdateItemTransform(IListViewItem, Int32, Vector3, Quaternion, Boolean, Boolean)
    ListViewControllerBase.GetObjectSize(GameObject)
    ListViewControllerBase.OnScrollStarted()
    ListViewControllerBase.OnScrollEnded()
    ListViewControllerBase.OnScroll(PointerEventData)
    ListViewControllerBase.StartSettling(Action)
    ListViewControllerBase.EndSettling()
    ListViewControllerBase.HasData()
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(String, Single)
    MonoBehaviour.InvokeRepeating(String, Single, Single)
    MonoBehaviour.CancelInvoke(String)
    MonoBehaviour.IsInvoking(String)
    MonoBehaviour.StartCoroutine(String)
    MonoBehaviour.StartCoroutine(String, Object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(String)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(Object)
    MonoBehaviour.useGUILayout
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, Component)
    Component.TryGetComponent<T>(T)
    Component.GetComponent(String)
    Component.GetComponentInChildren(Type, Boolean)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(Boolean)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, Boolean)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(Boolean)
    Component.GetComponentsInChildren<T>(Boolean, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, Boolean)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(Boolean)
    Component.GetComponentsInParent<T>(Boolean, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.CompareTag(String)
    Component.SendMessageUpwards(String, Object, SendMessageOptions)
    Component.SendMessageUpwards(String, Object)
    Component.SendMessageUpwards(String)
    Component.SendMessageUpwards(String, SendMessageOptions)
    Component.SendMessage(String, Object)
    Component.SendMessage(String)
    Component.SendMessage(String, Object, SendMessageOptions)
    Component.SendMessage(String, SendMessageOptions)
    Component.BroadcastMessage(String, Object, SendMessageOptions)
    Component.BroadcastMessage(String, Object)
    Component.BroadcastMessage(String)
    Component.BroadcastMessage(String, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Component.rigidbody
    Component.rigidbody2D
    Component.camera
    Component.light
    Component.animation
    Component.constantForce
    Component.renderer
    Component.audio
    Component.networkView
    Component.collider
    Component.collider2D
    Component.hingeJoint
    Component.particleSystem
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(Object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, Boolean)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Namespace: Unity.ListViewFramework
    Syntax
    public abstract class NestedListViewController<TData, TItem, TIndex> : ListViewController<TData, TItem, TIndex>, IScrollHandler, IEventSystemHandler where TData : class, INestedListViewItemData<TData, TIndex> where TItem : class, INestedListViewItem<TData, TIndex>
    Type Parameters
    Name Description
    TData

    The type of object in the list of data

    TItem

    The base type of all list items

    TIndex

    The type which is used as a unique index to map data to list items

    Fields

    m_ExpandedDataLength

    The total height of all list rows, taking into account which rows are expanded

    Declaration
    protected float m_ExpandedDataLength
    Field Value
    Type Description
    Single

    m_ExpandStates

    Dictionary of item expanded state, keyed by index

    Declaration
    protected readonly Dictionary<TIndex, bool> m_ExpandStates
    Field Value
    Type Description
    Dictionary<TIndex, Boolean>

    m_UpdateStack

    Re-usable stack of "stack frame" structs for recursive loop unwinding

    Declaration
    protected readonly Stack<NestedListViewController<TData, TItem, TIndex>.UpdateData> m_UpdateStack
    Field Value
    Type Description
    Stack<NestedListViewController.UpdateData<>>

    Properties

    data

    The list of data

    Declaration
    public override List<TData> data { get; set; }
    Property Value
    Type Description
    List<TData>
    Overrides
    Unity.ListViewFramework.ListViewController<TData, TItem, TIndex>.data

    listHeight

    The total height of all list rows, used to determine the maximum amount of scroll offset before snapping back

    Declaration
    protected override float listHeight { get; }
    Property Value
    Type Description
    Single
    Overrides
    Unity.ListViewFramework.ListViewController<TData, TItem, TIndex>.listHeight

    Methods

    Awake()

    Called when the script instance is being loaded

    Declaration
    protected override void Awake()
    Overrides
    Unity.ListViewFramework.ListViewController<TData, TItem, TIndex>.Awake()

    GetExpanded(TIndex)

    Get the expanded state for the item at the given index

    Declaration
    protected bool GetExpanded(TIndex index)
    Parameters
    Type Name Description
    TIndex index

    The index for which to get the expanded state

    Returns
    Type Description
    Boolean

    The expanded state for the given index

    GetNewItem(TData, out TItem)

    Get a view item for a given datum, either from its template's pool, or by creating a new one

    Declaration
    protected override bool GetNewItem(TData datum, out TItem item)
    Parameters
    Type Name Description
    TData datum

    The datum for the desired view item

    TItem item

    The view item

    Returns
    Type Description
    Boolean

    True if a new item was instantiated, false if the view item came from the item pool

    Overrides
    Unity.ListViewFramework.ListViewController<TData, TItem, TIndex>.GetNewItem(TData, TItem)

    RecycleChildren(TData)

    Recycle the list items for all children of the given datum

    Declaration
    protected void RecycleChildren(TData datum)
    Parameters
    Type Name Description
    TData datum

    The datum whose children to recycle

    ScrollToIndex(TData, TIndex, ref Single)

    Scroll the list to the item at the given index

    Declaration
    protected void ScrollToIndex(TData container, TIndex targetIndex, ref float scrollHeight)
    Parameters
    Type Name Description
    TData container

    The container data within which to search

    TIndex targetIndex

    The index for which to search

    Single scrollHeight

    The offset to which the list will be scrolled

    SetExpanded(TIndex, Boolean)

    Set the expanded state for the item at the given index

    Declaration
    protected void SetExpanded(TIndex index, bool expanded)
    Parameters
    Type Name Description
    TIndex index

    The index for which to set the expanded state

    Boolean expanded

    The expanded state to set at the given index

    ToggleExpanded(TData)

    Toggle the expanded state of the given datum

    Declaration
    protected virtual void ToggleExpanded(TData datum)
    Parameters
    Type Name Description
    TData datum

    The datum whose expanded state will be toggled

    UpdateItems()

    Called by UpdateView to update the list items

    Declaration
    protected override void UpdateItems()
    Overrides
    Unity.ListViewFramework.ListViewController<TData, TItem, TIndex>.UpdateItems()

    UpdateNestedItem(TData, Int32, Single, Int32, ref Boolean)

    Update a visible list item

    Declaration
    protected virtual void UpdateNestedItem(TData datum, int order, float offset, int depth, ref bool doneSettling)
    Parameters
    Type Name Description
    TData datum

    The datum representing this list item

    Int32 order

    The order of this item, among the other visible items

    Single offset

    The offset at which to position this item

    Int32 depth

    The level of nesting

    Boolean doneSettling

    Whether all items are done settling

    UpdateNestedItems(ref Int32, ref Single, ref Boolean, Int32)

    Called by UpdateItems to update the list of nested items

    Declaration
    protected virtual void UpdateNestedItems(ref int order, ref float offset, ref bool doneSettling, int depth = 0)
    Parameters
    Type Name Description
    Int32 order

    The order of the starting item item

    Single offset

    The offset of the starting item

    Boolean doneSettling

    Whether all items are done settling

    Int32 depth

    The level of nesting

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023