2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1998-2001 The LyX Team
9 *======================================================*/
19 This is a stateless class.
21 It has one basic purposes:
22 To serve as a color-namespace container (the Color enum).
29 * A class holding color definitions and associated names for
30 * LaTeX, X11, the GUI, and LyX internally.
32 * A color can be one of the following kinds:
34 * - A real, predefined color, such as black, white, red or green.
35 * - A logical color, such as no color, inherit, math
38 class LColor // : public boost::noncopyable {
39 // made copyable for same reasons as LyXRC was made copyable. See there for
43 /// Names of colors, including all logical colors
45 /// No particular color---clear or default
47 /// The different text colors
64 // Needed interface colors
72 /// Background color of selected text
74 /// Text color in LaTeX mode
76 /// The color used for previews
79 /// Text color for notes
81 /// Background color of notes
85 /// Color for the depth bars in the margin
87 /// Color for marking foreign language words
90 /// Text color for command insets
92 /// Background color for command insets
94 /// Frame color for command insets
97 /// Special chars text color
100 /// Graphics inset background color
102 /// Math inset text color
104 /// Math inset background color
106 /// Macro math inset background color
108 /// Math inset frame color
113 /// caption frame color
116 /// collapsable insets text
118 /// collapsable insets frame
121 /// Inset marker background color
123 /// Inset marker frame color
126 /// Error box text color
130 /// Added space colour
132 /// Appendix marker 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;