]> git.lyx.org Git - lyx.git/blob - src/ColorCode.h
Fixup f3a0e8ff: costly thinko
[lyx.git] / src / ColorCode.h
1 // -*- C++ -*-
2 /**
3  * \file ColorCode.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * Full author contact details are available in file CREDITS.
8  */
9
10 #ifndef COLOR_CODE_H
11 #define COLOR_CODE_H
12
13 namespace lyx {
14
15 /// Names of colors, including all logical colors
16 enum ColorCode {
17         /// No particular color---clear or default
18         Color_none,
19         /// The different text colors
20         Color_black,
21         ///
22         Color_white,
23         ///
24         Color_blue,
25         ///
26         Color_brown,
27         ///
28         Color_cyan,
29         ///
30         Color_darkgray,
31         ///
32         Color_gray,
33         ///
34         Color_green,
35         ///
36         Color_lightgray,
37         ///
38         Color_lime,
39         ///
40         Color_magenta,
41         ///
42         Color_olive,
43         ///
44         Color_orange,
45         ///
46         Color_pink,
47         ///
48         Color_purple,
49         ///
50         Color_red,
51         ///
52         Color_teal,
53         ///
54         Color_violet,
55         ///
56         Color_yellow,
57
58         // Needed interface colors
59
60         /// Cursor color
61         Color_cursor,
62         /// Background color
63         Color_background,
64         /// Foreground color
65         Color_foreground,
66         /// Background color of selected text
67         Color_selection,
68         /// Foreground color of selected text
69         Color_selectiontext,
70         /// Text color in LaTeX mode
71         Color_latex,
72         /// The color used for previews
73         Color_preview,
74         /// Inline completion color
75         Color_inlinecompletion,
76         /// Inline completion color for the non-unique part
77         Color_nonunique_inlinecompletion,
78
79         /// Label color for notes
80         Color_notelabel,
81         /// Background color of notes
82         Color_notebg,
83         /// Label color for comments
84         Color_commentlabel,
85         /// Background color of comments
86         Color_commentbg,
87         /// Label color for greyedout insets
88         Color_greyedoutlabel,
89         /// Color for greyedout inset text
90         Color_greyedouttext,
91         /// Background color of greyedout inset
92         Color_greyedoutbg,
93         /// Background color of shaded box
94         Color_shadedbg,
95         /// Background color of listings inset
96         Color_listingsbg,
97
98         /// Label color for branches
99         Color_branchlabel,
100         /// Label color for footnotes
101         Color_footlabel,
102         /// Label color for index insets
103         Color_indexlabel,
104         /// Label color for margin notes
105         Color_marginlabel,
106         /// Text color for phantom insets
107         Color_phantomtext,
108         /// Label color for URL insets
109         Color_urllabel,
110
111         /// Label color 1 for text (layout) labels
112         Color_textlabel1,
113         /// Label color 2 for text (layout) labels
114         Color_textlabel2,
115         /// Label color 3 for text (layout) labels
116         Color_textlabel3,
117
118         /// Color for URL inset text
119         Color_urltext,
120
121         /// Color for the depth bars in the margin
122         Color_depthbar,
123         /// Color that indicates when a row can be scrolled
124         Color_scroll,
125         /// Color for marking foreign language words
126         Color_language,
127
128         /// Text color for command insets
129         Color_command,
130         /// Background color for command insets
131         Color_commandbg,
132         /// Frame color for command insets
133         Color_commandframe,
134
135         /// Special chars text color
136         Color_special,
137
138         /// Graphics inset background color
139         Color_graphicsbg,
140         /// Math inset text color
141         Color_math,
142         /// Math inset background color
143         Color_mathbg,
144         /// Macro math inset background color
145         Color_mathmacrobg,
146         /// Macro math inset background color hovered
147         Color_mathmacrohoverbg,
148         /// Macro math label color
149         Color_mathmacrolabel,
150         /// Macro math frame color
151         Color_mathmacroframe,
152         /// Macro math blended color
153         Color_mathmacroblend,
154         /// Macro template color for old parameters
155         Color_mathmacrooldarg,
156         /// Macro template color for new parameters
157         Color_mathmacronewarg,
158         /// Math inset frame color under focus
159         Color_mathframe,
160         /// Math inset frame color not under focus
161         Color_mathcorners,
162         /// Math line color
163         Color_mathline,
164
165         /// Collapsible insets text
166         Color_collapsible,
167         /// Collapsible insets frame
168         Color_collapsibleframe,
169
170         /// Inset marker background color
171         Color_insetbg,
172         /// Inset marker frame color
173         Color_insetframe,
174
175         /// Error box text color
176         Color_error,
177         /// End of line (EOL) marker color
178         Color_eolmarker,
179         /// Added space colour
180         Color_added_space,
181         /// Appendix marker color
182         Color_appendix,
183         /// Changebar color
184         Color_changebar,
185         /// Deleted text color
186         Color_deletedtext,
187         /// Added text color
188         Color_addedtext,
189         /// Added text color author 1
190         Color_addedtextauthor1,
191         /// Added text color author 2
192         Color_addedtextauthor2,
193         /// Added text color author 3
194         Color_addedtextauthor3,
195         /// Added text color author 4
196         Color_addedtextauthor4,
197         /// Added text color author 5
198         Color_addedtextauthor5,
199         /// Deleted text modifying color
200         Color_deletedtextmodifier,
201         /// Table line color
202         Color_tabularline,
203         /// Table line color
204         Color_tabularonoffline,
205         /// Bottom area color
206         Color_bottomarea,
207         /// New page color
208         Color_newpage,
209         /// Page break color
210         Color_pagebreak,
211
212         // FIXME: why are the next four separate ??
213         /// Color used for button frame
214         Color_buttonframe,
215         /// Color used for bottom background
216         Color_buttonbg,
217         /// Color used for button under focus
218         Color_buttonhoverbg,
219         /// Text color for broken insets
220         Color_command_broken,
221         /// Background color for broken insets
222         Color_buttonbg_broken,
223         /// Frame color for broken insets
224         Color_buttonframe_broken,
225         /// Color used for broken inset button under focus
226         Color_buttonhoverbg_broken,
227         /// Color used for the pilcrow sign to mark the end of a paragraph
228         Color_paragraphmarker,
229         /// Preview frame color
230         Color_previewframe,
231         /// Bookmark indicator color
232         Color_bookmark,
233
234         // Logical attributes
235
236         /// Color is inherited
237         Color_inherit,
238         /// Color for regexp frame
239         Color_regexpframe,
240         /// For ignoring updates of a color
241         Color_ignore
242 };
243
244
245 struct RGBColor {
246         unsigned int r;
247         unsigned int g;
248         unsigned int b;
249         RGBColor() : r(0), g(0), b(0) {}
250         RGBColor(unsigned int red, unsigned int green, unsigned int blue)
251                 : r(red), g(green), b(blue) {}
252 };
253
254 inline bool operator==(RGBColor const & c1, RGBColor const & c2)
255 {
256         return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
257 }
258
259
260 inline bool operator!=(RGBColor const & c1, RGBColor const & c2)
261 {
262         return !(c1 == c2);
263 }
264
265 } // namespace lyx
266
267 #endif