6# error "CIOF Is not OK, make sure to not have any errors at compile time"
11# include <VersionHelpers.h>
19 { std::cout << std::endl; }
29 {
return std::string(
"\033[" + std::to_string(_row) +
";" + std::to_string(_col) +
"H"); }
39 if (!IsWindows10OrGreater())
return;
41 HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
44 GetConsoleMode(hOut, &dwMode);
46 dwMode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
48 SetConsoleMode(hOut, dwMode);
77 {
return "\033[" + std::to_string(_color) +
"m"; }
79 std::string
rgbSet(
unsigned int r,
unsigned int g,
unsigned int b)
81 return "\033[38;2;" + std::to_string(r) +
";"
82 + std::to_string(g) +
";"
83 + std::to_string(b) +
"m";
86 std::string
rgbBgSet(
unsigned int r,
unsigned int g,
unsigned int b)
88 return "\033[48;2;" + std::to_string(r) +
";"
89 + std::to_string(g) +
";"
90 + std::to_string(b) +
"m";
void initANSI()
Initialize ANSI text option in Windows 10 or later NOTE: ONLY WORKS IN WINDOWS 10 OR LATER.
std::string rgbBgSet(unsigned int r, unsigned int g, unsigned int b)
Set the RGB color for background in the terminal.
void showCursor(const bool &show)
Show or hide the cursor from the terminal NOTE: In Windows; enable ANSI by doing ciof::initANSI().
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.
void input()
Empty input() function; Do not save any input to a variable, just leave it as a blank input.
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.
void clear()
Clear the contents of the terminal NOTE: In Windows; enable ANSI by doing ciof::initANSI().
void echo(T _t)
Echo to the standard output for _t.
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.