Cell
ConsoleMonster.Canvas
One terminal cell: a grapheme, its style and its width. A wide grapheme occupies two cells; the second is a continuation cell with Cell.Width 0 and an empty glyph.
Inheritance
- ValueType
- Cell
Usage
Explore 8 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 3
- Property Cell.Blank
- Property CellBuffer.Item
- Method Region.Get
Accepted by parameters 5
- Method Cell.Equals
- Method Cell.op_Equality
- Method Cell.op_Equality
- Method Cell.op_Inequality
- Method Cell.op_Inequality
Constructors
public Cell(string glyph, Style style, byte width = 1) #Creates a cell.
Parameters
- glyph string
- The grapheme (a single space for blank).
- style ConsoleMonster.Styling.Style
- The style.
- width byte = 1
- 1 for normal, 2 for the first half of a wide grapheme, 0 for a continuation.
Methods
public bool Equals(Cell other) #Indicates whether the current object is equal to another object of the same type.
Parameters
- other ConsoleMonster.Canvas.Cell
- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.public override bool Equals(object? obj) #Indicates whether this instance and a specified object are equal.
Parameters
- obj object?
- The object to compare with the current instance.
Returns
bool true if obj and this instance are the same type and represent the same value; otherwise, false.public override int GetHashCode() #Returns the hash code for this instance.
Returns
int A 32-bit signed integer that is the hash code for this instance.public static bool op_Equality(Cell left, Cell right) #Equality operator.
Parameters
- left ConsoleMonster.Canvas.Cell
- Left.
- right ConsoleMonster.Canvas.Cell
- Right.
Returns
bool Whether equal.public static bool op_Inequality(Cell left, Cell right) #Inequality operator.
Parameters
- left ConsoleMonster.Canvas.Cell
- Left.
- right ConsoleMonster.Canvas.Cell
- Right.
Returns
bool Whether different.public override string ToString() #Returns the fully qualified type name of this instance.
Returns
string The fully qualified type name.Inherited Methods
Properties
public byte Width { get; } #1 for normal, 2 for the first half of a wide grapheme, 0 for a continuation cell.