Directory: | ./ |
---|---|
File: | tmp_project/PhoenixCore/src/phoenix_color.cpp |
Date: | 2025-03-14 12:04:36 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 25 | 25 | 100.0% |
Branches: | 22 | 22 | 100.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | /*************************************** | ||
2 | Auteur : Pierre Aubert | ||
3 | Mail : pierre.aubert@lapp.in2p3.fr | ||
4 | Licence : CeCILL-C | ||
5 | ****************************************/ | ||
6 | |||
7 | #include "phoenix_color.h" | ||
8 | |||
9 | ///affiche le terminal par défaut | ||
10 | /** @return string de modification du terminal | ||
11 | */ | ||
12 |
1/1✓ Branch 2 taken 24 times.
|
24 | std::string termDefault(){return "\033[0m";} |
13 | |||
14 | ///affiche le terminal brillant | ||
15 | /** @return string de modification du terminal | ||
16 | */ | ||
17 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBright(){return "\033[1m";} |
18 | |||
19 | ///affiche le terminal souligné | ||
20 | /** @return string de modification du terminal | ||
21 | */ | ||
22 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termUnderlined(){return "\033[4m";} |
23 | |||
24 | ///affiche le terminal clignotant | ||
25 | /** @return string de modification du terminal | ||
26 | */ | ||
27 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBlink(){return "\033[5m";} |
28 | |||
29 | ///affiche le terminal négatif | ||
30 | /** @return string de modification du terminal | ||
31 | */ | ||
32 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termNegative(){return "\033[7m";} |
33 | |||
34 | ///affiche le terminal positif | ||
35 | /** @return string de modification du terminal | ||
36 | */ | ||
37 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termPositive(){return "\033[27m";} |
38 | |||
39 | ///affiche le terminal noir | ||
40 | /** @return string de modification du terminal | ||
41 | */ | ||
42 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBlack(){return "\033[30m";} |
43 | |||
44 | ///affiche le terminal rouge | ||
45 | /** @return string de modification du terminal | ||
46 | */ | ||
47 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termRed(){return "\033[31m";} |
48 | |||
49 | ///affiche le terminal vert | ||
50 | /** @return string de modification du terminal | ||
51 | */ | ||
52 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termGreen(){return "\033[32m";} |
53 | |||
54 | ///affiche le terminal jaune | ||
55 | /** @return string de modification du terminal | ||
56 | */ | ||
57 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termYellow(){return "\033[33m";} |
58 | |||
59 | ///affiche le terminal blue | ||
60 | /** @return string de modification du terminal | ||
61 | */ | ||
62 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBlue(){return "\033[34m";} |
63 | |||
64 | ///affiche le terminal violet | ||
65 | /** @return string de modification du terminal | ||
66 | */ | ||
67 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termPurple(){return "\033[35m";} |
68 | |||
69 | ///affiche le terminal cyan | ||
70 | /** @return string de modification du terminal | ||
71 | */ | ||
72 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termCyan(){return "\033[36m";} |
73 | |||
74 | ///affiche le terminal blanc | ||
75 | /** @return string de modification du terminal | ||
76 | */ | ||
77 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termWhite(){return "\033[37m";} |
78 | |||
79 | ///affiche le fond du terminal en noir | ||
80 | /** @return string de modification du terminal | ||
81 | */ | ||
82 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBBlack(){return "\033[40m";} |
83 | |||
84 | ///affiche le fond du terminal en rouge | ||
85 | /** @return string de modification du terminal | ||
86 | */ | ||
87 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBRed(){return "\033[41m";} |
88 | |||
89 | ///affiche le fond du terminal en vert | ||
90 | /** @return string de modification du terminal | ||
91 | */ | ||
92 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBGreen(){return "\033[42m";} |
93 | |||
94 | ///affiche le fond du terminal en jaune | ||
95 | /** @return string de modification du terminal | ||
96 | */ | ||
97 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBYellow(){return "\033[43m";} |
98 | |||
99 | ///affiche le fond du terminal en bleu | ||
100 | /** @return string de modification du terminal | ||
101 | */ | ||
102 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBBlue(){return "\033[44m";} |
103 | |||
104 | ///affiche le fond du terminal en violet | ||
105 | /** @return string de modification du terminal | ||
106 | */ | ||
107 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBPurple(){return "\033[45m";} |
108 | |||
109 | ///affiche le fond du terminal en cyan | ||
110 | /** @return string de modification du terminal | ||
111 | */ | ||
112 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBCyan(){return "\033[46m";} |
113 | |||
114 | ///affiche le fond du terminal en blanc | ||
115 | /** @return string de modification du terminal | ||
116 | */ | ||
117 |
1/1✓ Branch 2 taken 1 times.
|
1 | std::string termBWhite(){return "\033[47m";} |
118 | |||
119 | ///fonction qui permet d'éffacer le terminal | ||
120 | 1 | void clearTerminal(){ | |
121 | 1 | printf("\033[H\033[2J"); | |
122 | 1 | } | |
123 | |||
124 | |||
125 |