Easy3D 2.5.3
console_style.h
1/********************************************************************
2 * Copyright (C) 2015 Liangliang Nan <liangliang.nan@gmail.com>
3 * https://3d.bk.tudelft.nl/liangliang/
4 *
5 * This file is part of Easy3D. If it is useful in your research/work,
6 * I would be grateful if you show your appreciation by citing it:
7 * ------------------------------------------------------------------
8 * Liangliang Nan.
9 * Easy3D: a lightweight, easy-to-use, and efficient C++ library
10 * for processing and rendering 3D data.
11 * Journal of Open Source Software, 6(64), 3255, 2021.
12 * ------------------------------------------------------------------
13 *
14 * Easy3D is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License Version 3
16 * as published by the Free Software Foundation.
17 *
18 * Easy3D is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
22 *
23 * You should have received a copy of the GNU General Public License
24 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 ********************************************************************/
26
27#ifndef EASY3D_UTIL_CONSOLE_STYLE_H
28#define EASY3D_UTIL_CONSOLE_STYLE_H
29
30#include <ostream>
31
32
33namespace easy3d {
34
37 namespace console {
38
39 enum Style {
40 // Reset
41 None = 0,
42 // Regular colors
43 Black = 1,
44 Red = 2,
45 Green = 3,
46 Yellow = 4,
47 Blue = 5,
48 Purple = 6,
49 Cyan = 7,
50 White = 8,
51 // Bold
52 BBlack = 9,
53 BRed = 10,
54 BGreen = 11,
55 BYellow = 12,
56 BBlue = 13,
57 BPurple = 14,
58 BCyan = 15,
59 BWhite = 16,
60 // Underline
61 UBlack = 17,
62 URed = 18,
63 UGreen = 19,
64 UYellow = 20,
65 UBlue = 21,
66 UPurple = 22,
67 UCyan = 23,
68 UWhite = 24,
69 // Background
70 On_Black = 25,
71 On_Red = 26,
72 On_Green = 27,
73 On_Yellow = 28,
74 On_Blue = 29,
75 On_Purple = 30,
76 On_Cyan = 31,
77 On_White = 32,
78 // High intensity
79 IBlack = 33,
80 IRed = 34,
81 IGreen = 35,
82 IYellow = 36,
83 IBlue = 37,
84 IPurple = 38,
85 ICyan = 39,
86 IWhite = 40,
87 // Bold high intensity
88 BIBlack = 41,
89 BIRed = 42,
90 BIGreen = 42,
91 BIYellow = 44,
92 BIBlue = 45,
93 BIPurple = 46,
94 BICyan = 47,
95 BIWhite = 48,
96 // High intensity backgrounds
97 On_IBlack = 49,
98 On_IRed = 50,
99 On_IGreen = 51,
101 On_IBlue = 53,
103 On_ICyan = 55,
104 On_IWhite = 56
105 };
106
107
110
111 } // namespace style
112
115 std::ostream& operator<<(std::ostream& s, console::Style style);
116
117}
118
119#endif // EASY3D_UTIL_CONSOLE_STYLE_H
bool terminal_supports_styles()
Returns if the terminal supports using styles in output.
Definition: console_style.cpp:110
Style
Definition: console_style.h:39
@ Purple
Blue.
Definition: console_style.h:48
@ UPurple
Blue.
Definition: console_style.h:66
@ On_ICyan
Purple.
Definition: console_style.h:103
@ BIYellow
Green.
Definition: console_style.h:91
@ BPurple
Blue.
Definition: console_style.h:57
@ On_IRed
Black.
Definition: console_style.h:98
@ ICyan
Purple.
Definition: console_style.h:85
@ BRed
Black.
Definition: console_style.h:53
@ BBlack
White.
Definition: console_style.h:52
@ IWhite
Cyan.
Definition: console_style.h:86
@ On_IYellow
Green.
Definition: console_style.h:100
@ On_Blue
Yellow.
Definition: console_style.h:74
@ On_IBlue
Yellow.
Definition: console_style.h:101
@ On_Purple
Blue.
Definition: console_style.h:75
@ On_Yellow
Green.
Definition: console_style.h:73
@ IPurple
Blue.
Definition: console_style.h:84
@ BIPurple
Blue.
Definition: console_style.h:93
@ IYellow
Green.
Definition: console_style.h:82
@ On_Black
White.
Definition: console_style.h:70
@ IBlack
White.
Definition: console_style.h:79
@ BGreen
Red.
Definition: console_style.h:54
@ On_Red
Black.
Definition: console_style.h:71
@ On_IPurple
Blue.
Definition: console_style.h:102
@ On_IGreen
Red.
Definition: console_style.h:99
@ IGreen
Red.
Definition: console_style.h:81
@ BIGreen
Red.
Definition: console_style.h:90
@ On_Cyan
Purple.
Definition: console_style.h:76
@ UWhite
Cyan.
Definition: console_style.h:68
@ UBlue
Yellow.
Definition: console_style.h:65
@ On_White
Cyan.
Definition: console_style.h:77
@ BIBlue
Yellow.
Definition: console_style.h:92
@ BIRed
Black.
Definition: console_style.h:89
@ BICyan
Purple.
Definition: console_style.h:94
@ BIWhite
Cyan.
Definition: console_style.h:95
@ UYellow
Green.
Definition: console_style.h:64
@ UGreen
Red.
Definition: console_style.h:63
@ On_Green
Red.
Definition: console_style.h:72
@ IRed
Black.
Definition: console_style.h:80
@ Cyan
Purple.
Definition: console_style.h:49
@ UCyan
Purple.
Definition: console_style.h:67
@ URed
Black.
Definition: console_style.h:62
@ White
Cyan.
Definition: console_style.h:50
@ On_IBlack
White.
Definition: console_style.h:97
@ BWhite
Cyan.
Definition: console_style.h:59
@ Yellow
Green.
Definition: console_style.h:46
@ Black
Reset.
Definition: console_style.h:43
@ BIBlack
White.
Definition: console_style.h:88
@ IBlue
Yellow.
Definition: console_style.h:83
@ Green
Red.
Definition: console_style.h:45
@ Red
Black.
Definition: console_style.h:44
@ UBlack
White.
Definition: console_style.h:61
@ On_IWhite
Cyan.
Definition: console_style.h:104
@ BBlue
Yellow.
Definition: console_style.h:56
@ BYellow
Green.
Definition: console_style.h:55
@ Blue
Yellow.
Definition: console_style.h:47
@ BCyan
Purple.
Definition: console_style.h:58
Definition: collider.cpp:182
std::ostream & operator<<(std::ostream &os, Graph::Vertex v)
Definition: graph.h:920