mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-12-28 00:38:03 +01: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.
31 lines
915 B
C#
31 lines
915 B
C#
using Spectre.Console.Rendering;
|
|
|
|
namespace Spectre.Console
|
|
{
|
|
/// <summary>
|
|
/// Represents tree guide lines.
|
|
/// </summary>
|
|
public abstract partial class TreeGuide
|
|
{
|
|
/// <summary>
|
|
/// Gets an <see cref="AsciiTreeGuide"/> instance.
|
|
/// </summary>
|
|
public static TreeGuide Ascii { get; } = new AsciiTreeGuide();
|
|
|
|
/// <summary>
|
|
/// Gets a <see cref="LineTreeGuide"/> instance.
|
|
/// </summary>
|
|
public static TreeGuide Line { get; } = new LineTreeGuide();
|
|
|
|
/// <summary>
|
|
/// Gets a <see cref="DoubleLineTreeGuide"/> instance.
|
|
/// </summary>
|
|
public static TreeGuide DoubleLine { get; } = new DoubleLineTreeGuide();
|
|
|
|
/// <summary>
|
|
/// Gets a <see cref="BoldLineTreeGuide"/> instance.
|
|
/// </summary>
|
|
public static TreeGuide BoldLine { get; } = new BoldLineTreeGuide();
|
|
}
|
|
}
|