Struct Cell
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
A single terminal cell: one grapheme cluster plus its colors and modifiers. A wide (two-column) cell is followed by a continuation cell whose Symbol is empty.
[SuppressMessage("Naming", "CA1720:Identifier contains type name", Justification = "Cell.Char is a 0.7 compatibility shim.")]
public readonly record struct Cell : IEquatable<Cell>
- Implements
- Inherited Members
Constructors
Cell(string, Color, Color, Modifiers)
A single terminal cell: one grapheme cluster plus its colors and modifiers. A wide (two-column) cell is followed by a continuation cell whose Symbol is empty.
public Cell(string Symbol, Color Fg, Color Bg, Modifiers Modifiers)
Parameters
SymbolstringExactly one grapheme cluster, or
""for a continuation cell.FgColorForeground color.
BgColorBackground color.
ModifiersModifiersText modifiers.
Properties
Bg
Background color.
public Color Bg { get; init; }
Property Value
Empty
A space with the terminal's default colors and no modifiers.
public static Cell Empty { get; }
Property Value
Fg
Foreground color.
public Color Fg { get; init; }
Property Value
IsContinuation
True for the cell that follows a wide character.
public bool IsContinuation { get; }
Property Value
Modifiers
Text modifiers.
public Modifiers Modifiers { get; init; }
Property Value
Symbol
Exactly one grapheme cluster, or "" for a continuation cell.
public string Symbol { get; init; }
Property Value
Width
Display width in columns: 0 for a continuation cell, otherwise 1 or 2.
public int Width { get; }