Patrik Svensson 8261b25e5c Fix tree rendering
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.
2021-01-10 15:55:11 +01:00

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; }
}
}