Sista v3.0.0-alpha.1
Sista is a C++ lightweight OS-agnostic library for terminal animations and videogames
|
ANSI escape code utilities and types for terminal formatting. More...
#include <variant>
Go to the source code of this file.
Classes | |
struct | sista::RGBColor |
Represents an RGB color with red, green, and blue components in True Color (24-bit). More... | |
struct | sista::ANSISettings |
Represents a set of ANSI settings including colors and attributes. More... | |
Namespaces | |
namespace | sista |
Sista library namespace. | |
Macros | |
#define | ESC "\x1b" |
Escape character for ANSI escape codes. | |
#define | CSI "\x1b[" |
Control Sequence Introducer for ANSI escape codes. | |
#define | CLS "\x1b[2J" |
Clear Screen ANSI escape code. | |
#define | SSB "\x1b[3J" |
Erase Scrollback Buffer ANSI escape code. | |
#define | HIDE_CURSOR "\x1b[?25l" |
Hide Cursor ANSI escape code. | |
#define | SHOW_CURSOR "\x1b[?25h" |
Show Cursor ANSI escape code. | |
#define | TL "\x1b[H" |
Top Left ANSI escape code. | |
Functions | |
void | sista::setForegroundColor (ForegroundColor) |
Sets the foreground color using a predefined ForegroundColor enum. | |
void | sista::setBackgroundColor (BackgroundColor) |
Sets the background color using a predefined BackgroundColor enum. | |
void | sista::setAttribute (Attribute) |
Sets a text attribute using a predefined Attribute enum. | |
void | sista::resetAttribute (Attribute) |
Resets a text attribute using a predefined Attribute enum. | |
void | sista::resetAnsi () |
Resets all ANSI settings to default values. | |
void | sista::setForegroundColor (const RGBColor &) |
Sets the foreground color using an RGBColor struct. | |
void | sista::setBackgroundColor (const RGBColor &) |
Sets the background color using an RGBColor struct. | |
void | sista::setForegroundColor (unsigned short int, unsigned short int, unsigned short int) |
Sets the foreground color using RGB values. | |
void | sista::setBackgroundColor (unsigned short int, unsigned short int, unsigned short int) |
Sets the background color using RGB values. | |
void | sista::setForegroundColor (unsigned short int) |
Sets the foreground color using a 256-color palette index. | |
void | sista::setBackgroundColor (unsigned short int) |
Sets the background color using a 256-color palette index. | |
void | sista::setScreenMode (ScreenMode) |
Sets a specific screen mode. | |
void | sista::unsetScreenMode (ScreenMode) |
Unsets a specific screen mode. | |
ANSI escape code utilities and types for terminal formatting.
This header provides macros, enums, structs, and functions for working with ANSI escape codes, including color, attribute, and screen mode settings. It is part of the Sista library and is intended for use in terminal-based applications requiring advanced text formatting and control.
#define CLS "\x1b[2J" |
#define CSI "\x1b[" |
#define ESC "\x1b" |
Escape character for ANSI escape codes.
This macro defines the escape character used in ANSI escape codes. It is represented as a string literal containing the escape character.
#define HIDE_CURSOR "\x1b[?25l" |
Hide Cursor ANSI escape code.
This macro defines the ANSI escape code for hiding the cursor. It is represented as a string literal containing the appropriate escape sequence.
#define SHOW_CURSOR "\x1b[?25h" |
Show Cursor ANSI escape code.
This macro defines the ANSI escape code for showing the cursor. It is represented as a string literal containing the appropriate escape sequence.
#define SSB "\x1b[3J" |