TextBox, PropertyChangeHandler

This commit is contained in:
2023-08-11 21:51:44 +02:00
parent e989a65e81
commit 1fde0df2d6
81 changed files with 1539 additions and 390 deletions

View File

@@ -1,18 +1,32 @@
using TerminalUI.ConsoleDrivers;
using System.Diagnostics;
using TerminalUI.Color;
using TerminalUI.ConsoleDrivers;
namespace TerminalUI.Models;
[DebuggerDisplay("RenderId = {RenderId}, ForceRerender = {ForceRerender}, Driver = {ConsoleDriver.GetType().Name}")]
public readonly ref struct RenderContext
{
private static int _renderId = 0;
private static int _renderId;
public readonly int RenderId;
public readonly IConsoleDriver ConsoleDriver;
public readonly bool ForceRerender;
public readonly IColor? Foreground;
public readonly IColor? Background;
public RenderContext(IConsoleDriver consoleDriver)
public RenderContext(
IConsoleDriver consoleDriver,
bool forceRerender,
IColor? foreground,
IColor? background)
{
ConsoleDriver = consoleDriver;
RenderId = _renderId++;
ConsoleDriver = consoleDriver;
ForceRerender = forceRerender;
Foreground = foreground;
Background = background;
}
public static RenderContext Empty => new(null!);
public static RenderContext Empty => new(null!, false, null, null);
}