2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1998-2001 The LyX Team
9 *======================================================*/
23 This is a stateless class.
25 It has one basic purposes:
26 To serve as a color-namespace container (the Color enum).
33 * A class holding color definitions and associated names for
34 * LaTeX, X11, the GUI, and LyX internally.
36 * A color can be one of the following kinds:
38 * - A real, predefined color, such as black, white, red or green.
39 * - A logical color, such as no color, inherit, math
42 class LColor // : public boost::noncopyable {
43 // made copyable for same reasons as LyXRC was made copyable. See there for
47 /// Names of colors, including all logical colors
49 /// No particular color---clear or default
51 /// The different text colors
68 // Needed interface colors
76 /// Background color of selected text
78 /// Text color in LaTeX mode
80 /// The color used for previews
83 /// Text color for notes
85 /// Background color of notes
89 /// Color for the depth bars in the margin
91 /// Color for marking foreign language words
94 /// Text color for command insets
96 /// Background color for command insets
98 /// Frame color for command insets
101 /// Special chars text color
104 /// Graphics inset background color
106 /// Math inset text color
108 /// Math inset background color
110 /// Macro math inset background color
112 /// Math inset frame color
114 /// Math cursor color
119 /// caption frame color
122 /// collapsable insets text
124 /// collapsable insets frame
127 /// Inset marker background color
129 /// Inset marker frame color
132 /// Error box text color
136 /// Added space colour
138 /// Appendix line color
146 /// Top and bottom line color
152 /// Bottom area color
157 // FIXME: why are the next four separate ??
158 /// Color used for top of boxes
160 /// Color used for bottom of boxes
162 /// Color used for left side of boxes
164 /// Color used for right side of boxes
166 /// Color used for bottom background
169 // Logical attributes
171 /// Color is inherited
173 /// For ignoring updates of a color
179 /// set the given LyX color to the color defined by the X11 name given
180 void setColor(LColor::color col, string const & x11name);
181 /// set the given LyX color to the color defined by the X11 name given
182 bool setColor(string const & lyxname, string const & x11name);
184 /// Get GUI name of color
185 string const getGUIName(LColor::color c) const;
187 /// Get X11 name of color
188 string const getX11Name(LColor::color c) const;
190 /// Get LaTeX name of color
191 string const getLaTeXName(LColor::color c) const;
193 /// Get LyX name of color
194 string const getLyXName(LColor::color c) const;
196 /// get the color from the GUI name
197 LColor::color getFromGUIName(string const & guiname) const;
198 /// get the color from the LyX name
199 LColor::color getFromLyXName(string const & lyxname) const;
203 /// the name as it appears in the GUI
205 /// the name used in LaTeX
213 /// initialise a color entry
214 void fill(LColor::color col, string const & gui,
215 string const & latex, string const & x11,
219 typedef std::map<LColor::color, information> InfoTab;
220 /// the table of color information
224 /// the current color definitions
225 extern LColor lcolor;
226 /// the system color definitions
227 extern LColor system_lcolor;