]> git.lyx.org Git - features.git/blob - src/ColorCode.h
Add marks to indicate when a row is too large
[features.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 that indicates when a row can be scrolled
95         Color_scroll,
96         /// Color for marking foreign language words
97         Color_language,
98
99         /// Text color for command insets
100         Color_command,
101         /// Background color for command insets
102         Color_commandbg,
103         /// Frame color for command insets
104         Color_commandframe,
105
106         /// Special chars text color
107         Color_special,
108
109         /// Graphics inset background color
110         Color_graphicsbg,
111         /// Math inset text color
112         Color_math,
113         /// Math inset background color
114         Color_mathbg,
115         /// Macro math inset background color
116         Color_mathmacrobg,
117         /// Macro math inset background color hovered
118         Color_mathmacrohoverbg,
119         /// Macro math label color
120         Color_mathmacrolabel,
121         /// Macro math frame color
122         Color_mathmacroframe,
123         /// Macro math blended color 
124         Color_mathmacroblend,
125         /// Macro template color for old parameters 
126         Color_mathmacrooldarg,
127         /// Macro template color for new parameters 
128         Color_mathmacronewarg,
129         /// Math inset frame color under focus
130         Color_mathframe,
131         /// Math inset frame color not under focus
132         Color_mathcorners,
133         /// Math line color
134         Color_mathline,
135
136         /// Collapsable insets text
137         Color_collapsable,
138         /// Collapsable insets frame
139         Color_collapsableframe,
140
141         /// Inset marker background color
142         Color_insetbg,
143         /// Inset marker frame color
144         Color_insetframe,
145
146         /// Error box text color
147         Color_error,
148         /// End of line (EOL) marker color
149         Color_eolmarker,
150         /// Added space colour
151         Color_added_space,
152         /// Appendix marker color
153         Color_appendix,
154         /// Changebar color
155         Color_changebar,
156         /// Deleted text color
157         Color_deletedtext,
158         /// Added text color
159         Color_addedtext,
160         /// Changed text color author 1
161         Color_changedtextauthor1,
162         /// Changed text color author 2
163         Color_changedtextauthor2,
164         /// Changed text color author 3
165         Color_changedtextauthor3,
166         /// Changed text color author 4
167         Color_changedtextauthor4,
168         /// Changed text color author 5
169         Color_changedtextauthor5,
170         /// Deleted text modifying color
171         Color_deletedtextmodifier,
172         /// Table line color
173         Color_tabularline,
174         /// Table line color
175         Color_tabularonoffline,
176         /// Bottom area color
177         Color_bottomarea,
178         /// New page color
179         Color_newpage,
180         /// Page break color
181         Color_pagebreak,
182
183         // FIXME: why are the next four separate ??
184         /// Color used for button frame
185         Color_buttonframe,
186         /// Color used for bottom background
187         Color_buttonbg,
188         /// Color used for buttom under focus
189         Color_buttonhoverbg,
190         /// Color used for the pilcrow sign to mark the end of a paragraph
191         Color_paragraphmarker,
192         /// Preview frame color
193         Color_previewframe,
194
195         // Logical attributes
196
197         /// Color is inherited
198         Color_inherit,
199         /// Color for regexp frame
200         Color_regexpframe,
201         /// For ignoring updates of a color
202         Color_ignore
203 };
204
205
206 struct RGBColor {
207         unsigned int r;
208         unsigned int g;
209         unsigned int b;
210         RGBColor() : r(0), g(0), b(0) {}
211         RGBColor(unsigned int red, unsigned int green, unsigned int blue)
212                 : r(red), g(green), b(blue) {}
213 };
214
215 inline bool operator==(RGBColor const & c1, RGBColor const & c2)
216 {
217         return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
218 }
219
220
221 inline bool operator!=(RGBColor const & c1, RGBColor const & c2)
222 {
223         return !(c1 == c2);
224 }
225
226 } // namespace lyx
227
228 #endif