mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-24 20:22:51 +08:00

Fixes some tree rendering problems where lines were not properly drawn at some levels during some circumstances. * Change the API back to only allow one root. * Now uses a stack based approach to rendering instead of recursion. * Removes the need for measuring the whole tree in advance. Leave this up to each child to render.
15 lines
325 B
C#
15 lines
325 B
C#
using System.Collections.Generic;
|
|
|
|
namespace Spectre.Console
|
|
{
|
|
/// <summary>
|
|
/// Represents something that has tree nodes.
|
|
/// </summary>
|
|
public interface IHasTreeNodes
|
|
{
|
|
/// <summary>
|
|
/// Gets the tree's child nodes.
|
|
/// </summary>
|
|
List<TreeNode> Nodes { get; }
|
|
}
|
|
} |