![]() |
mutable
A Database System for Research and Fast Prototyping
|
Data Structures | |
struct | Color |
Wrapper class to ease the use of terminal colors (foreground and background). More... | |
Functions | |
Color | fg (unsigned color) |
Create a foreground color to be printed in a terminal. | |
Color | bg (unsigned color) |
Create a background color to be printed in a terminal. | |
bool M_EXPORT | has_color () |
Returns true if the terminal is known to support colors, false otherwise. | |
Variables | |
constexpr const char * | RESET = "\033[0m" |
constexpr const char * | BOLD = "\033[1m" |
constexpr const char * | HALF_BRIGHT = "\033[2m" |
constexpr const char * | ITALIC = "\033[3m" |
constexpr const char * | UNDERLINE = "\033[4m" |
constexpr const char * | BLINK = "\033[5m" |
constexpr const char * | REVERSE = "\033[7m" |
constexpr const char * | DOUBLE_UNDERLINE = "\033[21m" |
constexpr const char * | NORMAL = "\033[22m" |
constexpr const char * | UNDERLINE_OFF = "\033[24m" |
constexpr const char * | BLINK_OFF = "\033[25m" |
constexpr const char * | REVERSE_OFF = "\033[27m" |
constexpr const char * | FG_BLACK = "\033[30m" |
constexpr const char * | FG_RED = "\033[31m" |
constexpr const char * | FG_GREEN = "\033[32m" |
constexpr const char * | FG_YELLOW = "\033[33m" |
constexpr const char * | FG_BLUE = "\033[34m" |
constexpr const char * | FG_MAGENTA = "\033[35m" |
constexpr const char * | FG_CYAN = "\033[36m" |
constexpr const char * | FG_WHITE = "\033[37m" |
constexpr const char * | BG_BLACK = "\033[40m" |
constexpr const char * | BG_RED = "\033[41m" |
constexpr const char * | BG_GREEN = "\033[42m" |
constexpr const char * | BG_YELLOW = "\033[43m" |
constexpr const char * | BG_BLUE = "\033[44m" |
constexpr const char * | BG_MAGENTA = "\033[45m" |
constexpr const char * | BG_CYAN = "\033[46m" |
constexpr const char * | BG_WHITE = "\033[47m" |
constexpr const char * | BG_DEFAULT = "\033[49m" |
|
inline |
Create a background color to be printed in a terminal.
Definition at line 90 of file terminal.hpp.
References m::term::Color::BG.
Referenced by prompt().
|
inline |
Create a foreground color to be printed in a terminal.
Definition at line 88 of file terminal.hpp.
References m::term::Color::FG.
bool m::term::has_color | ( | ) |
Returns true if the terminal is known to support colors, false otherwise.
Definition at line 7 of file terminal.cpp.
References m::streq().
Referenced by main().
|
constexpr |
Definition at line 53 of file terminal.hpp.
|
constexpr |
Definition at line 61 of file terminal.hpp.
|
constexpr |
Definition at line 65 of file terminal.hpp.
|
constexpr |
Definition at line 69 of file terminal.hpp.
Referenced by prompt().
|
constexpr |
Definition at line 57 of file terminal.hpp.
|
constexpr |
Definition at line 63 of file terminal.hpp.
|
constexpr |
Definition at line 55 of file terminal.hpp.
|
constexpr |
Definition at line 67 of file terminal.hpp.
|
constexpr |
Definition at line 59 of file terminal.hpp.
|
constexpr |
Definition at line 23 of file terminal.hpp.
|
constexpr |
Definition at line 33 of file terminal.hpp.
|
constexpr |
Definition at line 14 of file terminal.hpp.
Referenced by prompt().
|
constexpr |
Definition at line 27 of file terminal.hpp.
|
constexpr |
Definition at line 37 of file terminal.hpp.
|
constexpr |
Definition at line 45 of file terminal.hpp.
|
constexpr |
Definition at line 49 of file terminal.hpp.
|
constexpr |
Definition at line 41 of file terminal.hpp.
|
constexpr |
Definition at line 47 of file terminal.hpp.
|
constexpr |
Definition at line 39 of file terminal.hpp.
|
constexpr |
Definition at line 51 of file terminal.hpp.
|
constexpr |
Definition at line 43 of file terminal.hpp.
|
constexpr |
Definition at line 16 of file terminal.hpp.
|
constexpr |
Definition at line 18 of file terminal.hpp.
|
constexpr |
Definition at line 29 of file terminal.hpp.
|
constexpr |
Definition at line 12 of file terminal.hpp.
|
constexpr |
Definition at line 25 of file terminal.hpp.
|
constexpr |
Definition at line 35 of file terminal.hpp.
|
constexpr |
Definition at line 21 of file terminal.hpp.
|
constexpr |
Definition at line 31 of file terminal.hpp.