Raxol.Terminal.Buffer.Cell (Raxol v0.5.0)

View Source

Manages terminal cell operations and attributes.

Summary

Functions

Copies attributes from one cell to another.

Checks if the cell is empty.

Gets the cell's attributes.

Gets the cell's background color.

Gets the cell's character.

Gets the cell's foreground color.

Gets the cell's hyperlink.

Gets the cell's width.

Creates a new cell with default settings.

Creates a new cell with the specified character and style.

Resets a cell to its default state.

Sets the cell's attributes.

Sets the cell's background color.

Sets the cell's character.

Sets the cell's foreground color.

Sets the cell's hyperlink.

Sets the cell's width.

Validates a cell's data. Returns true if the cell is valid, false otherwise.

Types

t()

@type t() :: %Raxol.Terminal.Buffer.Cell{
  attributes: map(),
  background: integer() | atom() | String.t(),
  char: String.t(),
  foreground: integer() | atom() | String.t(),
  hyperlink: String.t() | nil,
  width: integer()
}

Functions

copy_attributes(source, target)

Copies attributes from one cell to another.

empty?(cell)

Checks if the cell is empty.

get_attributes(cell)

Gets the cell's attributes.

get_background(cell)

Gets the cell's background color.

get_char(cell)

Gets the cell's character.

get_foreground(cell)

Gets the cell's foreground color.

get_hyperlink(cell)

Gets the cell's hyperlink.

get_width(cell)

Gets the cell's width.

new(opts \\ [])

Creates a new cell with default settings.

new(char, style)

Creates a new cell with the specified character and style.

reset(cell)

Resets a cell to its default state.

set_attributes(cell, attributes)

Sets the cell's attributes.

set_background(cell, color)

Sets the cell's background color.

set_char(cell, char)

Sets the cell's character.

set_foreground(cell, color)

Sets the cell's foreground color.

set_hyperlink(cell, hyperlink)

Sets the cell's hyperlink.

set_width(cell, width)

Sets the cell's width.

valid?(cell)

Validates a cell's data. Returns true if the cell is valid, false otherwise.