]> git.lyx.org Git - lyx.git/blob - src/ColorCode.h
* Doxy: polish html output.
[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         /// Text color in LaTeX mode
48         Color_latex,
49         /// The color used for previews
50         Color_preview,
51
52         /// Text color for notes
53         Color_note,
54         /// Background color of notes
55         Color_notebg,
56         /// Text color for comments
57         Color_comment,
58         /// Background color of comments
59         Color_commentbg,
60         /// Text color for greyedout inset
61         Color_greyedout,
62         /// Background color of greyedout inset
63         Color_greyedoutbg,
64         /// Shaded box background
65         Color_shadedbg,
66
67         /// Color for the depth bars in the margin
68         Color_depthbar,
69         /// Color for marking foreign language words
70         Color_language,
71
72         /// Text color for command insets
73         Color_command,
74         /// Background color for command insets
75         Color_commandbg,
76         /// Frame color for command insets
77         Color_commandframe,
78
79         /// Special chars text color
80         Color_special,
81
82         /// Graphics inset background color
83         Color_graphicsbg,
84         /// Math inset text color
85         Color_math,
86         /// Math inset background color
87         Color_mathbg,
88         /// Macro math inset background color
89         Color_mathmacrobg,
90         /// Macro math inset background color hovered
91         Color_mathmacrohoverbg,
92         /// Macro math label color
93         Color_mathmacrolabel,
94         /// Macro math frame color
95         Color_mathmacroframe,
96         /// Macro math blended color 
97         Color_mathmacroblend,
98         /// Math inset frame color under focus
99         Color_mathframe,
100         /// Math inset frame color not under focus
101         Color_mathcorners,
102         /// Math line color
103         Color_mathline,
104
105         /// caption frame color
106         Color_captionframe,
107
108         /// collapsable insets text
109         Color_collapsable,
110         /// collapsable insets frame
111         Color_collapsableframe,
112
113         /// Inset marker background color
114         Color_insetbg,
115         /// Inset marker frame color
116         Color_insetframe,
117
118         /// Error box text color
119         Color_error,
120         /// EOL marker color
121         Color_eolmarker,
122         /// Added space colour
123         Color_added_space,
124         /// Appendix marker color
125         Color_appendix,
126         /// changebar color
127         Color_changebar,
128         /// deleted text color
129         Color_deletedtext,
130         /// added text color
131         Color_addedtext,
132         /// Top and bottom line color
133         Color_topline,
134         /// Table line color
135         Color_tabularline,
136         /// Table line color
137         Color_tabularonoffline,
138         /// Bottom area color
139         Color_bottomarea,
140         /// New page color
141         Color_newpage,
142         /// Page break color
143         Color_pagebreak,
144
145         // FIXME: why are the next four separate ??
146         /// Color used for button frame
147         Color_buttonframe,
148         /// Color used for bottom background
149         Color_buttonbg,
150         /// Color used for buttom under focus
151         Color_buttonhoverbg,
152
153         // Logical attributes
154
155         /// Color is inherited
156         Color_inherit,
157         /// For ignoring updates of a color
158         Color_ignore
159 };
160
161
162 struct RGBColor {
163         unsigned int r;
164         unsigned int g;
165         unsigned int b;
166         RGBColor() : r(0), g(0), b(0) {}
167         RGBColor(unsigned int red, unsigned int green, unsigned int blue)
168                 : r(red), g(green), b(blue) {}
169 };
170
171 inline bool operator==(RGBColor const & c1, RGBColor const & c2)
172 {
173         return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
174 }
175
176
177 inline bool operator!=(RGBColor const & c1, RGBColor const & c2)
178 {
179         return !(c1 == c2);
180 }
181
182 } // namespace lyx
183
184 #endif