Cell¶
A single styled terminal character.
Implements¶
Constructors¶
create¶
Create a cell with explicit character, width, colors, and attributes.
new val create(
char': U32 val,
width': U8 val,
fg': (Default val | Black val | Red val |
Green val | Yellow val | Blue val |
Magenta val | Cyan val | White val |
BrightBlack val | BrightRed val | BrightGreen val |
BrightYellow val | BrightBlue val | BrightMagenta val |
BrightCyan val | BrightWhite val | Rainbow val),
bg': (Default val | Black val | Red val |
Green val | Yellow val | Blue val |
Magenta val | Cyan val | White val |
BrightBlack val | BrightRed val | BrightGreen val |
BrightYellow val | BrightBlue val | BrightMagenta val |
BrightCyan val | BrightWhite val | Rainbow val),
attrs': U8 val)
: Cell val^
Parameters¶
- char': U32 val
- width': U8 val
- fg': (Default val | Black val | Red val | Green val | Yellow val | Blue val | Magenta val | Cyan val | White val | BrightBlack val | BrightRed val | BrightGreen val | BrightYellow val | BrightBlue val | BrightMagenta val | BrightCyan val | BrightWhite val | Rainbow val)
- bg': (Default val | Black val | Red val | Green val | Yellow val | Blue val | Magenta val | Cyan val | White val | BrightBlack val | BrightRed val | BrightGreen val | BrightYellow val | BrightBlue val | BrightMagenta val | BrightCyan val | BrightWhite val | Rainbow val)
- attrs': U8 val
Returns¶
- Cell val^
empty¶
A blank cell: space character, normal width, default colors, no attrs.
Returns¶
- Cell val^
continuation¶
A continuation cell placed after a wide character. Width 0 signals the renderer to skip this column.
Returns¶
- Cell val^
Public fields¶
let char: U32 val¶
let width: U8 val¶
let fg: (Default val | Black val | Red val | Green val | Yellow val | Blue val | Magenta val | Cyan val | White val | BrightBlack val | BrightRed val | BrightGreen val | BrightYellow val | BrightBlue val | BrightMagenta val | BrightCyan val | BrightWhite val | Rainbow val)¶
let bg: (Default val | Black val | Red val | Green val | Yellow val | Blue val | Magenta val | Cyan val | White val | BrightBlack val | BrightRed val | BrightGreen val | BrightYellow val | BrightBlue val | BrightMagenta val | BrightCyan val | BrightWhite val | Rainbow val)¶
let attrs: U8 val¶
Public Functions¶
eq¶
Two cells are equal when all fields match.
Parameters¶
- that: Cell val
Returns¶
- Bool val
ne¶
Negation of eq.
Parameters¶
- that: Cell val
Returns¶
- Bool val