#include <terminal.hpp>
|
static const int | BLACK = 30 |
|
static const int | RED = 31 |
|
static const int | GREEN = 32 |
|
static const int | YELLOW = 33 |
|
static const int | BLUE = 34 |
|
static const int | MAGENTA = 35 |
|
static const int | CYAN = 36 |
|
static const int | WHITE = 37 |
|
cypress::Terminal::Terminal |
( |
bool |
use_color | ) |
|
|
inline |
Creates a new instance of the Terminal class.
- Parameters
-
use_color | specifies whether color codes should be generated. |
std::string cypress::Terminal::background |
( |
int |
color | ) |
const |
Returns a control string for switching the background to the given color.
- Parameters
-
color | is the background color the terminal should switch to. |
- Returns
- a control string to be included in the output stream.
std::string cypress::Terminal::bright |
( |
| ) |
const |
Returns a control string for switching to the bright mode.
- Returns
- a control string to be included in the output stream.
std::string cypress::Terminal::color |
( |
int |
color, |
|
|
bool |
bright = true |
|
) |
| const |
Returns a control string for switching to the given color.
- Parameters
-
color | is the color the terminal should switch to. |
bright | specifies whether the terminal should switch to the bright mode. |
- Returns
- a control string to be included in the output stream.
std::string cypress::Terminal::italic |
( |
| ) |
const |
Makes the text italic.
- Returns
- a control string to be included in the output stream.
std::string cypress::Terminal::reset |
( |
| ) |
const |
Returns a control string for switching to the default mode.
- Returns
- a control string to be included in the output stream.
std::string cypress::Terminal::rgb |
( |
uint8_t |
r, |
|
|
uint8_t |
g, |
|
|
uint8_t |
b, |
|
|
bool |
background |
|
) |
| const |
std::string cypress::Terminal::underline |
( |
| ) |
const |
Underlines the text.
- Returns
- a control string to be included in the output stream.
const int cypress::Terminal::BLACK = 30 |
|
static |
ANSI color code for black.
const int cypress::Terminal::BLUE = 34 |
|
static |
ANSI color code for blue.
const int cypress::Terminal::CYAN = 36 |
|
static |
ANSI color code for cyan.
const int cypress::Terminal::GREEN = 32 |
|
static |
ANSI color code for green.
const int cypress::Terminal::MAGENTA = 35 |
|
static |
ANSI color code for magenta.
const int cypress::Terminal::RED = 31 |
|
static |
const int cypress::Terminal::WHITE = 37 |
|
static |
ANSI color code for white.
const int cypress::Terminal::YELLOW = 33 |
|
static |
ANSI color code for yellow.
The documentation for this class was generated from the following file: