]> git.lyx.org Git - lyx.git/blob - src/ColorCode.h
add short git hash to name of devel disk images to get different names for devel...
[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_red,
25         ///
26         Color_green,
27         ///
28         Color_blue,
29         ///
30         Color_cyan,
31         ///
32         Color_magenta,
33         ///
34         Color_yellow,
35
36         // Needed interface colors
37
38         /// Cursor color
39         Color_cursor,
40         /// Background color
41         Color_background,
42         /// Foreground color
43         Color_foreground,
44         /// Background color of selected text
45         Color_selection,
46         /// Foreground color of selected text
47         Color_selectiontext,
48         /// Text color in LaTeX mode
49         Color_latex,
50         /// The color used for previews
51         Color_preview,
52         /// Inline completion color
53         Color_inlinecompletion,
54         /// Inline completion color for the non-unique part
55         Color_nonunique_inlinecompletion,
56
57         /// Label color for notes
58         Color_notelabel,
59         /// Background color of notes
60         Color_notebg,
61         /// Label color for comments
62         Color_commentlabel,
63         /// Background color of comments
64         Color_commentbg,
65         /// Label color for greyedout insets
66         Color_greyedoutlabel,
67         /// Color for greyedout inset text
68         Color_greyedouttext,
69         /// Background color of greyedout inset
70         Color_greyedoutbg,
71         /// Background color of shaded box
72         Color_shadedbg,
73         /// Background color of listings inset
74         Color_listingsbg,
75
76         /// Label color for branches
77         Color_branchlabel,
78         /// Label color for footnotes
79         Color_footlabel,
80         /// Label color for index insets
81         Color_indexlabel,
82         /// Label color for margin notes
83         Color_marginlabel,
84         /// Text color for phantom insets
85         Color_phantomtext,
86         /// Label color for URL insets
87         Color_urllabel,
88
89         /// Color for URL inset text
90         Color_urltext,
91
92         /// Color for the depth bars in the margin
93         Color_depthbar,
94         /// Color for marking foreign language words
95         Color_language,
96
97         /// Text color for command insets
98         Color_command,
99         /// Background color for command insets
100         Color_commandbg,
101         /// Frame color for command insets
102         Color_commandframe,
103
104         /// Special chars text color
105         Color_special,
106
107         /// Graphics inset background color
108         Color_graphicsbg,
109         /// Math inset text color
110         Color_math,
111         /// Math inset background color
112         Color_mathbg,
113         /// Macro math inset background color
114         Color_mathmacrobg,
115         /// Macro math inset background color hovered
116         Color_mathmacrohoverbg,
117         /// Macro math label color
118         Color_mathmacrolabel,
119         /// Macro math frame color
120         Color_mathmacroframe,
121         /// Macro math blended color 
122         Color_mathmacroblend,
123         /// Macro template color for old parameters 
124         Color_mathmacrooldarg,
125         /// Macro template color for new parameters 
126         Color_mathmacronewarg,
127         /// Math inset frame color under focus
128         Color_mathframe,
129         /// Math inset frame color not under focus
130         Color_mathcorners,
131         /// Math line color
132         Color_mathline,
133
134         /// Collapsable insets text
135         Color_collapsable,
136         /// Collapsable insets frame
137         Color_collapsableframe,
138
139         /// Inset marker background color
140         Color_insetbg,
141         /// Inset marker frame color
142         Color_insetframe,
143
144         /// Error box text color
145         Color_error,
146         /// End of line (EOL) marker color
147         Color_eolmarker,
148         /// Added space colour
149         Color_added_space,
150         /// Appendix marker color
151         Color_appendix,
152         /// Changebar color
153         Color_changebar,
154         /// Deleted text color
155         Color_deletedtext,
156         /// Added text color
157         Color_addedtext,
158         /// Changed text color author 1
159         Color_changedtextauthor1,
160         /// Changed text color author 2
161         Color_changedtextauthor2,
162         /// Changed text color author 3
163         Color_changedtextauthor3,
164         /// Changed text color author 4
165         Color_changedtextauthor4,
166         /// Changed text color author 5
167         Color_changedtextauthor5,
168         /// Deleted text modifying color
169         Color_deletedtextmodifier,
170         /// Table line color
171         Color_tabularline,
172         /// Table line color
173         Color_tabularonoffline,
174         /// Bottom area color
175         Color_bottomarea,
176         /// New page color
177         Color_newpage,
178         /// Page break color
179         Color_pagebreak,
180
181         // FIXME: why are the next four separate ??
182         /// Color used for button frame
183         Color_buttonframe,
184         /// Color used for bottom background
185         Color_buttonbg,
186         /// Color used for buttom under focus
187         Color_buttonhoverbg,
188         /// Color used for the pilcrow sign to mark the end of a paragraph
189         Color_paragraphmarker,
190         /// Preview frame color
191         Color_previewframe,
192
193         // Logical attributes
194
195         /// Color is inherited
196         Color_inherit,
197         /// Color for regexp frame
198         Color_regexpframe,
199         /// For ignoring updates of a color
200         Color_ignore
201 };
202
203
204 struct RGBColor {
205         unsigned int r;
206         unsigned int g;
207         unsigned int b;
208         RGBColor() : r(0), g(0), b(0) {}
209         RGBColor(unsigned int red, unsigned int green, unsigned int blue)
210                 : r(red), g(green), b(blue) {}
211 };
212
213 inline bool operator==(RGBColor const & c1, RGBColor const & c2)
214 {
215         return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
216 }
217
218
219 inline bool operator!=(RGBColor const & c1, RGBColor const & c2)
220 {
221         return !(c1 == c2);
222 }
223
224 } // namespace lyx
225
226 #endif