Skip to content

Cell

[Source]

A single styled terminal character.

class val Cell is
  Equatable[Cell val] ref

Implements


Constructors

create

[Source]

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

Returns


empty

[Source]

A blank cell: space character, normal width, default colors, no attrs.

new val empty()
: Cell val^

Returns


continuation

[Source]

A continuation cell placed after a wide character. Width 0 signals the renderer to skip this column.

new val continuation()
: Cell val^

Returns


Public fields

let char: U32 val

[Source]


let width: U8 val

[Source]


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)

[Source]


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)

[Source]


let attrs: U8 val

[Source]


Public Functions

eq

[Source]

Two cells are equal when all fields match.

fun box eq(
  that: Cell val)
: Bool val

Parameters

Returns


ne

[Source]

Negation of eq.

fun box ne(
  that: Cell val)
: Bool val

Parameters

Returns