The attached cleans up LColor a little bit. Note the FIXMEs.

thanks
john

-- 
"This is just the kind of crackpot scheme I've been looking to champion!!!"
        - P.M. Hartke on 6U campaign
Index: ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v
retrieving revision 1.168
diff -u -r1.168 ChangeLog
--- ChangeLog   2001/05/18 07:37:14     1.168
+++ ChangeLog   2001/05/22 20:42:14
@@ -1,3 +1,8 @@
+2001-05-22  John Levon  <[EMAIL PROTECTED]>
+
+       * LColor.h:
+       * LColor.C: remove some dead entries, tidy a little
+ 
 2001-05-18  Lars Gullik Bjønnes  <[EMAIL PROTECTED]>
 
        * lyxfunc.C (processKeySym): comment the Escape handling, remove
@@ -26,8 +31,8 @@
 
        * buffer.C: fix path for OS/2 & Win32
 
-       * lyx_gui.C
-       * lyx_main
+       * lyx_gui.C:
+       * lyx_main:
        * lyx_main.C: Added os:: class.
        
        * os2_defines.h: update
Index: LColor.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.C,v
retrieving revision 1.20
diff -u -r1.20 LColor.C
--- LColor.C    2001/04/24 15:25:19     1.20
+++ LColor.C    2001/05/22 20:42:14
@@ -63,41 +63,33 @@
        { foreground, N_("text"), "foreground", "black", "foreground" },
        { selection, N_("selection"), "selection", "LightBlue", "selection" },
        { latex, N_("latex"), "latex", "DarkRed", "latex" },
-       { floats, N_("floats"), "floats", "red", "floats" },
        { note, N_("note"), "note", "black", "note" },
        { notebg, N_("note background"), "notebg", "yellow", "notebg" },
        { noteframe, N_("note frame"), "noteframe", "black", "noteframe" },
        { depthbar, N_("depth bar"), "depthbar", "IndianRed", "depthbar" },
        { language, N_("language"), "language", "Blue", "language" },
-       { command, N_("command-inset"), "command", "black", "command" },
-       { commandbg, N_("command-inset background"), "commandbg", "grey80", 
"commandbg" },
-       { commandframe, N_("command-inset frame"), "commandframe", "black", 
"commandframe" },
-       { accent, N_("accent"), "accent", "black", "accent" },
-       { accentbg, N_("accent background"), "accentbg", "linen", "accentbg" },
-       { accentframe, N_("accent frame"), "accentframe", "linen", "accentframe" },
-       { minipageline, N_("minipage line"), "minipageline", "violet", "minipageline" 
},
-       { special, N_("special char"), "special", "RoyalBlue", "special" },
+       { command, N_("command inset"), "command", "black", "command" },
+       { commandbg, N_("command inset background"), "commandbg", "grey80", 
+"commandbg" },
+       { commandframe, N_("command inset frame"), "commandframe", "black", 
+"commandframe" },
+       { special, N_("special character"), "special", "RoyalBlue", "special" },
        { math, N_("math"), "math", "DarkBlue", "math" },
        { mathbg, N_("math background"), "mathbg", "AntiqueWhite", "mathbg" },
        { mathframe, N_("math frame"), "mathframe", "Magenta", "mathframe" },
        { mathcursor, N_("math cursor"), "mathcursor", "black", "mathcursor" },
        { mathline, N_("math line"), "mathline", "Blue", "mathline" },
        { footnote, N_("footnote"), "footnote", "DarkRed", "footnote" },
-       { footnotebg, N_("footnote background"), "footnotebg", "grey60", "footnotebg" 
},
        { footnoteframe, N_("footnote frame"), "footnoteframe", "IndianRed", 
"footnoteframe" },
        { ert, N_("latex inset"), "ert", "DarkRed", "ert" },
-       { inset, N_("inset"), "inset", "black", "inset" },
        { insetbg, N_("inset background"), "insetbg", "grey60", "insetbg" },
        { insetframe, N_("inset frame"), "insetframe", "IndianRed", "insetframe" },
-       { error, N_("error"), "error", "Red", "error" },
+       { error, N_("LaTeX error"), "error", "Red", "error" },
        { eolmarker, N_("end-of-line marker"), "eolmarker", "Brown", "eolmarker" },
        { appendixline, N_("appendix line"), "appendixline", "Brown", "appendixline" 
},
        { vfillline, N_("vfill line"), "vfillline", "Brown", "vfillline" },
        { topline, N_("top/bottom line"), "topline", "Brown", "topline" },
-       { tableline, N_("table line"), "tableline", "black", "tableline" },
        { tabularline, N_("tabular line"), "tabularline", "black",
             "tabularline" },
-       { tabularonoffline, N_("tabularonoff line"), "tabularonoffline",
+       { tabularonoffline, N_("tabular on/off line"), "tabularonoffline",
             "LightSteelBlue", "tabularonoffline" },
        { bottomarea, N_("bottom area"), "bottomarea", "grey40", "bottomarea" },
        { pagebreak, N_("page break"), "pagebreak", "RoyalBlue", "pagebreak" },
Index: LColor.h
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/LColor.h,v
retrieving revision 1.14
diff -u -r1.14 LColor.h
--- LColor.h    2000/11/21 15:46:05     1.14
+++ LColor.h    2001/05/22 20:42:15
@@ -26,13 +26,21 @@
   It has one basic purposes:
   To serve as a color-namespace container (the Color enum).
   
-  A color can be one of the following kinds:
 
-  - A real, predefined color, such as black, white, red or green.
-  - A logical color, such as no color, inherit, math
-
   */
-class LColor //: public noncopyable {
+/**
+ * \class LColor
+ *
+ * A class holding color definitions and associated names for
+ * LaTeX, X11, the GUI, and LyX internally.
+ *
+ * A color can be one of the following kinds:
+ *
+ * - A real, predefined color, such as black, white, red or green.
+ * - A logical color, such as no color, inherit, math
+ */
+ 
+class LColor // : public boost::noncopyable {
 // made copyable for same reasons as LyXRC was made copyable. See there for
 // explanation.
 {
@@ -70,8 +78,6 @@
                selection,
                /// Text color in LaTeX mode
                latex,
-               /// Titles color of floats
-               floats,
 
                /// Text color for notes
                note,
@@ -93,16 +99,6 @@
                /// Frame color for command insets
                commandframe,
 
-               /// Text color for accents we can't handle nicely
-               accent,
-               ///
-               accentbg,
-               ///
-               accentframe,
-
-               /// Minipage line color
-               minipageline,
-
                /// Special chars text color
                special,
 
@@ -118,17 +114,15 @@
                mathline,
 
                /// Footnote marker text
+               // FIXME: this is seemingly mis-used all over the place
                footnote,
-               /// Footnote marker background color
-               footnotebg,
                /// Footnote line color
                footnoteframe,
 
                /// ERT marker text
+               // FIXME: is there any reason this is different from latex ?
                ert,
                
-               /// Text color for inset marker
-               inset,
                /// Inset marker background color
                insetbg,
                /// Inset marker frame color
@@ -145,8 +139,6 @@
                /// Top and bottom line color
                topline,
                /// Table line color
-               tableline,
-               /// Table line color
                tabularline,
                /// Table line color
                tabularonoffline,
@@ -155,6 +147,7 @@
                /// Page break color
                pagebreak,
 
+               // FIXME: why are the next four separate ??
                /// Color used for top of boxes
                top,
                /// Color used for bottom of boxes
@@ -176,52 +169,54 @@
 
        ///
        LColor();
-       ///
+       /// set the given LyX color to the color defined by the X11 name given
        void setColor(LColor::color col, string const & x11name);
-       ///
+       /// set the given LyX color to the color defined by the X11 name given
        bool setColor(string const & lyxname, string const & x11name);
+ 
        /// Get GUI name of color
        string const getGUIName(LColor::color c) const;
-
+ 
        /// Get X11 name of color
        string const getX11Name(LColor::color c) const;
-
+ 
        /// Get LaTeX name of color
        string const getLaTeXName(LColor::color c) const;
-
+ 
        /// Get LyX name of color
        string const getLyXName(LColor::color c) const;
-       ///
+ 
+       /// get the color from the GUI name
        LColor::color getFromGUIName(string const & guiname) const;
-       ///
+       /// get the color from the LyX name
        LColor::color getFromLyXName(string const & lyxname) const;
 private:
        ///
        struct information {
-               ///
+               /// the name as it appears in the GUI
                string guiname;
-               ///
+               /// the name used in LaTeX
                string latexname;
-               ///
+               /// the name for X11
                string x11name;
-               ///
+               /// the name for LyX
                string lyxname;
        };
 
-       ///
+       /// initialise a color entry
        void fill(LColor::color col, string const & gui,
                  string const & latex, string const & x11,
                  string const & lyx);
 
        ///
        typedef std::map<LColor::color, information> InfoTab;
-       ///
+       /// the table of color information
        InfoTab infotab;
 };
 
-///
+/// the current color definitions
 extern LColor lcolor;
-///
+/// the system color definitions
 extern LColor system_lcolor;
 
 #endif

Reply via email to