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
140 /// Top and bottom line color
146 /// Bottom area color
151 // FIXME: why are the next four separate ??
152 /// Color used for top of boxes
154 /// Color used for bottom of boxes
156 /// Color used for left side of boxes
158 /// Color used for right side of boxes
160 /// Color used for bottom background
163 // Logical attributes
165 /// Color is inherited
167 /// For ignoring updates of a color
173 /// set the given LyX color to the color defined by the X11 name given
174 void setColor(LColor::color col, string const & x11name);
175 /// set the given LyX color to the color defined by the X11 name given
176 bool setColor(string const & lyxname, string const & x11name);
178 /// Get GUI name of color
179 string const getGUIName(LColor::color c) const;
181 /// Get X11 name of color
182 string const getX11Name(LColor::color c) const;
184 /// Get LaTeX name of color
185 string const getLaTeXName(LColor::color c) const;
187 /// Get LyX name of color
188 string const getLyXName(LColor::color c) const;
190 /// get the color from the GUI name
191 LColor::color getFromGUIName(string const & guiname) const;
192 /// get the color from the LyX name
193 LColor::color getFromLyXName(string const & lyxname) const;
197 /// the name as it appears in the GUI
199 /// the name used in LaTeX
207 /// initialise a color entry
208 void fill(LColor::color col, string const & gui,
209 string const & latex, string const & x11,
213 typedef std::map<LColor::color, information> InfoTab;
214 /// the table of color information
218 /// the current color definitions
219 extern LColor lcolor;
220 /// the system color definitions
221 extern LColor system_lcolor;