6# error "CIOF Is not OK, make sure to not have any errors at compile time"
18 { std::cout << std::endl; }
21 {
return std::string(
"\033[" + std::to_string(_row) +
";" + std::to_string(_col) +
"H"); }
31 if (!IsWindows10OrGreater())
return;
33 HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
36 GetConsoleMode(hOut, &dwMode);
38 dwMode |= ENABLE_VIRTUAL_PROCESSING
40 SetConsoleMode(hOut, dwMode)
60 {
return "\033[" + std::to_string(_color) +
"m"; }
62 std::string
rgbSet(
unsigned int r,
unsigned int g,
unsigned int b)
64 return "\033[38;2;" + std::to_string(r) +
";"
65 + std::to_string(g) +
";"
66 + std::to_string(b) +
"m";
void initANSI()
Initialize ANSI text option in Windows 10 or later NOTE: ONLY WORKS IN WINDOWS 10 OR LATER.
void cursorPos(int _row, int _col)
Get the set cursor position using _row and _col Essentially calls the getCursorPos() function and the...
std::string getCursorPos(int _row, int _col)
Get the set cursor position using _row and _col.
std::string styleReset()
Reset all the styles and colors in the terminal.
std::string rgbSet(unsigned int r, unsigned int g, unsigned int b)
Set the RGB color in the terminal.
OutputStyle
Set output style: Bold Italic Underline Strikethrough.
CIOFOutputConfig outputConf
Set default output configuration.
void print()
Print a new line.
std::string styleSet(const OutputStyle &_style)
Set the styles according to the OutputStyle type.
std::string colorSet(int _color)
Set the colors from the default color palette from the terminal.
Set output configuration for ciof::impl::__out() function and its wrappers.