Table of Contents

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

Symbol string

Exactly one grapheme cluster, or "" for a continuation cell.

Fg Color

Foreground color.

Bg Color

Background color.

Modifiers Modifiers

Text modifiers.

Properties

Bg

Background color.

public Color Bg { get; init; }

Property Value

Color

Empty

A space with the terminal's default colors and no modifiers.

public static Cell Empty { get; }

Property Value

Cell

Fg

Foreground color.

public Color Fg { get; init; }

Property Value

Color

IsContinuation

True for the cell that follows a wide character.

public bool IsContinuation { get; }

Property Value

bool

Modifiers

Text modifiers.

public Modifiers Modifiers { get; init; }

Property Value

Modifiers

Symbol

Exactly one grapheme cluster, or "" for a continuation cell.

public string Symbol { get; init; }

Property Value

string

Width

Display width in columns: 0 for a continuation cell, otherwise 1 or 2.

public int Width { get; }

Property Value

int