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