cell: A single terminal cell

View source: R/cell.R

cellR Documentation

A single terminal cell

Description

Cells are the unit of the virtual screen. Each cell holds one character (a wide character such as a CJK ideograph occupies two cells; the second one is a continuation cell whose char is ""), colours and text attributes.

Usage

cell(
  char = " ",
  fg = NULL,
  bg = NULL,
  bold = FALSE,
  italic = FALSE,
  underline = FALSE,
  reverse = FALSE,
  dim = FALSE,
  strike = FALSE
)

Arguments

char

A single character.

fg, bg

Foreground and background colours. NULL means the terminal default. See style() for accepted colour formats.

bold, italic, underline, reverse, dim, strike

Text attributes.

Details

The framebuffer stores cells column-wise in matrices for speed; cell() is the value-level representation used for inspection and tests.

Value

An object of class termr_cell.

Examples

cell("A", fg = "red", bold = TRUE)

termr documentation built on Oct. 21, 2026, 5:13 p.m.