2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1998-2001 The LyX Team
9 *======================================================*/
15 #include <boost/scoped_ptr.hpp>
18 This is a stateless class.
20 It has one basic purposes:
21 To serve as a color-namespace container (the Color enum).
28 * A class holding color definitions and associated names for
29 * LaTeX, X11, the GUI, and LyX internally.
31 * A color can be one of the following kinds:
33 * - A real, predefined color, such as black, white, red or green.
34 * - A logical color, such as no color, inherit, math
38 // made copyable for same reasons as LyXRC was made copyable. See there for
42 /// Names of colors, including all logical colors
44 /// No particular color---clear or default
46 /// The different text colors
63 // Needed interface colors
71 /// Background color of selected text
73 /// Text color in LaTeX mode
75 /// The color used for previews
78 /// Text color for notes
80 /// Background color of notes
82 /// Text color for comments
84 /// Background color of comments
86 /// Text color for greyedout inset
88 /// Background color of greyedout inset
92 /// Color for the depth bars in the margin
94 /// Color for marking foreign language words
97 /// Text color for command insets
99 /// Background color for command insets
101 /// Frame color for command insets
104 /// Special chars text color
107 /// Graphics inset background color
109 /// Math inset text color
111 /// Math inset background color
113 /// Macro math inset background color
115 /// Math inset frame color
120 /// caption frame color
123 /// collapsable insets text
125 /// collapsable insets frame
128 /// Inset marker background color
130 /// Inset marker frame color
133 /// Error box text color
137 /// Added space colour
139 /// Appendix marker color
147 /// Top and bottom line color
153 /// Bottom area color
158 // FIXME: why are the next four separate ??
159 /// Color used for top of boxes
161 /// Color used for bottom of boxes
163 /// Color used for left side of boxes
165 /// Color used for right side of boxes
167 /// Color used for bottom background
170 // Logical attributes
172 /// Color is inherited
174 /// For ignoring updates of a color
182 LColor(LColor const &);
186 void operator=(LColor const &);
189 void LColor::fill(LColor::color c,
190 string const & lyxname,
191 string const & x11name = string(),
192 string const & latexname = string(),
193 string const & guiname = string());
195 /// set the given LyX color to the color defined by the X11 name given
196 void setColor(LColor::color col, string const & x11name);
197 /// set the given LyX color to the color defined by the X11 name given
198 bool setColor(string const & lyxname, string const & x11name);
200 /// Get GUI name of color
201 string const getGUIName(LColor::color c) const;
203 string const getGUIName(string const & s) const;
205 /// Get X11 name of color
206 string const getX11Name(LColor::color c) const;
208 string const getX11Name(string const & s) const;
210 /// Get LaTeX name of color
211 string const getLaTeXName(LColor::color c) const;
213 string const getLaTeXName(string const & s) const;
215 /// Get LyX name of color
216 string const getLyXName(LColor::color c) const;
217 /// (string-to-string version not needed as it is identity)
222 /// get the color from the GUI name
223 LColor::color getFromGUIName(string const & guiname) const;
224 /// get the color from the LyX name
225 LColor::color getFromLyXName(string const & lyxname) const;
230 boost::scoped_ptr<Pimpl> pimpl_;
233 /// the current color definitions
234 extern LColor lcolor;
235 /// the system color definitions
236 extern LColor system_lcolor;