2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1998-2001 The LyX Team
9 *======================================================*/
21 #include <boost/utility.hpp>
24 This is a stateless class.
26 It has one basic purposes:
27 To serve as a color-namespace container (the Color enum).
34 * A class holding color definitions and associated names for
35 * LaTeX, X11, the GUI, and LyX internally.
37 * A color can be one of the following kinds:
39 * - A real, predefined color, such as black, white, red or green.
40 * - A logical color, such as no color, inherit, math
43 class LColor // : public boost::noncopyable {
44 // made copyable for same reasons as LyXRC was made copyable. See there for
48 /// Names of colors, including all logical colors
50 /// No particular color---clear or default
52 /// The different text colors
69 // Needed interface colors
77 /// Background color of selected text
79 /// Text color in LaTeX mode
82 /// Text color for notes
84 /// Background color of notes
86 /// Frame color for notes
90 /// Color for the depth bars in the margin
92 /// Color for marking foreign language words
95 /// Text color for command insets
97 /// Background color for command insets
99 /// Frame color for command insets
102 /// Special chars text color
105 /// Math inset text color
107 /// Math inset background color
109 /// Math inset frame color
111 /// Math cursor color
116 /// caption frame color
119 /// collapsable insets text
121 /// collapsable insets frame
124 /// Inset marker background color
126 /// Inset marker frame color
129 /// Error box text color
133 /// Appendix line color
137 /// Top and bottom line color
143 /// Bottom area color
148 // FIXME: why are the next four separate ??
149 /// Color used for top of boxes
151 /// Color used for bottom of boxes
153 /// Color used for left side of boxes
155 /// Color used for right side of boxes
157 /// Color used for bottom background
160 // Logical attributes
162 /// Color is inherited
164 /// For ignoring updates of a color
170 /// set the given LyX color to the color defined by the X11 name given
171 void setColor(LColor::color col, string const & x11name);
172 /// set the given LyX color to the color defined by the X11 name given
173 bool setColor(string const & lyxname, string const & x11name);
175 /// Get GUI name of color
176 string const getGUIName(LColor::color c) const;
178 /// Get X11 name of color
179 string const getX11Name(LColor::color c) const;
181 /// Get LaTeX name of color
182 string const getLaTeXName(LColor::color c) const;
184 /// Get LyX name of color
185 string const getLyXName(LColor::color c) const;
187 /// get the color from the GUI name
188 LColor::color getFromGUIName(string const & guiname) const;
189 /// get the color from the LyX name
190 LColor::color getFromLyXName(string const & lyxname) const;
194 /// the name as it appears in the GUI
196 /// the name used in LaTeX
204 /// initialise a color entry
205 void fill(LColor::color col, string const & gui,
206 string const & latex, string const & x11,
210 typedef std::map<LColor::color, information> InfoTab;
211 /// the table of color information
215 /// the current color definitions
216 extern LColor lcolor;
217 /// the system color definitions
218 extern LColor system_lcolor;