4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger Alstrup
8 * \author Lars Gullik Bjønnes
9 * \author Matthias Ettrich
10 * \author Jean-Marc Lasgouttes
11 * \author Angus Leeming
13 * \author André Pönitz
14 * \author Martin Vermeer
16 * Full author contact details are available in file CREDITS.
22 #include "support/std_string.h"
23 #include <boost/scoped_ptr.hpp>
26 This is a stateless class.
28 It has one basic purposes:
29 To serve as a color-namespace container (the Color enum).
36 * A class holding color definitions and associated names for
37 * LaTeX, X11, the GUI, and LyX internally.
39 * A color can be one of the following kinds:
41 * - A real, predefined color, such as black, white, red or green.
42 * - A logical color, such as no color, inherit, math
46 // made copyable for same reasons as LyXRC was made copyable. See there for
50 /// Names of colors, including all logical colors
52 /// No particular color---clear or default
54 /// The different text colors
71 // Needed interface colors
79 /// Background color of selected text
81 /// Text color in LaTeX mode
83 /// The color used for previews
86 /// Text color for notes
88 /// Background color of notes
90 /// Text color for comments
92 /// Background color of comments
94 /// Text color for greyedout inset
96 /// Background color of greyedout inset
100 /// Color for the depth bars in the margin
102 /// Color for marking foreign language words
105 /// Text color for command insets
107 /// Background color for command insets
109 /// Frame color for command insets
112 /// Special chars text color
115 /// Graphics inset background color
117 /// Math inset text color
119 /// Math inset background color
121 /// Macro math inset background color
123 /// Math inset frame color
128 /// caption frame color
131 /// collapsable insets text
133 /// collapsable insets frame
136 /// Inset marker background color
138 /// Inset marker frame color
141 /// Error box text color
145 /// Added space colour
147 /// Appendix marker color
155 /// Top and bottom line color
161 /// Bottom area color
166 // FIXME: why are the next four separate ??
167 /// Color used for top of boxes
169 /// Color used for bottom of boxes
171 /// Color used for left side of boxes
173 /// Color used for right side of boxes
175 /// Color used for bottom background
178 // Logical attributes
180 /// Color is inherited
182 /// For ignoring updates of a color
190 LColor(LColor const &);
194 void operator=(LColor const &);
197 void LColor::fill(LColor::color c,
198 string const & lyxname,
199 string const & x11name = string(),
200 string const & latexname = string(),
201 string const & guiname = string());
203 /// set the given LyX color to the color defined by the X11 name given
204 void setColor(LColor::color col, string const & x11name);
205 /// set the given LyX color to the color defined by the X11 name given
206 bool setColor(string const & lyxname, string const & x11name);
208 /// Get GUI name of color
209 string const getGUIName(LColor::color c) const;
211 string const getGUIName(string const & s) const;
213 /// Get X11 name of color
214 string const getX11Name(LColor::color c) const;
216 string const getX11Name(string const & s) const;
218 /// Get LaTeX name of color
219 string const getLaTeXName(LColor::color c) const;
221 string const getLaTeXName(string const & s) const;
223 /// Get LyX name of color
224 string const getLyXName(LColor::color c) const;
225 /// (string-to-string version not needed as it is identity)
230 /// get the color from the GUI name
231 LColor::color getFromGUIName(string const & guiname) const;
232 /// get the color from the LyX name
233 LColor::color getFromLyXName(string const & lyxname) const;
238 boost::scoped_ptr<Pimpl> pimpl_;
241 /// the current color definitions
242 extern LColor lcolor;
243 /// the system color definitions
244 extern LColor system_lcolor;