mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-19 02:12:49 +08:00

* Renames Style -> Decoration * Renames Appearance -> Style * Adds Style.Parse and Style.TryParse
52 lines
1.3 KiB
C#
52 lines
1.3 KiB
C#
using System.Text;
|
|
|
|
namespace Spectre.Console
|
|
{
|
|
/// <summary>
|
|
/// Represents a console.
|
|
/// </summary>
|
|
public interface IAnsiConsole
|
|
{
|
|
/// <summary>
|
|
/// Gets the console's capabilities.
|
|
/// </summary>
|
|
Capabilities Capabilities { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the buffer width of the console.
|
|
/// </summary>
|
|
int Width { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the buffer height of the console.
|
|
/// </summary>
|
|
int Height { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the console output encoding.
|
|
/// </summary>
|
|
Encoding Encoding { get; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the current text decoration.
|
|
/// </summary>
|
|
Decoration Decoration { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the current foreground.
|
|
/// </summary>
|
|
Color Foreground { get; set; }
|
|
|
|
/// <summary>
|
|
/// Gets or sets the current background.
|
|
/// </summary>
|
|
Color Background { get; set; }
|
|
|
|
/// <summary>
|
|
/// Writes a string followed by a line terminator to the console.
|
|
/// </summary>
|
|
/// <param name="text">The string to write.</param>
|
|
void Write(string text);
|
|
}
|
|
}
|