TextBox, PropertyChangeHandler
This commit is contained in:
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user