|
That Terminal
A terminal emulator designed for video making purposes.
|
#include <cell.hh>
Public Member Functions | |
| bool | operator== (const Cell &b) const |
| bool | operator!= (const Cell &b) const |
Public Attributes | |
| std::uint_least32_t | fgcolor |
| foreground color | |
| std::uint_least32_t | bgcolor |
| background color | |
| char32_t | ch |
| the character symbol (unicode codepoint) | |
| bool | bold: 1 |
| bit 0 | |
| bool | dim: 1 |
| bit 1 | |
| bool | italic: 1 |
| bit 2 | |
| bool | underline: 1 |
| bit 3 | |
| bool | underline2: 1 |
| bit 4 | |
| bool | overstrike: 1 |
| bit 5 | |
| bool | inverse: 1 |
| bit 6 | |
| bool | framed: 1 |
| bit 7 | |
| bool | encircled: 1 |
| bit 8 | |
| bool | overlined: 1 |
| bit 9 | |
| bool | fraktur: 1 |
| bit 10 | |
| bool | conceal: 1 |
| bit 11 | |
| unsigned char | render_size: 2 |
| bit 12-13 0=normal,1=doublewidth,2=doublewidth+topline,3=doublewidth+bottomline | |
| unsigned char | blink: 2 |
| bit 14-15 | |
| unsigned char | scriptsize: 2 |
| bit 16-17: 0=normal,1=superscript,2=subscript | |
| bool | proportional: 1 |
| bit 18 | |
| bool | ideo_underline: 1 |
| bit 19 | |
| bool | ideo_underline2: 1 |
| bit 20 | |
| bool | ideo_overline: 1 |
| bit 21 | |
| bool | ideo_overline2: 1 |
| bit 22 | |
| bool | ideo_stress: 1 |
| bit 23 | |
| unsigned | padding: 6 |
| bit 24,25,26, 27,28,29 | |
| bool | protect: 1 |
| bit 30 | |
| bool | dirty: 1 |
| bit 31 (placed last for efficient access) | |
Elements in a screen buffer are called cells. Cell is a structure that can be memcpy'd verbatim. Its properties can be assigned and read directly.
It includes:
ch The character code (unicode character index) fgcolor The foreground color (RGB) bgcolor The background color (RGB)
Attributes, defined as in SGR of ANSI:
bold, dim, italic, underline, underline2, overstrike, inverse, framed, encircled, overlined, fraktur, conceal, proportional, ideo_underline, ideo_underline2, ideo_overline, ideo_stress render_size: 0=normal,1=doublewidth,2=doublewidth+topline,3=doublewidth+bottomline blink: 0=none, 1=blink, 2=faster blink, 3=undefined scriptsize: 0=normal, 1=superscript, 2=subscript protect (protected-flag as in ANSI)
And a dirty-flag, used by screen renderer.
Attributes and flags are defined as bit fields with attention to alignment and total size of structure.
Constructor and comparison operators are inlined for performance.
|
inline |
operator!=. Simply inverses operator==.
| b | The other cell to compare against. |
|
inline |
operator==: Equality comparison Compares everything except dirty and protect.
| b | The other cell to compare against. |