A single rendered cell of an ExRatatui.CellSession's buffer.
This is the post-render shape ratatui leaves in the cell at a given
position — symbol, foreground/background colors, modifier set, and a
:skip flag carrying ratatui's internal "do not render this cell"
hint (used by widgets that overlay on top of others).
Fields
:row— zero-indexed row (y coordinate in ratatui's terms):col— zero-indexed column (x coordinate):symbol— the grapheme cluster painted into the cell. Usually a single character but may be multi-codepoint (CJK ideographs, emoji, combining marks, box-drawing). Wide-display graphemes (e.g."中","🎉") live in their leading cell only — the following cell stays at its prior content (typically" "). Consumers reconstructing a faithful display should detect wide graphemes by computing display width and treat the nextwidth - 1cells as covered.:fg— foregroundExRatatui.Style.color/0.:resetmeans "use the consumer's default" (terminal default in a terminal, CSS default in a browser, "ink" on a 1-bit display).:bg— backgroundExRatatui.Style.color/0, same conventions.:modifiers— list ofExRatatui.Style.modifier/0atoms, in a stable sorted order (:bold, :dim, :italic, :underlined, :crossed_out, :reversed). Two cells with the same modifier set always produce equal lists, so consumers can compare with==.:skip— ratatui's "do not render" flag.falsefor ordinary cells; widgets likePopupmay set it totrueon cells they want left alone. Browser/framebuffer renderers should treatskip: trueas transparent (do nothing).
Examples
iex> %ExRatatui.CellSession.Cell{}
%ExRatatui.CellSession.Cell{
row: 0, col: 0, symbol: " ",
fg: :reset, bg: :reset, modifiers: [], skip: false
}
Summary
Types
@type t() :: %ExRatatui.CellSession.Cell{ bg: ExRatatui.Style.color(), col: non_neg_integer(), fg: ExRatatui.Style.color(), modifiers: [ExRatatui.Style.modifier()], row: non_neg_integer(), skip: boolean(), symbol: String.t() }
Functions
@spec from_tuple( {non_neg_integer(), non_neg_integer(), String.t(), ExRatatui.Style.color(), ExRatatui.Style.color(), [ExRatatui.Style.modifier()], boolean()} ) :: t()
Builds a t/0 from the raw {x, y, symbol, fg, bg, modifiers, skip}
tuple the NIF returns.
Used internally by ExRatatui.CellSession.Snapshot.from_native/1 and
ExRatatui.CellSession.Diff.from_native/1. Exposed pub rather than
pub(private) so consumers writing custom NIF-driven flows can
reuse the conversion without re-implementing it.
Note: the NIF's tuple uses (x, y) (column, row) order — matching
ratatui's coordinate convention — while the struct uses :row/:col
fields to match the rest of the project's vocabulary
(ExRatatui.Event.Mouse, etc.).
Examples
iex> tuple = {3, 1, "X", :red, :reset, [:bold], false}
iex> ExRatatui.CellSession.Cell.from_tuple(tuple)
%ExRatatui.CellSession.Cell{
row: 1, col: 3, symbol: "X",
fg: :red, bg: :reset, modifiers: [:bold], skip: false
}