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
81 /// Text color for notes
83 /// Background color of notes
87 /// Color for the depth bars in the margin
89 /// Color for marking foreign language words
92 /// Text color for command insets
94 /// Background color for command insets
96 /// Frame color for command insets
99 /// Special chars text color
102 /// Graphics inset background color
104 /// Math inset text color
106 /// Math inset background color
108 /// Macro math inset background color
110 /// Math inset frame color
112 /// Math cursor color
117 /// caption frame color
120 /// collapsable insets text
122 /// collapsable insets frame
125 /// Inset marker background color
127 /// Inset marker frame color
130 /// Error box text color
134 /// Appendix line color
138 /// Top and bottom line color
144 /// Bottom area color
149 // FIXME: why are the next four separate ??
150 /// Color used for top of boxes
152 /// Color used for bottom of boxes
154 /// Color used for left side of boxes
156 /// Color used for right side of boxes
158 /// Color used for bottom background
161 // Logical attributes
163 /// Color is inherited
165 /// For ignoring updates of a color
171 /// set the given LyX color to the color defined by the X11 name given
172 void setColor(LColor::color col, string const & x11name);
173 /// set the given LyX color to the color defined by the X11 name given
174 bool setColor(string const & lyxname, string const & x11name);
176 /// Get GUI name of color
177 string const getGUIName(LColor::color c) const;
179 /// Get X11 name of color
180 string const getX11Name(LColor::color c) const;
182 /// Get LaTeX name of color
183 string const getLaTeXName(LColor::color c) const;
185 /// Get LyX name of color
186 string const getLyXName(LColor::color c) const;
188 /// get the color from the GUI name
189 LColor::color getFromGUIName(string const & guiname) const;
190 /// get the color from the LyX name
191 LColor::color getFromLyXName(string const & lyxname) const;
195 /// the name as it appears in the GUI
197 /// the name used in LaTeX
205 /// initialise a color entry
206 void fill(LColor::color col, string const & gui,
207 string const & latex, string const & x11,
211 typedef std::map<LColor::color, information> InfoTab;
212 /// the table of color information
216 /// the current color definitions
217 extern LColor lcolor;
218 /// the system color definitions
219 extern LColor system_lcolor;