LBIBCell
 All Classes Functions Variables Friends Pages
TerminalColors.hpp
1 /* Copyright (c) 2013 David Sichau <mail"at"sichau"dot"eu>
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to deal
5  * in the Software without restriction, including without limitation the rights
6  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7  * copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions:
9  *
10  * The above copyright notice and this permission notice shall be included in
11  * all copies or substantial portions of the Software.
12  *
13  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
18  * THE SOFTWARE.
19  *
20  */
21 
22 #ifndef UTILIB_TERMINALCOLORS_HPP
23 #define UTILIB_TERMINALCOLORS_HPP
24 
25 
26 namespace UtilLib {
27 
28 #define RESET "\033[0m" /* Reset Color */
29 #define BLACK "\033[30m" /* Black */
30 #define RED "\033[31m" /* Red */
31 #define GREEN "\033[32m" /* Green */
32 #define YELLOW "\033[33m" /* Yellow */
33 #define BLUE "\033[34m" /* Blue */
34 #define MAGENTA "\033[35m" /* Magenta */
35 #define CYAN "\033[36m" /* Cyan */
36 #define WHITE "\033[37m" /* White */
37 #define BOLDBLACK "\033[1m\033[30m" /* Bold Black */
38 #define BOLDRED "\033[1m\033[31m" /* Bold Red */
39 #define BOLDGREEN "\033[1m\033[32m" /* Bold Green */
40 #define BOLDYELLOW "\033[1m\033[33m" /* Bold Yellow */
41 #define BOLDBLUE "\033[1m\033[34m" /* Bold Blue */
42 #define BOLDMAGENTA "\033[1m\033[35m" /* Bold Magenta */
43 #define BOLDCYAN "\033[1m\033[36m" /* Bold Cyan */
44 #define BOLDWHITE "\033[1m\033[37m" /* Bold White */
45 
46 
47 #define STORE_CURSOR "\033[s" /* Stores the current cursor position */
48 #define RESET_CURSOR "\033[u" /* Restores the stored cursor position */
49 #define GO_LINE_UP "\033[A" /* Goes a line up */
50 #define GO_LINE_DOWN "\033[B" /* Goes a line down */
51 #define GO_LINE_BEGIN "\r" /* Goes to the line start */
52 #define DEL_END "\033[K" /* Deletes from the cursor to the end of the line */
53 
54 
55 
56 
57 
58 } /* end namespace */
59 #endif /* UTILIB_TERMINALCOLORS_HPP */