Base Framework
|
ANSI escape sequence. More...
#include <base/string/ANSIEscapeSequence.h>
Classes | |
class | Escape |
class | MoveCursor |
class | SetAttributes |
class | SetColor |
class | SetCursor |
Public Types | |
enum | Attributes { BOLD = 1, UNDERSCORE = 2, BLINK = 4, REVERSE = 8, CONCEAL = 16 } |
enum | Color { BLACK, RED, GREEN, YELLOW, BLUE, MAGENTA, CYAN, WHITE } |
Public Member Functions | |
ANSIEscapeSequence (FormatOutputStream &_stream) noexcept | |
void | setCursor (unsigned int line, unsigned int column) |
void | up (unsigned int count) |
void | down (unsigned int count) |
void | forward (unsigned int count) |
void | backward (unsigned int count) |
void | setAttributes (unsigned int flags) |
void | setForeground (Color color) |
void | setBackground (Color color) |
Static Public Member Functions | |
static String | color (uint8 index) |
static String | color (uint8 red, uint8 green, uint8 blue) |
static String | backgroundColor (uint8 index) |
static String | backgroundColor (uint8 red, uint8 green, uint8 blue) |
ANSI escape sequence.
This class provides support for writing ANSI escape sequences to a format output stream.
Text attributes.
Enumerator | |
---|---|
BOLD | Selects bold. |
UNDERSCORE | Selects underscore. |
BLINK | Selects blink. |
REVERSE | Selects reversed. |
CONCEAL | Selects concealed. |
|
inlinenoexcept |
Initializes the ANSI escape sequence object.
|
static |
Activates background color by index. Not using standard.
|
static |
Activates background RGB color. Not using standard.
void ANSIEscapeSequence::backward | ( | unsigned int | count | ) |
Moves the cursor backward by the specified number of columns.
|
static |
Activates color by index. Not using standard.
|
static |
Activates RGB color. Not using standard.
void ANSIEscapeSequence::down | ( | unsigned int | count | ) |
Moves the cursor down by the specified number of lines.
void ANSIEscapeSequence::forward | ( | unsigned int | count | ) |
Moves the cursor forward by the specified number of columns.
void ANSIEscapeSequence::setAttributes | ( | unsigned int | flags | ) |
Sets the text attributes.
void ANSIEscapeSequence::setBackground | ( | Color | color | ) |
Sets the background color.
void ANSIEscapeSequence::setCursor | ( | unsigned int | line, |
unsigned int | column | ||
) |
Sets the cursor position.
void ANSIEscapeSequence::setForeground | ( | Color | color | ) |
Sets the foreground color.
void ANSIEscapeSequence::up | ( | unsigned int | count | ) |
Moves the cursor up by the specified number of lines.