ttx 0.1.0
Loading...
Searching...
No Matches
ttx::terminal::Cell Struct Reference

Represents a on-screen terminal cell. More...

#include <ttx/terminal/cell.h>

Classes

struct  Ids
 

Public Member Functions

auto is_multi_cell () const -> bool
 
auto is_primary_in_multi_cell () const -> bool
 
auto is_nonprimary_in_multi_cell () const -> bool
 
auto has_ids () const -> bool
 
auto graphics_rendition_id () const -> u16
 
auto hyperlink_id () const -> u16
 
auto is_empty () const -> bool
 

Public Attributes

union { 
 
   Ids   ids {} 
 
   Color   background_color 
 
};  
 
u16 multi_cell_id { 0 }
 0 means none (single cell)
 
u16 text_size: 11 { 0 }
 The size in bytes of the text in this cell (0 means no text)
 
u16 background_only: 1 { 0 }
 1 indicates this cell only stores a backgroun color
 
u16 left_boundary_of_multicell: 1 { 0 }
 1 indicates this cell is in the furthest left column of a multicell.
 
u16 explicitly_sized: 1 { 0 }
 1 indicates must be rendered using explicit sizing
 
u16 complex_grapheme_cluster: 1 { 0 }
 1 indicates this cell consists of multiple non-zero width code points
 
u16 stale: 1 { false }
 1 indicates the cell has ben rendered
 

Static Public Attributes

static constexpr auto max_text_size = (di::NumericLimits<u16>::max >> 5)
 

Detailed Description

Represents a on-screen terminal cell.

Member Function Documentation

◆ graphics_rendition_id()

auto ttx::terminal::Cell::graphics_rendition_id ( ) const -> u16
inline

◆ has_ids()

auto ttx::terminal::Cell::has_ids ( ) const -> bool
inline

◆ hyperlink_id()

auto ttx::terminal::Cell::hyperlink_id ( ) const -> u16
inline

◆ is_empty()

auto ttx::terminal::Cell::is_empty ( ) const -> bool
inline

◆ is_multi_cell()

auto ttx::terminal::Cell::is_multi_cell ( ) const -> bool
inline

◆ is_nonprimary_in_multi_cell()

auto ttx::terminal::Cell::is_nonprimary_in_multi_cell ( ) const -> bool
inline

◆ is_primary_in_multi_cell()

auto ttx::terminal::Cell::is_primary_in_multi_cell ( ) const -> bool
inline

Member Data Documentation

◆ [union]

union { ... } ttx::terminal::Cell

◆ background_color

Color ttx::terminal::Cell::background_color

◆ background_only

u16 ttx::terminal::Cell::background_only

1 indicates this cell only stores a backgroun color

◆ complex_grapheme_cluster

u16 ttx::terminal::Cell::complex_grapheme_cluster

1 indicates this cell consists of multiple non-zero width code points

◆ explicitly_sized

u16 ttx::terminal::Cell::explicitly_sized

1 indicates must be rendered using explicit sizing

◆ ids

Ids ttx::terminal::Cell::ids {}

◆ left_boundary_of_multicell

u16 ttx::terminal::Cell::left_boundary_of_multicell

1 indicates this cell is in the furthest left column of a multicell.

◆ max_text_size

auto ttx::terminal::Cell::max_text_size = (di::NumericLimits<u16>::max >> 5)
staticconstexpr

◆ multi_cell_id

u16 ttx::terminal::Cell::multi_cell_id { 0 }

0 means none (single cell)

◆ stale

u16 ttx::terminal::Cell::stale
mutable

1 indicates the cell has ben rendered

◆ text_size

u16 ttx::terminal::Cell::text_size

The size in bytes of the text in this cell (0 means no text)


The documentation for this struct was generated from the following file: