mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52:50 +08:00

* Add width to panels * Add height to panels * Replace RenderContext with RenderOptions * Remove exclusivity from alternative buffer * Add Layout widget * Add Align widget
23 lines
809 B
C#
23 lines
809 B
C#
namespace Spectre.Console.Rendering;
|
|
|
|
/// <summary>
|
|
/// Represents something that can be rendered to the console.
|
|
/// </summary>
|
|
public interface IRenderable
|
|
{
|
|
/// <summary>
|
|
/// Measures the renderable object.
|
|
/// </summary>
|
|
/// <param name="options">The render options.</param>
|
|
/// <param name="maxWidth">The maximum allowed width.</param>
|
|
/// <returns>The minimum and maximum width of the object.</returns>
|
|
Measurement Measure(RenderOptions options, int maxWidth);
|
|
|
|
/// <summary>
|
|
/// Renders the object.
|
|
/// </summary>
|
|
/// <param name="options">The render options.</param>
|
|
/// <param name="maxWidth">The maximum allowed width.</param>
|
|
/// <returns>A collection of segments.</returns>
|
|
IEnumerable<Segment> Render(RenderOptions options, int maxWidth);
|
|
} |