85#define HIDE_CURSOR "\x1b[?25l"
96#define SHOW_CURSOR "\x1b[?25h"
188 RGBColor(
unsigned short int,
unsigned short int,
unsigned short int);
Sista library namespace.
Definition: ansi.cpp:25
void resetAnsi()
Resets all ANSI settings to default values.
Definition: ansi.cpp:46
void resetAttribute(Attribute attribute)
Resets a text attribute using a predefined Attribute enum.
Definition: ansi.cpp:38
Attribute
Enumeration of text attributes for ANSI escape codes.
Definition: ansi.hpp:157
ForegroundColor
Enumeration of foreground colors for ANSI escape codes.
Definition: ansi.hpp:120
ScreenMode
Represents various ANSI screen modes.
Definition: ansi.hpp:320
@ COLOR_16_COLORS_GRAPHICS_640_350
@ COLOR_16_COLORS_GRAPHICS_640_480
@ MONOCROME_GRAPHICS_640_200
@ MONOCROME_GRAPHICS_320_200
@ MONOCROME_2_COLORS_GRAPHICS_640_480
@ MONOCROME_2_COLORS_GRAPHICS_640_350
@ COLOR_256_COLORS_GRAPHICS_320_200
@ FOUR_COLORS_GRAPHICS_320_200
@ COLOR_16_COLORS_GRAPHICS_640_200
void unsetScreenMode(ScreenMode mode)
Unsets a specific screen mode.
Definition: ansi.cpp:74
void setBackgroundColor(BackgroundColor color)
Sets the background color using a predefined BackgroundColor enum.
Definition: ansi.cpp:32
void setForegroundColor(ForegroundColor color)
Sets the foreground color using a predefined ForegroundColor enum.
Definition: ansi.cpp:29
BackgroundColor
Enumeration of background colors for ANSI escape codes.
Definition: ansi.hpp:138
void setScreenMode(ScreenMode mode)
Sets a specific screen mode.
Definition: ansi.cpp:71
void setAttribute(Attribute attribute)
Sets a text attribute using a predefined Attribute enum.
Definition: ansi.cpp:35
Represents a set of ANSI settings including colors and attributes.
Definition: ansi.hpp:367
Attribute attribute
Text attribute setting.
Definition: ansi.hpp:389
void apply() const
Applies the ANSI settings to the terminal.
Definition: ansi.cpp:92
std::variant< ForegroundColor, RGBColor > foregroundColor
Foreground color, can be ForegroundColor or RGBColor.
Definition: ansi.hpp:377
std::variant< BackgroundColor, RGBColor > backgroundColor
Background color, can be BackgroundColor or RGBColor.
Definition: ansi.hpp:387
ANSISettings()
Definition: ansi.cpp:78
Represents an RGB color with red, green, and blue components in True Color (24-bit).
Definition: ansi.hpp:176
unsigned short int green
Definition: ansi.hpp:178
unsigned short int blue
Definition: ansi.hpp:179
RGBColor()
Default constructor initializing color to black (0,0,0).
Definition: ansi.cpp:26
unsigned short int red
Definition: ansi.hpp:177