libwreport
3.29
wreport
utils
term.h
1
#ifndef WREPORT_TERM_H
2
#define WREPORT_TERM_H
3
11
#include <cstdio>
12
#include <string>
13
14
namespace
wreport
{
15
namespace
term {
16
17
struct
Terminal
18
{
19
static
const
unsigned
black;
20
static
const
unsigned
red;
21
static
const
unsigned
green;
22
static
const
unsigned
yellow;
23
static
const
unsigned
blue;
24
static
const
unsigned
magenta;
25
static
const
unsigned
cyan;
26
static
const
unsigned
white;
27
static
const
unsigned
bright;
28
29
FILE* out;
30
bool
isatty;
31
32
struct
Restore
33
{
34
Terminal
& term;
35
36
Restore
(
Terminal
& term);
37
~
Restore
();
38
};
39
40
Terminal
(FILE* out);
41
42
Restore
set_color(
int
fg,
int
bg);
43
Restore
set_color_fg(
int
col);
44
Restore
set_color_bg(
int
col);
45
46
std::string color(
int
fg,
int
bg,
const
std::string& s);
47
std::string color_fg(
int
col,
const
std::string& s);
48
std::string color_bg(
int
col,
const
std::string& s);
49
50
operator
FILE*() {
return
out; }
51
};
52
53
}
54
}
55
56
#endif
wreport::term::Terminal::Restore
Definition:
term.h:33
wreport
String functions.
Definition:
benchmark.h:13
wreport::term::Terminal
Definition:
term.h:18
Generated on Wed Mar 24 2021 17:29:26 for libwreport by
1.8.20