Cell

Cell represents the contents of a single character cell on screen, or in some cases two adjacent cells. Terminals are expected to have a uniform display width for each cell, and to have a fixed number of cell columsn and rows. (We assume fixed pitch fonts.) The occasion when a double wide character is present occurs for certain East Asian characters that require twice as much horizontal space to display as others. (This can also occur with some emoji.)

Constructors

this
this(C c, Style st)
Undocumented in source.
this
this(S s, Style st)
Undocumented in source.

Members

Properties

text
const(string) text [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
text
const(string) text [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
width
uint width [@property getter]

The display width of the contents of the cell, which will be 1 (typical western characters, as well as ambiguous characters) or 2 (typical CJK characters). This relies on the accuracy of the content in the imported east_asian_width package, and may therefore not be perfectly correct for a given platform or font or context. In particular it may be wrong for some emoji. Note also that the D std.uni notion of grapheme boundaries is out of date, and so many things that should be treated as a single grapheme (or grapheme cluster) will not be.

Variables

style
Style style;

styling for the cell

xtext
string xtext;

character content - one character followed by any combinging characters

Meta