clutchlog  0.13
t-fmt-constructors.cpp
1 #include <iostream>
2 #include <limits>
3 
4 #include "../clutchlog/clutchlog.h"
5 
6 int main(/*const int argc, char* argv[]*/)
7 {
8  using fmt = clutchlog::fmt;
9  using fg = clutchlog::fmt::fg;
10  using bg = clutchlog::fmt::bg;
11  using typo = clutchlog::fmt::typo;
12 
13  fmt none;
14  fmt c16_full(fg::red , bg::black , typo::bold);
15  fmt c16_nofg(bg::black , typo::bold);
16  fmt c16_nobg(fg::red , typo::bold);
17  fmt c16_fg (fg::red );
18  fmt c16_bg (bg::red );
19  fmt c16_typo(typo::bold);
20  fmt c16_bft (bg::black , fg::red , typo::bold);
21  fmt c16_bgfg(bg::black , fg::red );
22  fmt c16_tbf (typo::bold, bg::black , fg::red );
23  fmt c16_tfb (typo::bold, fg::red , bg::black );
24  fmt c16_tf (typo::bold, fg::red );
25  fmt c16_tb (typo::bold, bg::black );
26 
27  fmt c256_fbt(196 , 236 , typo::bold);
28  fmt c256_ft (196 , typo::bold);
29  fmt c256_fb (196 , 236 );
30  fmt c256_nbt(fg::none, 236 , typo::bold);
31  fmt c256_fnt(196 , bg::none , typo::bold);
32  fmt c256_nb (fg::none, 236 );
33  fmt c256_fn (196 , bg::none );
34 
35  fmt c16M_fbt(255,10,10 , 10,10,20 , typo::bold);
36  fmt c16M_ft (255,10,10 , typo::bold);
37  fmt c16M_fb (255,10,10 , 10,10,20 );
38  fmt c16M_nbt(fg::none , 10,10,20 , typo::bold);
39  fmt c16M_fnt(255,10,10 , bg::none , typo::bold);
40  fmt c16M_nb (fg::none , 10,10,20 );
41  fmt c16M_fn (255,10,10 , bg::none );
42 }
43 
44 
45 
clutchlog::fmt
Color and style formatter for ANSI terminal escape sequences.
Definition: clutchlog.h:366
clutchlog::fmt::bg
bg
Background color codes.
Definition: clutchlog.h:411
clutchlog::fmt::typo
typo
Typographic style codes.
Definition: clutchlog.h:379
clutchlog::fmt::fg
fg
Foreground color codes.
Definition: clutchlog.h:390