/* Copyright (C) 2014-2019 de4dot@gmail.com This file is part of dnSpy dnSpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. dnSpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with dnSpy. If not, see . */ using System.Collections.Generic; namespace dnSpy.Contracts.TreeView { /// /// A tree node /// public interface ITreeNode { /// /// Gets the treeview /// ITreeView TreeView { get; } /// /// Gets the parent or null if it is the root node or if it hasn't been inserted into the /// treeview yet. /// ITreeNode? Parent { get; } /// /// Gets all children or an empty list if is true. See also /// /// IList Children { get; } /// /// Gets all children in . See also /// /// IEnumerable DataChildren { get; } /// /// Tree node data /// TreeNodeData Data { get; } /// /// Gets/sets lazy loading of children. When true, /// will get called to load the children. Should only be used by /// bool LazyLoading { get; set; } /// /// true if it's expanded /// bool IsExpanded { get; set; } /// /// true if it's hidden /// bool IsHidden { get; set; } /// /// true when this node is not hidden and all parent nodes are expanded and not hidden /// bool IsVisible { get; } /// /// Forces loading of /// void EnsureChildrenLoaded(); /// /// Adds a new node to /// /// Node to insert void AddChild(ITreeNode node); /// /// Gets all descendants /// /// IEnumerable Descendants(); /// /// Gets all descendants including itself /// /// IEnumerable DescendantsAndSelf(); /// /// Refreshes the UI /// void RefreshUI(); } }