]> git.lyx.org Git - features.git/commitdiff
rename LColor into Color
authorAndré Pönitz <poenitz@gmx.net>
Thu, 26 Apr 2007 17:34:20 +0000 (17:34 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Thu, 26 Apr 2007 17:34:20 +0000 (17:34 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18046 a592a061-630c-0410-9148-cb99ea01b6c8

95 files changed:
src/BranchList.cpp
src/BranchList.h
src/BufferParams.cpp
src/Color.cpp [new file with mode: 0644]
src/Color.h [new file with mode: 0644]
src/LColor.cpp [deleted file]
src/LColor.h [deleted file]
src/LaTeXFeatures.cpp
src/LyX.cpp
src/LyXFont.cpp
src/LyXFont.h
src/LyXFunc.cpp
src/LyXRC.cpp
src/LyXText.h
src/Makefile.am
src/MetricsInfo.cpp
src/Paragraph.cpp
src/TextMetrics.cpp
src/bufferview_funcs.cpp
src/color.cpp
src/factory.cpp
src/frontends/Application.h
src/frontends/Painter.cpp
src/frontends/Painter.h
src/frontends/WorkArea.cpp
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlCharacter.cpp
src/frontends/controllers/ControlCharacter.h
src/frontends/controllers/ControlDocument.cpp
src/frontends/controllers/ControlPrefs.cpp
src/frontends/controllers/ControlPrefs.h
src/frontends/controllers/frontend_helpers.cpp
src/frontends/controllers/frontend_helpers.h
src/frontends/qt4/ChangeLog
src/frontends/qt4/ColorCache.cpp
src/frontends/qt4/ColorCache.h
src/frontends/qt4/GuiApplication.cpp
src/frontends/qt4/GuiApplication.h
src/frontends/qt4/GuiWorkArea.cpp
src/frontends/qt4/QCharacter.cpp
src/frontends/qt4/QLPainter.cpp
src/frontends/qt4/QLPainter.h
src/frontends/qt4/QPrefs.cpp
src/frontends/qt4/QPrefs.h
src/graphics/PreviewLoader.cpp
src/insets/InsetBase.cpp
src/insets/InsetBase.h
src/insets/InsetBox.cpp
src/insets/InsetBranch.cpp
src/insets/InsetCaption.cpp
src/insets/InsetCharStyle.cpp
src/insets/InsetCollapsable.cpp
src/insets/InsetERT.cpp
src/insets/InsetFloat.cpp
src/insets/InsetFootlike.cpp
src/insets/InsetLine.cpp
src/insets/InsetNewline.cpp
src/insets/InsetNote.cpp
src/insets/InsetOptArg.cpp
src/insets/InsetPagebreak.cpp
src/insets/InsetSpace.cpp
src/insets/InsetSpecialChar.cpp
src/insets/InsetTabular.cpp
src/insets/InsetText.cpp
src/insets/InsetText.h
src/insets/InsetTheorem.cpp
src/insets/InsetVSpace.cpp
src/insets/InsetWrap.cpp
src/insets/RenderButton.cpp
src/insets/RenderGraphic.cpp
src/insets/RenderPreview.cpp
src/mathed/InsetFormulaMacro.cpp
src/mathed/InsetMathBoxed.cpp
src/mathed/InsetMathBrace.cpp
src/mathed/InsetMathColor.cpp
src/mathed/InsetMathColor.h
src/mathed/InsetMathDFrac.cpp
src/mathed/InsetMathFBox.cpp
src/mathed/InsetMathFrac.cpp
src/mathed/InsetMathFrameBox.cpp
src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathPhantom.cpp
src/mathed/InsetMathRoot.cpp
src/mathed/InsetMathSpace.cpp
src/mathed/InsetMathSqrt.cpp
src/mathed/InsetMathTFrac.cpp
src/mathed/InsetMathXYArrow.cpp
src/mathed/MathData.cpp
src/mathed/MathMacroTemplate.cpp
src/mathed/MathSupport.cpp
src/rowpainter.cpp
src/text.cpp
src/text2.cpp

index 128d27c59051c5929c9b31df649cae9c10611f34..5c1a2076fa0c2074944fb373c8f68f383b40318d 100644 (file)
@@ -11,7 +11,7 @@
 #include <config.h>
 
 #include "BranchList.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/Application.h"
 
@@ -25,7 +25,7 @@ using std::string;
 
 Branch::Branch()
 {
-       theApp()->getRgbColor(LColor::background, color_);
+       theApp()->getRgbColor(Color::background, color_);
 }
 
 
@@ -74,7 +74,7 @@ void Branch::setColor(string const & c)
                color_ = RGBColor(c);
        else
                // no color set or invalid color - use normal background
-               theApp()->getRgbColor(LColor::background, color_);
+               theApp()->getRgbColor(Color::background, color_);
 }
 
 
index 3f2978acee0d96b31b245a54f57b6f5ef5a5f819..550887a85a0e01378a46eab10702f4b27c007296 100644 (file)
@@ -60,9 +60,9 @@ public:
        void setColor(RGBColor const &);
        /**
         * Set color from a string "#rrggbb".
-        * Use LColor:background if the string is no valid color.
+        * Use Color:background if the string is no valid color.
         * This ensures compatibility with LyX 1.4.0 that had the symbolic
-        * color "none" that was displayed as LColor:background.
+        * color "none" that was displayed as Color:background.
         */
        void setColor(std::string const &);
 
index a4c324ed7277c4853761b94a74e5b82d65080653..f9b037f35d969afd76ecda067c6450c5b4ab5a26 100644 (file)
@@ -25,7 +25,7 @@
 #include "gettext.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXFont.h"
 #include "Lexer.h"
 #include "LyXRC.h"
@@ -527,9 +527,9 @@ string const BufferParams::readToken(Lexer & lex, string const & token)
                                string color = lex.getString();
                                if (branch_ptr)
                                        branch_ptr->setColor(color);
-                               // Update also the LColor table:
+                               // Update also the Color table:
                                if (color == "none")
-                                       color = lcolor.getX11Name(LColor::background);
+                                       color = lcolor.getX11Name(Color::background);
                                // FIXME UNICODE
                                lcolor.setColor(to_utf8(branch), color);
 
diff --git a/src/Color.cpp b/src/Color.cpp
new file mode 100644 (file)
index 0000000..125321c
--- /dev/null
@@ -0,0 +1,291 @@
+/**
+ * \file Color.cpp
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Asger Alstrup
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ * \author Jean-Marc Lasgouttes
+ * \author John Levon
+ * \author André Pönitz
+ * \author Martin Vermeer
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#include <config.h>
+
+#include "debug.h"
+#include "gettext.h"
+#include "Color.h"
+#include "support/lstrings.h"
+
+#include <map>
+
+
+namespace lyx {
+
+using support::compare_ascii_no_case;
+using support::ascii_lowercase;
+
+using std::endl;
+using std::string;
+
+
+namespace {
+
+struct ColorEntry {
+       Color::color lcolor;
+       char const * guiname;
+       char const * latexname;
+       char const * x11name;
+       char const * lyxname;
+};
+
+}
+
+class Color::Pimpl {
+public:
+       ///
+       class information {
+       public:
+               /// 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(ColorEntry const & entry)
+       {
+               information in;
+               in.lyxname   = entry.lyxname;
+               in.latexname = entry.latexname;
+               in.x11name   = entry.x11name;
+               in.guiname   = entry.guiname;
+               infotab[entry.lcolor] = in;
+               lyxcolors[entry.lyxname] = entry.lcolor;
+               latexcolors[entry.latexname] = entry.lcolor;
+       }
+
+       ///
+       typedef std::map<Color::color, information> InfoTab;
+       /// the table of color information
+       InfoTab infotab;
+
+       typedef std::map<string, Color::color> Transform;
+       /// the transform between LyX color name string and integer code.
+       Transform lyxcolors;
+       /// the transform between LaTeX color name string and integer code.
+       Transform latexcolors;
+
+};
+
+
+Color::Color()
+       : pimpl_(new Pimpl)
+{
+       //  Color::color, gui, latex, x11, lyx
+       static ColorEntry const items[] = {
+       { none, N_("none"), "none", "black", "none" },
+       { black, N_("black"), "black", "black", "black" },
+       { white, N_("white"), "white", "white", "white" },
+       { red, N_("red"), "red", "red", "red" },
+       { green, N_("green"), "green", "green", "green" },
+       { blue, N_("blue"), "blue", "blue", "blue" },
+       { cyan, N_("cyan"), "cyan", "cyan", "cyan" },
+       { magenta, N_("magenta"), "magenta", "magenta", "magenta" },
+       { yellow, N_("yellow"), "yellow", "yellow", "yellow" },
+       { cursor, N_("cursor"), "cursor", "black", "cursor" },
+       { background, N_("background"), "background", "linen", "background" },
+       { foreground, N_("text"), "foreground", "black", "foreground" },
+       { selection, N_("selection"), "selection", "LightBlue", "selection" },
+       { latex, N_("LaTeX text"), "latex", "DarkRed", "latex" },
+       { preview, N_("previewed snippet"), "preview", "black", "preview" },
+       { note, N_("note"), "note", "blue", "note" },
+       { notebg, N_("note background"), "notebg", "yellow", "notebg" },
+       { comment, N_("comment"), "comment", "magenta", "comment" },
+       { commentbg, N_("comment background"), "commentbg", "linen", "commentbg" },
+       { greyedout, N_("greyedout inset"), "greyedout", "red", "greyedout" },
+       { greyedoutbg, N_("greyedout inset background"), "greyedoutbg", "linen", "greyedoutbg" },
+       { shadedbg, N_("shaded box"), "shaded", "#ff0000", "shaded" },
+       { 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", "azure", "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", "linen", "mathbg" },
+       { graphicsbg, N_("graphics background"), "graphicsbg", "linen", "graphicsbg" },
+       { mathmacrobg, N_("Math macro background"), "mathmacrobg", "linen", "mathmacrobg" },
+       { mathframe, N_("math frame"), "mathframe", "Magenta", "mathframe" },
+       { mathline, N_("math line"), "mathline", "Blue", "mathline" },
+       { captionframe, N_("caption frame"), "captionframe", "DarkRed", "captionframe" },
+       { collapsable, N_("collapsable inset text"), "collapsable", "DarkRed", "collapsable" },
+       { collapsableframe, N_("collapsable inset frame"), "collapsableframe", "IndianRed", "collapsableframe" },
+       { insetbg, N_("inset background"), "insetbg", "grey80", "insetbg" },
+       { insetframe, N_("inset frame"), "insetframe", "IndianRed", "insetframe" },
+       { error, N_("LaTeX error"), "error", "Red", "error" },
+       { eolmarker, N_("end-of-line marker"), "eolmarker", "Brown", "eolmarker" },
+       { appendix, N_("appendix marker"), "appendix", "Brown", "appendix" },
+       { changebar, N_("change bar"), "changebar", "Blue", "changebar" },
+       { strikeout, N_("Deleted text"), "strikeout", "Red", "strikeout" },
+       { newtext, N_("Added text"), "newtext", "Blue", "newtext" },
+       { added_space, N_("added space markers"), "added_space", "Brown", "added_space" },
+       { topline, N_("top/bottom line"), "topline", "Brown", "topline" },
+       { tabularline, N_("table line"), "tabularline", "black",
+            "tabularline" },
+       { tabularonoffline, N_("table on/off line"), "tabularonoffline",
+            "LightSteelBlue", "tabularonoffline" },
+       { bottomarea, N_("bottom area"), "bottomarea", "grey40", "bottomarea" },
+       { pagebreak, N_("page break"), "pagebreak", "RoyalBlue", "pagebreak" },
+       { buttonframe, N_("frame of button"), "buttonframe", "#dcd2c8", "buttonframe" },
+       { buttonbg, N_("button background"), "buttonbg", "#dcd2c8", "buttonbg" },
+       { buttonhoverbg, N_("button background under focus"), "buttonhoverbg", "#C7C7CA", "buttonhoverbg" },
+       { inherit, N_("inherit"), "inherit", "black", "inherit" },
+       { ignore, N_("ignore"), "ignore", "black", "ignore" },
+       { ignore, 0, 0, 0, 0 }
+       };
+
+       for (int i = 0; items[i].guiname; ++i)
+               pimpl_->fill(items[i]);
+}
+
+
+Color::Color(Color const & c)
+       : pimpl_(new Pimpl(*c.pimpl_))
+{}
+
+
+Color::~Color()
+{}
+
+
+Color & Color::operator=(Color tmp)
+{
+       boost::swap(pimpl_, tmp.pimpl_);
+       return *this;
+}
+
+
+docstring const Color::getGUIName(Color::color c) const
+{
+       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
+       if (it != pimpl_->infotab.end())
+               return _(it->second.guiname);
+       return from_ascii("none");
+}
+
+
+string const Color::getX11Name(Color::color c) const
+{
+       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
+       if (it != pimpl_->infotab.end())
+               return it->second.x11name;
+
+       lyxerr << "LyX internal error: Missing color"
+                 " entry in Color.cpp for " << c << '\n'
+              << "Using black." << endl;
+       return "black";
+}
+
+
+string const Color::getLaTeXName(Color::color c) const
+{
+       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
+       if (it != pimpl_->infotab.end())
+               return it->second.latexname;
+       return "black";
+}
+
+
+string const Color::getLyXName(Color::color c) const
+{
+       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
+       if (it != pimpl_->infotab.end())
+               return it->second.lyxname;
+       return "black";
+}
+
+
+bool Color::setColor(Color::color col, string const & x11name)
+{
+       Pimpl::InfoTab::iterator it = pimpl_->infotab.find(col);
+       if (it == pimpl_->infotab.end()) {
+               lyxerr << "Color " << col << " not found in database."
+                      << std::endl;
+               return false;
+       }
+
+       // "inherit" is returned for colors not in the database
+       // (and anyway should not be redefined)
+       if (col == none || col == inherit || col == ignore) {
+               lyxerr << "Color " << getLyXName(col)
+                      << " may not be redefined" << endl;
+               return false;
+       }
+
+       it->second.x11name = x11name;
+       return true;
+}
+
+
+bool Color::setColor(string const & lyxname, string const &x11name)
+{
+       string const lcname = ascii_lowercase(lyxname);
+       if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
+               LYXERR(Debug::GUI)
+                       << "Color::setColor: Unknown color \""
+                      << lyxname << '"' << endl;
+               addColor(static_cast<color>(pimpl_->infotab.size()), lcname);
+       }
+
+       return setColor(pimpl_->lyxcolors[lcname], x11name);
+}
+
+
+void Color::addColor(Color::color c, string const & lyxname) const
+{
+       ColorEntry ce = { c, "", "", "", lyxname.c_str() };
+       pimpl_->fill(ce);
+}
+
+
+Color::color Color::getFromLyXName(string const & lyxname) const
+{
+       string const lcname = ascii_lowercase(lyxname);
+       if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
+               lyxerr << "Color::getFromLyXName: Unknown color \""
+                      << lyxname << '"' << endl;
+               return none;
+       }
+
+       return pimpl_->lyxcolors[lcname];
+}
+
+
+Color::color Color::getFromLaTeXName(string const & latexname) const
+{
+       if (pimpl_->latexcolors.find(latexname) == pimpl_->latexcolors.end()) {
+               lyxerr << "Color::getFromLaTeXName: Unknown color \""
+                      << latexname << '"' << endl;
+               return none;
+       }
+
+       return pimpl_->latexcolors[latexname];
+}
+
+
+// The evil global Color instance
+Color lcolor;
+// An equally evil global system Color instance
+Color system_lcolor;
+
+
+} // namespace lyx
diff --git a/src/Color.h b/src/Color.h
new file mode 100644 (file)
index 0000000..c64ba16
--- /dev/null
@@ -0,0 +1,256 @@
+// -*- C++ -*-
+/**
+ * \file Color.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Asger Alstrup
+ * \author Lars Gullik Bjønnes
+ * \author Matthias Ettrich
+ * \author Jean-Marc Lasgouttes
+ * \author Angus Leeming
+ * \author John Levon
+ * \author André Pönitz
+ * \author Martin Vermeer
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
+#ifndef LCOLOR_H
+#define LCOLOR_H
+
+#include "support/docstring.h"
+
+#include <boost/scoped_ptr.hpp>
+
+
+namespace lyx {
+
+/**
+ * This is a stateless class.
+ *
+ * It has one basic purposes:
+ * To serve as a color-namespace container (the Color enum).
+ */
+/**
+ * \class Color
+ *
+ * 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 Color
+// made copyable for same reasons as LyXRC was made copyable. See there for
+// explanation.
+{
+public:
+       /// Names of colors, including all logical colors
+       enum color {
+               /// No particular color---clear or default
+               none,
+               /// The different text colors
+               black,
+               ///
+               white,
+               ///
+               red,
+               ///
+               green,
+               ///
+               blue,
+               ///
+               cyan,
+               ///
+               magenta,
+               ///
+               yellow,
+
+               // Needed interface colors
+
+               /// Cursor color
+               cursor,
+               /// Background color
+               background,
+               /// Foreground color
+               foreground,
+               /// Background color of selected text
+               selection,
+               /// Text color in LaTeX mode
+               latex,
+               /// The color used for previews
+               preview,
+
+               /// Text color for notes
+               note,
+               /// Background color of notes
+               notebg,
+               /// Text color for comments
+               comment,
+               /// Background color of comments
+               commentbg,
+               /// Text color for greyedout inset
+               greyedout,
+               /// Background color of greyedout inset
+               greyedoutbg,
+               /// Shaded box background
+               shadedbg,
+
+               /// Color for the depth bars in the margin
+               depthbar,
+               /// Color for marking foreign language words
+               language,
+
+               /// Text color for command insets
+               command,
+               /// Background color for command insets
+               commandbg,
+               /// Frame color for command insets
+               commandframe,
+
+               /// Special chars text color
+               special,
+
+               /// Graphics inset background color
+               graphicsbg,
+               /// Math inset text color
+               math,
+               /// Math inset background color
+               mathbg,
+               /// Macro math inset background color
+               mathmacrobg,
+               /// Math inset frame color
+               mathframe,
+               /// Math line color
+               mathline,
+
+               /// caption frame color
+               captionframe,
+
+               /// collapsable insets text
+               collapsable,
+               /// collapsable insets frame
+               collapsableframe,
+
+               /// Inset marker background color
+               insetbg,
+               /// Inset marker frame color
+               insetframe,
+
+               /// Error box text color
+               error,
+               /// EOL marker color
+               eolmarker,
+               /// Added space colour
+               added_space,
+               /// Appendix marker color
+               appendix,
+               /// changebar color
+               changebar,
+               /// strike-out color
+               strikeout,
+               /// added text color
+               newtext,
+               /// Top and bottom line color
+               topline,
+               /// Table line color
+               tabularline,
+               /// Table line color
+               tabularonoffline,
+               /// Bottom area color
+               bottomarea,
+               /// Page break color
+               pagebreak,
+
+               // FIXME: why are the next four separate ??
+               /// Color used for button frame
+               buttonframe,
+               /// Color used for bottom background
+               buttonbg,
+               /// Color used for buttom under focus
+               buttonhoverbg,
+
+               // Logical attributes
+
+               /// Color is inherited
+               inherit,
+               /// For ignoring updates of a color
+               ignore
+       };
+
+
+       ///
+       Color();
+       ///
+       Color(Color const &);
+       ///
+       ~Color();
+       ///
+       Color & operator=(Color);
+
+       /** set the given LyX color to the color defined by the X11 name given
+        *  \returns true if successful.
+        */
+       bool setColor(Color::color col, std::string const & x11name);
+
+       /** set the given LyX color to the color defined by the X11
+        *  name given \returns true if successful. A new color entry
+        *  is created if the color is unknown
+        */
+       bool setColor(std::string const & lyxname, std::string const & x11name);
+
+       /// Get the GUI name of \c color.
+       docstring const getGUIName(Color::color c) const;
+
+       /// Get the X11 name of \c color.
+       std::string const getX11Name(Color::color c) const;
+
+       /// Get the LaTeX name of \c color.
+       std::string const getLaTeXName(Color::color c) const;
+
+       /// Get the LyX name of \c color.
+       std::string const getLyXName(Color::color c) const;
+
+       /// \returns the Color::color associated with the LyX name.
+       Color::color getFromLyXName(std::string const & lyxname) const;
+       /// \returns the Color::color associated with the LaTeX name.
+       Color::color getFromLaTeXName(std::string const & latexname) const;
+private:
+       ///
+       void addColor(Color::color c, std::string const & lyxname) const;
+       ///
+       class Pimpl;
+       ///
+       boost::scoped_ptr<Pimpl> pimpl_;
+};
+
+
+/** \c Color_color is a wrapper for Color::color. It can be forward-declared and
+ *  passed as a function argument without having to expose Color.h.
+ */
+class Color_color {
+       Color::color val_;
+public:
+       /** The default constructor is nasty,
+        *  but allows us to use Color_color in STL containers.
+        */
+       Color_color() : val_(static_cast<Color::color>(-1)) {}
+
+       Color_color(Color::color val) : val_(val) {}
+       operator Color::color() const{ return val_; }
+};
+
+
+/// the current color definitions
+extern Color lcolor;
+/// the system color definitions
+extern Color system_lcolor;
+
+
+} // namespace lyx
+
+#endif
diff --git a/src/LColor.cpp b/src/LColor.cpp
deleted file mode 100644 (file)
index 9af35b0..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-/**
- * \file LColor.cpp
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Asger Alstrup
- * \author Lars Gullik Bjønnes
- * \author Matthias Ettrich
- * \author Jean-Marc Lasgouttes
- * \author John Levon
- * \author André Pönitz
- * \author Martin Vermeer
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#include <config.h>
-
-#include "debug.h"
-#include "gettext.h"
-#include "LColor.h"
-#include "support/lstrings.h"
-
-#include <map>
-
-
-namespace lyx {
-
-using support::compare_ascii_no_case;
-using support::ascii_lowercase;
-
-using std::endl;
-using std::string;
-
-
-namespace {
-
-struct ColorEntry {
-       LColor::color lcolor;
-       char const * guiname;
-       char const * latexname;
-       char const * x11name;
-       char const * lyxname;
-};
-
-}
-
-class LColor::Pimpl {
-public:
-       ///
-       class information {
-       public:
-               /// 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(ColorEntry const & entry)
-       {
-               information in;
-               in.lyxname   = entry.lyxname;
-               in.latexname = entry.latexname;
-               in.x11name   = entry.x11name;
-               in.guiname   = entry.guiname;
-               infotab[entry.lcolor] = in;
-               lyxcolors[entry.lyxname] = entry.lcolor;
-               latexcolors[entry.latexname] = entry.lcolor;
-       }
-
-       ///
-       typedef std::map<LColor::color, information> InfoTab;
-       /// the table of color information
-       InfoTab infotab;
-
-       typedef std::map<string, LColor::color> Transform;
-       /// the transform between LyX color name string and integer code.
-       Transform lyxcolors;
-       /// the transform between LaTeX color name string and integer code.
-       Transform latexcolors;
-
-};
-
-
-LColor::LColor()
-       : pimpl_(new Pimpl)
-{
-       //  LColor::color, gui, latex, x11, lyx
-       static ColorEntry const items[] = {
-       { none, N_("none"), "none", "black", "none" },
-       { black, N_("black"), "black", "black", "black" },
-       { white, N_("white"), "white", "white", "white" },
-       { red, N_("red"), "red", "red", "red" },
-       { green, N_("green"), "green", "green", "green" },
-       { blue, N_("blue"), "blue", "blue", "blue" },
-       { cyan, N_("cyan"), "cyan", "cyan", "cyan" },
-       { magenta, N_("magenta"), "magenta", "magenta", "magenta" },
-       { yellow, N_("yellow"), "yellow", "yellow", "yellow" },
-       { cursor, N_("cursor"), "cursor", "black", "cursor" },
-       { background, N_("background"), "background", "linen", "background" },
-       { foreground, N_("text"), "foreground", "black", "foreground" },
-       { selection, N_("selection"), "selection", "LightBlue", "selection" },
-       { latex, N_("LaTeX text"), "latex", "DarkRed", "latex" },
-       { preview, N_("previewed snippet"), "preview", "black", "preview" },
-       { note, N_("note"), "note", "blue", "note" },
-       { notebg, N_("note background"), "notebg", "yellow", "notebg" },
-       { comment, N_("comment"), "comment", "magenta", "comment" },
-       { commentbg, N_("comment background"), "commentbg", "linen", "commentbg" },
-       { greyedout, N_("greyedout inset"), "greyedout", "red", "greyedout" },
-       { greyedoutbg, N_("greyedout inset background"), "greyedoutbg", "linen", "greyedoutbg" },
-       { shadedbg, N_("shaded box"), "shaded", "#ff0000", "shaded" },
-       { 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", "azure", "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", "linen", "mathbg" },
-       { graphicsbg, N_("graphics background"), "graphicsbg", "linen", "graphicsbg" },
-       { mathmacrobg, N_("Math macro background"), "mathmacrobg", "linen", "mathmacrobg" },
-       { mathframe, N_("math frame"), "mathframe", "Magenta", "mathframe" },
-       { mathline, N_("math line"), "mathline", "Blue", "mathline" },
-       { captionframe, N_("caption frame"), "captionframe", "DarkRed", "captionframe" },
-       { collapsable, N_("collapsable inset text"), "collapsable", "DarkRed", "collapsable" },
-       { collapsableframe, N_("collapsable inset frame"), "collapsableframe", "IndianRed", "collapsableframe" },
-       { insetbg, N_("inset background"), "insetbg", "grey80", "insetbg" },
-       { insetframe, N_("inset frame"), "insetframe", "IndianRed", "insetframe" },
-       { error, N_("LaTeX error"), "error", "Red", "error" },
-       { eolmarker, N_("end-of-line marker"), "eolmarker", "Brown", "eolmarker" },
-       { appendix, N_("appendix marker"), "appendix", "Brown", "appendix" },
-       { changebar, N_("change bar"), "changebar", "Blue", "changebar" },
-       { strikeout, N_("Deleted text"), "strikeout", "Red", "strikeout" },
-       { newtext, N_("Added text"), "newtext", "Blue", "newtext" },
-       { added_space, N_("added space markers"), "added_space", "Brown", "added_space" },
-       { topline, N_("top/bottom line"), "topline", "Brown", "topline" },
-       { tabularline, N_("table line"), "tabularline", "black",
-            "tabularline" },
-       { tabularonoffline, N_("table on/off line"), "tabularonoffline",
-            "LightSteelBlue", "tabularonoffline" },
-       { bottomarea, N_("bottom area"), "bottomarea", "grey40", "bottomarea" },
-       { pagebreak, N_("page break"), "pagebreak", "RoyalBlue", "pagebreak" },
-       { buttonframe, N_("frame of button"), "buttonframe", "#dcd2c8", "buttonframe" },
-       { buttonbg, N_("button background"), "buttonbg", "#dcd2c8", "buttonbg" },
-       { buttonhoverbg, N_("button background under focus"), "buttonhoverbg", "#C7C7CA", "buttonhoverbg" },
-       { inherit, N_("inherit"), "inherit", "black", "inherit" },
-       { ignore, N_("ignore"), "ignore", "black", "ignore" },
-       { ignore, 0, 0, 0, 0 }
-       };
-
-       for (int i = 0; items[i].guiname; ++i)
-               pimpl_->fill(items[i]);
-}
-
-
-LColor::LColor(LColor const & c)
-       : pimpl_(new Pimpl(*c.pimpl_))
-{}
-
-
-LColor::~LColor()
-{}
-
-
-LColor & LColor::operator=(LColor tmp)
-{
-       boost::swap(pimpl_, tmp.pimpl_);
-       return *this;
-}
-
-
-docstring const LColor::getGUIName(LColor::color c) const
-{
-       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
-       if (it != pimpl_->infotab.end())
-               return _(it->second.guiname);
-       return from_ascii("none");
-}
-
-
-string const LColor::getX11Name(LColor::color c) const
-{
-       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
-       if (it != pimpl_->infotab.end())
-               return it->second.x11name;
-
-       lyxerr << "LyX internal error: Missing color"
-                 " entry in LColor.cpp for " << c << '\n'
-              << "Using black." << endl;
-       return "black";
-}
-
-
-string const LColor::getLaTeXName(LColor::color c) const
-{
-       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
-       if (it != pimpl_->infotab.end())
-               return it->second.latexname;
-       return "black";
-}
-
-
-string const LColor::getLyXName(LColor::color c) const
-{
-       Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
-       if (it != pimpl_->infotab.end())
-               return it->second.lyxname;
-       return "black";
-}
-
-
-bool LColor::setColor(LColor::color col, string const & x11name)
-{
-       Pimpl::InfoTab::iterator it = pimpl_->infotab.find(col);
-       if (it == pimpl_->infotab.end()) {
-               lyxerr << "Color " << col << " not found in database."
-                      << std::endl;
-               return false;
-       }
-
-       // "inherit" is returned for colors not in the database
-       // (and anyway should not be redefined)
-       if (col == none || col == inherit || col == ignore) {
-               lyxerr << "Color " << getLyXName(col)
-                      << " may not be redefined" << endl;
-               return false;
-       }
-
-       it->second.x11name = x11name;
-       return true;
-}
-
-
-bool LColor::setColor(string const & lyxname, string const &x11name)
-{
-       string const lcname = ascii_lowercase(lyxname);
-       if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
-               LYXERR(Debug::GUI)
-                       << "LColor::setColor: Unknown color \""
-                      << lyxname << '"' << endl;
-               addColor(static_cast<color>(pimpl_->infotab.size()), lcname);
-       }
-
-       return setColor(pimpl_->lyxcolors[lcname], x11name);
-}
-
-
-void LColor::addColor(LColor::color c, string const & lyxname) const
-{
-       ColorEntry ce = { c, "", "", "", lyxname.c_str() };
-       pimpl_->fill(ce);
-}
-
-
-LColor::color LColor::getFromLyXName(string const & lyxname) const
-{
-       string const lcname = ascii_lowercase(lyxname);
-       if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
-               lyxerr << "LColor::getFromLyXName: Unknown color \""
-                      << lyxname << '"' << endl;
-               return none;
-       }
-
-       return pimpl_->lyxcolors[lcname];
-}
-
-
-LColor::color LColor::getFromLaTeXName(string const & latexname) const
-{
-       if (pimpl_->latexcolors.find(latexname) == pimpl_->latexcolors.end()) {
-               lyxerr << "LColor::getFromLaTeXName: Unknown color \""
-                      << latexname << '"' << endl;
-               return none;
-       }
-
-       return pimpl_->latexcolors[latexname];
-}
-
-
-// The evil global LColor instance
-LColor lcolor;
-// An equally evil global system LColor instance
-LColor system_lcolor;
-
-
-} // namespace lyx
diff --git a/src/LColor.h b/src/LColor.h
deleted file mode 100644 (file)
index d7ca132..0000000
+++ /dev/null
@@ -1,256 +0,0 @@
-// -*- C++ -*-
-/**
- * \file LColor.h
- * This file is part of LyX, the document processor.
- * Licence details can be found in the file COPYING.
- *
- * \author Asger Alstrup
- * \author Lars Gullik Bjønnes
- * \author Matthias Ettrich
- * \author Jean-Marc Lasgouttes
- * \author Angus Leeming
- * \author John Levon
- * \author André Pönitz
- * \author Martin Vermeer
- *
- * Full author contact details are available in file CREDITS.
- */
-
-#ifndef LCOLOR_H
-#define LCOLOR_H
-
-#include "support/docstring.h"
-
-#include <boost/scoped_ptr.hpp>
-
-
-namespace lyx {
-
-/**
- * This is a stateless class.
- *
- * It has one basic purposes:
- * To serve as a color-namespace container (the Color enum).
- */
-/**
- * \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
-// made copyable for same reasons as LyXRC was made copyable. See there for
-// explanation.
-{
-public:
-       /// Names of colors, including all logical colors
-       enum color {
-               /// No particular color---clear or default
-               none,
-               /// The different text colors
-               black,
-               ///
-               white,
-               ///
-               red,
-               ///
-               green,
-               ///
-               blue,
-               ///
-               cyan,
-               ///
-               magenta,
-               ///
-               yellow,
-
-               // Needed interface colors
-
-               /// Cursor color
-               cursor,
-               /// Background color
-               background,
-               /// Foreground color
-               foreground,
-               /// Background color of selected text
-               selection,
-               /// Text color in LaTeX mode
-               latex,
-               /// The color used for previews
-               preview,
-
-               /// Text color for notes
-               note,
-               /// Background color of notes
-               notebg,
-               /// Text color for comments
-               comment,
-               /// Background color of comments
-               commentbg,
-               /// Text color for greyedout inset
-               greyedout,
-               /// Background color of greyedout inset
-               greyedoutbg,
-               /// Shaded box background
-               shadedbg,
-
-               /// Color for the depth bars in the margin
-               depthbar,
-               /// Color for marking foreign language words
-               language,
-
-               /// Text color for command insets
-               command,
-               /// Background color for command insets
-               commandbg,
-               /// Frame color for command insets
-               commandframe,
-
-               /// Special chars text color
-               special,
-
-               /// Graphics inset background color
-               graphicsbg,
-               /// Math inset text color
-               math,
-               /// Math inset background color
-               mathbg,
-               /// Macro math inset background color
-               mathmacrobg,
-               /// Math inset frame color
-               mathframe,
-               /// Math line color
-               mathline,
-
-               /// caption frame color
-               captionframe,
-
-               /// collapsable insets text
-               collapsable,
-               /// collapsable insets frame
-               collapsableframe,
-
-               /// Inset marker background color
-               insetbg,
-               /// Inset marker frame color
-               insetframe,
-
-               /// Error box text color
-               error,
-               /// EOL marker color
-               eolmarker,
-               /// Added space colour
-               added_space,
-               /// Appendix marker color
-               appendix,
-               /// changebar color
-               changebar,
-               /// strike-out color
-               strikeout,
-               /// added text color
-               newtext,
-               /// Top and bottom line color
-               topline,
-               /// Table line color
-               tabularline,
-               /// Table line color
-               tabularonoffline,
-               /// Bottom area color
-               bottomarea,
-               /// Page break color
-               pagebreak,
-
-               // FIXME: why are the next four separate ??
-               /// Color used for button frame
-               buttonframe,
-               /// Color used for bottom background
-               buttonbg,
-               /// Color used for buttom under focus
-               buttonhoverbg,
-
-               // Logical attributes
-
-               /// Color is inherited
-               inherit,
-               /// For ignoring updates of a color
-               ignore
-       };
-
-
-       ///
-       LColor();
-       ///
-       LColor(LColor const &);
-       ///
-       ~LColor();
-       ///
-       LColor & operator=(LColor);
-
-       /** set the given LyX color to the color defined by the X11 name given
-        *  \returns true if successful.
-        */
-       bool setColor(LColor::color col, std::string const & x11name);
-
-       /** set the given LyX color to the color defined by the X11
-        *  name given \returns true if successful. A new color entry
-        *  is created if the color is unknown
-        */
-       bool setColor(std::string const & lyxname, std::string const & x11name);
-
-       /// Get the GUI name of \c color.
-       docstring const getGUIName(LColor::color c) const;
-
-       /// Get the X11 name of \c color.
-       std::string const getX11Name(LColor::color c) const;
-
-       /// Get the LaTeX name of \c color.
-       std::string const getLaTeXName(LColor::color c) const;
-
-       /// Get the LyX name of \c color.
-       std::string const getLyXName(LColor::color c) const;
-
-       /// \returns the LColor::color associated with the LyX name.
-       LColor::color getFromLyXName(std::string const & lyxname) const;
-       /// \returns the LColor::color associated with the LaTeX name.
-       LColor::color getFromLaTeXName(std::string const & latexname) const;
-private:
-       ///
-       void addColor(LColor::color c, std::string const & lyxname) const;
-       ///
-       class Pimpl;
-       ///
-       boost::scoped_ptr<Pimpl> pimpl_;
-};
-
-
-/** \c LColor_color is a wrapper for LColor::color. It can be forward-declared and
- *  passed as a function argument without having to expose LColor.h.
- */
-class LColor_color {
-       LColor::color val_;
-public:
-       /** The default constructor is nasty,
-        *  but allows us to use LColor_color in STL containers.
-        */
-       LColor_color() : val_(static_cast<LColor::color>(-1)) {}
-
-       LColor_color(LColor::color val) : val_(val) {}
-       operator LColor::color() const{ return val_; }
-};
-
-
-/// the current color definitions
-extern LColor lcolor;
-/// the system color definitions
-extern LColor system_lcolor;
-
-
-} // namespace lyx
-
-#endif
index 5daf5d6a2a9dab3a1cd9fd053e774bbe8bed5d16..5dc426eecc1c7faefc5b542a63bfa7f783878989 100644 (file)
@@ -22,7 +22,7 @@
 #include "Encoding.h"
 #include "Floating.h"
 #include "FloatList.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Language.h"
 #include "Lexer.h"
 #include "lyx_sty.h"
@@ -328,7 +328,7 @@ string const LaTeXFeatures::getPackages() const
        }
        // shadecolor for shaded
        if (mustProvide("framed")) {
-               RGBColor c = RGBColor(lcolor.getX11Name(LColor::shadedbg));
+               RGBColor c = RGBColor(lcolor.getX11Name(Color::shadedbg));
                packages << "\\definecolor{shadecolor}{rgb}{" 
                        << c.r/255 << ',' << c.g/255 << ',' << c.b/255 << "}\n";
        }
index 4e486c9d67da415df31143516c44ebec66898c56..233fe40a018e96e5ee653ac9285aa85021a7935c 100644 (file)
@@ -30,7 +30,7 @@
 #include "kb_keymap.h"
 #include "Language.h"
 #include "Session.h"
-#include "LColor.h"
+#include "Color.h"
 #include "lyx_cb.h"
 #include "LyXAction.h"
 #include "LyXFunc.h"
index dd8dbb4d78235d7ee0a2f12f6d11669a4f15687f..58cff9cbebb87f49e03c13e49c86a6873122e97e 100644 (file)
@@ -20,7 +20,7 @@
 #include "debug.h"
 #include "gettext.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "LyXRC.h"
 
@@ -116,7 +116,7 @@ LyXFont::FontBits LyXFont::sane = {
        MEDIUM_SERIES,
        UP_SHAPE,
        SIZE_NORMAL,
-       LColor::none,
+       Color::none,
        OFF,
        OFF,
        OFF,
@@ -128,7 +128,7 @@ LyXFont::FontBits LyXFont::inherit = {
        INHERIT_SERIES,
        INHERIT_SHAPE,
        INHERIT_SIZE,
-       LColor::inherit,
+       Color::inherit,
        INHERIT,
        INHERIT,
        INHERIT,
@@ -140,7 +140,7 @@ LyXFont::FontBits LyXFont::ignore = {
        IGNORE_SERIES,
        IGNORE_SHAPE,
        IGNORE_SIZE,
-       LColor::ignore,
+       Color::ignore,
        IGNORE,
        IGNORE,
        IGNORE,
@@ -198,9 +198,9 @@ LyXFont::LyXFont(LyXFont::FONT_INIT3, Language const * l)
 
 
 
-LColor_color LyXFont::color() const
+Color_color LyXFont::color() const
 {
-       return LColor::color(bits.color);
+       return Color::color(bits.color);
 }
 
 
@@ -259,7 +259,7 @@ void LyXFont::setNoun(LyXFont::FONT_MISC_STATE n)
 }
 
 
-void LyXFont::setColor(LColor_color c)
+void LyXFont::setColor(Color_color c)
 {
        bits.color = int(c);
 }
@@ -417,8 +417,8 @@ void LyXFont::update(LyXFont const & newfont,
                setLanguage(newfont.language());
 
        if (newfont.color() == color() && toggleall)
-               setColor(LColor::inherit); // toggle 'back'
-       else if (newfont.color() != LColor::ignore)
+               setColor(Color::inherit); // toggle 'back'
+       else if (newfont.color() != Color::ignore)
                setColor(newfont.color());
 }
 
@@ -441,7 +441,7 @@ void LyXFont::reduce(LyXFont const & tmplt)
        if (noun() == tmplt.noun())
                setNoun(INHERIT);
        if (color() == tmplt.color())
-               setColor(LColor::inherit);
+               setColor(Color::inherit);
 }
 
 
@@ -474,7 +474,7 @@ LyXFont & LyXFont::realize(LyXFont const & tmplt)
        if (bits.noun == INHERIT)
                bits.noun = tmplt.bits.noun;
 
-       if (bits.color == LColor::inherit)
+       if (bits.color == Color::inherit)
                bits.color = tmplt.bits.color;
 
        return *this;
@@ -488,7 +488,7 @@ bool LyXFont::resolved() const
                shape() != INHERIT_SHAPE && size() != INHERIT_SIZE &&
                emph() != INHERIT && underbar() != INHERIT &&
                noun() != INHERIT &&
-               color() != LColor::inherit);
+               color() != Color::inherit);
 }
 
 
@@ -503,7 +503,7 @@ docstring const LyXFont::stateText(BufferParams * params) const
                os << _(GUIShapeNames[shape()]) << ", ";
        if (size() != INHERIT_SIZE)
                os << _(GUISizeNames[size()]) << ", ";
-       if (color() != LColor::inherit)
+       if (color() != Color::inherit)
                os << lcolor.getGUIName(color()) << ", ";
        if (emph() != INHERIT)
                os << bformat(_("Emphasis %1$s, "),
@@ -791,7 +791,7 @@ int LyXFont::latexWriteStartChanges(odocstream & os, LyXFont const & base,
                count += strlen(LaTeXShapeNames[f.shape()]) + 2;
                env = true; //We have opened a new environment
        }
-       if (f.color() != LColor::inherit && f.color() != LColor::ignore) {
+       if (f.color() != Color::inherit && f.color() != Color::ignore) {
                os << "\\textcolor{"
                   << from_ascii(lcolor.getLaTeXName(f.color()))
                   << "}{";
@@ -859,7 +859,7 @@ int LyXFont::latexWriteEndChanges(odocstream & os, LyXFont const & base,
                ++count;
                env = true; // Size change need not bother about closing env.
        }
-       if (f.color() != LColor::inherit && f.color() != LColor::ignore) {
+       if (f.color() != Color::inherit && f.color() != Color::ignore) {
                os << '}';
                ++count;
                env = true; // Size change need not bother about closing env.
@@ -902,10 +902,10 @@ int LyXFont::latexWriteEndChanges(odocstream & os, LyXFont const & base,
 }
 
 
-LColor_color LyXFont::realColor() const
+Color_color LyXFont::realColor() const
 {
-       if (color() == LColor::none)
-               return LColor::foreground;
+       if (color() == Color::none)
+               return Color::foreground;
        return color();
 }
 
index 0ee54cf853620e66addf5fe241a98f88f1e8d398..af9eed5a7c5d459639ca682df92c80d79f7c6f2e 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef LYXFONT_H
 #define LYXFONT_H
 
-#include "LColor.h"
+#include "Color.h"
 #include "support/docstream.h"
 
 
@@ -170,7 +170,7 @@ public:
                FONT_SHAPE shape;
                ///
                FONT_SIZE size;
-               /** We store the LColor::color value as an int to get LColor.h out
+               /** We store the Color::color value as an int to get Color.h out
                 *  of the header file.
                 */
                int color;
@@ -223,7 +223,7 @@ public:
        ///
        FONT_MISC_STATE number() const { return bits.number; }
        ///
-       LColor_color color() const;
+       Color_color color() const;
        ///
        Language const * language() const { return lang; }
        ///
@@ -242,7 +242,7 @@ public:
        void setUnderbar(LyXFont::FONT_MISC_STATE u);
        void setNoun(LyXFont::FONT_MISC_STATE n);
        void setNumber(LyXFont::FONT_MISC_STATE n);
-       void setColor(LColor_color c);
+       void setColor(Color_color c);
        void setLanguage(Language const * l);
 
        /// Set family after LyX text format
@@ -314,7 +314,7 @@ public:
        docstring const stateText(BufferParams * params) const;
 
        ///
-       LColor_color realColor() const;
+       Color_color realColor() const;
 
        ///
        friend
index c0386a2504077b73ff1e81e05f69a4f075329f93..db3f8e2fc018279d5f71781c13135d0421f29c23 100644 (file)
@@ -44,7 +44,7 @@
 #include "Intl.h"
 #include "kb_keymap.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Session.h"
 #include "LyX.h"
 #include "lyx_cb.h"
@@ -1489,8 +1489,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
                        }
 
                        bool const graphicsbg_changed =
-                               (lyx_name == lcolor.getLyXName(LColor::graphicsbg) &&
-                                x11_name != lcolor.getX11Name(LColor::graphicsbg));
+                               (lyx_name == lcolor.getLyXName(Color::graphicsbg) &&
+                                x11_name != lcolor.getX11Name(Color::graphicsbg));
 
                        if (!lcolor.setColor(lyx_name, x11_name)) {
                                setErrorMessage(
index 307fd3f7d8828c7b1c0f43ee0387fa41bf7ac26d..292d126d60d9c298377581864bd4f091a5214103 100644 (file)
@@ -26,7 +26,7 @@
 #include "Format.h"
 #include "gettext.h"
 #include "Session.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "LyXFont.h"
 #include "Mover.h"
@@ -812,11 +812,11 @@ int LyXRC::read(Lexer & lexrc)
                                break;
                        }
 
-                       LColor::color const col =
+                       Color::color const col =
                                lcolor.getFromLyXName(lyx_name);
-                       if (col == LColor::none ||
-                           col == LColor::inherit ||
-                           col == LColor::ignore)
+                       if (col == Color::none ||
+                           col == Color::inherit ||
+                           col == Color::ignore)
                                break;
 
                        if (!lcolor.setColor(col, x11_name)) {
@@ -1586,8 +1586,8 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
                   << "#\n\n";
 
        case RC_SET_COLOR:
-               for (int i = 0; i < LColor::ignore; ++i) {
-                       LColor::color lc = static_cast<LColor::color>(i);
+               for (int i = 0; i < Color::ignore; ++i) {
+                       Color::color lc = static_cast<Color::color>(i);
 
                        string const col(lcolor.getX11Name(lc));
                        if (ignore_system_lyxrc ||
index 9b861bc9f5fcf3ca4b649825a997b7f0e14c6d42..aeb8ed6a92391c5ddf61fd266426576a7ae63fcf 100644 (file)
@@ -35,7 +35,7 @@ class ErrorList;
 class FuncRequest;
 class FuncStatus;
 class InsetBase;
-class LColor_color;
+class Color_color;
 class Cursor;
 class PainterInfo;
 class Row;
@@ -296,7 +296,7 @@ public:
                LyXFont const & Font) const;
 
        /// return the color of the canvas
-       LColor_color backgroundColor() const;
+       Color_color backgroundColor() const;
 
        /**
         * Returns the left beginning of the text.
index 016a3de6c1815a150e2d4d41025933ce86ffa1f5..9751daab0631e96bfa850a4fcb9e057f8e32cdb7 100644 (file)
@@ -88,8 +88,8 @@ lyx_SOURCES = \
        FuncStatus.h \
        InsetList.cpp \
        InsetList.h \
-       LColor.cpp \
-       LColor.h \
+       Color.cpp \
+       Color.h \
        LaTeX.cpp \
        LaTeX.h \
        LaTeXFeatures.cpp \
index 679dd91904dc209bdc9d5638e931173e39edf729..aa02dee9a6b4d6226911396b38bc59324a3f607e 100644 (file)
@@ -11,7 +11,7 @@
 #include <config.h>
 
 #include "BufferView.h"
-#include "LColor.h"
+#include "Color.h"
 #include "MetricsInfo.h"
 
 #include "mathed/MathSupport.h"
index 4c16a4fdb16880a0360545ae0ae6e84548d10512..d661e6ea0ca747c2a86c69b72ac2b64d321842dd 100644 (file)
@@ -27,7 +27,7 @@
 #include "gettext.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXLength.h"
 #include "LyXFont.h"
 #include "LyXRC.h"
@@ -969,13 +969,13 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
                                             << endl;
                }
                switch (fcit->font().color()) {
-               case LColor::none:
-               case LColor::inherit:
-               case LColor::ignore:
+               case Color::none:
+               case Color::inherit:
+               case Color::ignore:
                        // probably we should put here all interface colors used for
                        // font displaying! For now I just add this ones I know of (Jug)
-               case LColor::latex:
-               case LColor::note:
+               case Color::latex:
+               case Color::note:
                        break;
                default:
                        features.require("color");
index 97f7fbab88ed7d227ed0f5c8393f38ce764185ff..6720555da333ca207f5502bfb44a587876dc0ca1 100644 (file)
@@ -28,7 +28,7 @@
 #include "debug.h"
 #include "FuncRequest.h"
 #include "FontIterator.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXLength.h"
 #include "LyXRC.h"
 #include "LyXText.h"
index 2dda2498e4da73079cf974ad6046acc4a3bbcc24..86a1f17b974b791791b63343a9c5e145a7504454 100644 (file)
@@ -24,7 +24,7 @@
 #include "CoordCache.h"
 #include "gettext.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "Row.h"
 #include "Paragraph.h"
@@ -130,7 +130,7 @@ bool string2font(string const & data, LyXFont & font, bool & toggle)
 
                } else if (token == "color") {
                        int const next = lex.getInteger();
-                       font.setColor(LColor::color(next));
+                       font.setColor(Color::color(next));
 
                } else if (token == "language") {
                        string const next = lex.getString();
index 125de64fad3158434760aecd3a38bc3dc356551a..1722b8b5b15ae82b33639132402effdecdd54137 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "color.h"
 
-#include "LColor.h"
+#include "Color.h"
 
 #include <cmath>
 #include <sstream>
index 242a4fd2fac3c8c039d1e823200fac4e95dc5dc8..333739943123eecae1b66d046101d5f55d37a036 100644 (file)
@@ -18,7 +18,7 @@
 #include "debug.h"
 #include "FloatList.h"
 #include "FuncRequest.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "LyX.h"
 #include "Paragraph.h"
@@ -211,7 +211,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
                        auto_ptr<InsetCaption> inset(new InsetCaption(params));
                        inset->setAutoBreakRows(true);
                        inset->setDrawFrame(true);
-                       inset->setFrameColor(LColor::captionframe);
+                       inset->setFrameColor(Color::captionframe);
                        return inset.release();
                }
 
index 779542f34f64c9321ed420051acef91e43800921..f64ee45fc4ba74869b85d5334ff854c0d56495cb 100644 (file)
@@ -19,7 +19,7 @@ namespace lyx {
 
 class BufferView;
 class LyXView;
-class LColor_color;
+class Color_color;
 struct RGBColor;
 
 namespace frontend {
@@ -145,17 +145,17 @@ public:
        * The function returns true if successful.
        * It returns false on failure and sets r, g, b to 0.
        */
-       virtual bool getRgbColor(LColor_color col, RGBColor & rgbcol) = 0;
+       virtual bool getRgbColor(Color_color col, RGBColor & rgbcol) = 0;
 
-       /** Eg, passing LColor::black returns "000000",
-       *      passing LColor::white returns "ffffff".
+       /** Eg, passing Color::black returns "000000",
+       *      passing Color::white returns "ffffff".
        */
-       virtual std::string const hexName(LColor_color col) = 0;
+       virtual std::string const hexName(Color_color col) = 0;
 
        /**
        * update an altered GUI color
        */
-       virtual void updateColor(LColor_color col) = 0;
+       virtual void updateColor(Color_color col) = 0;
 
        /**
        * add a callback for socket read notification
index 772eada114e7f94838cea32ff4cf1a78eaad0eb9..06f46e2d3e5e5ce27557c19ca4796a16ec661937 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "frontends/FontMetrics.h"
 
-#include "LColor.h"
+#include "Color.h"
 #include "LyXFont.h"
 
 using lyx::docstring;
@@ -29,27 +29,27 @@ namespace frontend {
 void Painter::button(int x, int y, int w, int h, bool mouseHover)
 {
        if (mouseHover)
-               fillRectangle(x, y, w, h, LColor::buttonhoverbg);
+               fillRectangle(x, y, w, h, Color::buttonhoverbg);
        else
-               fillRectangle(x, y, w, h, LColor::buttonbg);
+               fillRectangle(x, y, w, h, Color::buttonbg);
        buttonFrame(x, y, w, h);
 }
 
 
 void Painter::buttonFrame(int x, int y, int w, int h)
 {
-       line(x, y, x, y + h - 1, LColor::buttonframe);
-       line(x - 1 + w, y, x - 1 + w, y + h - 1, LColor::buttonframe);
-       line(x, y - 1, x - 1 + w, y - 1, LColor::buttonframe);
-       line(x, y + h - 1, x - 1 + w, y + h - 1, LColor::buttonframe);
+       line(x, y, x, y + h - 1, Color::buttonframe);
+       line(x - 1 + w, y, x - 1 + w, y + h - 1, Color::buttonframe);
+       line(x, y - 1, x - 1 + w, y - 1, Color::buttonframe);
+       line(x, y + h - 1, x - 1 + w, y + h - 1, Color::buttonframe);
 }
 
 
 void Painter::rectText(int x, int y,
        docstring const & str,
        LyXFont const & font,
-       LColor_color back,
-       LColor_color frame)
+       Color_color back,
+       Color_color frame)
 {
        int width;
        int ascent;
@@ -58,11 +58,11 @@ void Painter::rectText(int x, int y,
        FontMetrics const & fm = theFontMetrics(font);
        fm.rectText(str, width, ascent, descent);
 
-       if (back != LColor::none)
+       if (back != Color::none)
                fillRectangle(x + 1, y - ascent + 1, width - 1,
                              ascent + descent - 1, back);
 
-       if (frame != LColor::none)
+       if (frame != Color::none)
                rectangle(x, y - ascent, width, ascent + descent, frame);
 
        text(x + 3, y, str, font);
@@ -97,17 +97,17 @@ int Painter::preeditText(int x, int y, char_type c,
        switch (style) {
                case preedit_default:
                        // default unselecting mode.
-                       fillRectangle(x, y - height + 1, width, height, LColor::background);
+                       fillRectangle(x, y - height + 1, width, height, Color::background);
                        dashedUnderline(font, x, y - descent + 1, width);
                        break;
                case preedit_selecting:
                        // We are in selecting mode: white text on black background.
-                       fillRectangle(x, y - height + 1, width, height, LColor::black);
-                       temp_font.setColor(LColor::white);
+                       fillRectangle(x, y - height + 1, width, height, Color::black);
+                       temp_font.setColor(Color::white);
                        break;
                case preedit_cursor:
                        // The character comes with a cursor.
-                       fillRectangle(x, y - height + 1, width, height, LColor::background);
+                       fillRectangle(x, y - height + 1, width, height, Color::background);
                        underline(font, x, y - descent + 1, width);
                        break;
        }
index 0ac00c4715a5c5296f8f79ee3c4b12ff885417d4..bc67d27ff6b5b1a5c9f453a69b1e74d20fab8c91 100644 (file)
@@ -17,7 +17,7 @@
 
 namespace lyx {
 
-class LColor_color;
+class Color_color;
 class LyXFont;
 
 namespace graphics { class Image; }
@@ -80,7 +80,7 @@ public:
        virtual void line(
                int x1, int y1,
                int x2, int y2,
-               LColor_color,
+               Color_color,
                line_style = line_solid,
                line_width = line_thin) = 0;
 
@@ -94,7 +94,7 @@ public:
                int const * xp,
                int const * yp,
                int np,
-               LColor_color,
+               Color_color,
                line_style = line_solid,
                line_width = line_thin) = 0;
 
@@ -102,7 +102,7 @@ public:
        virtual void rectangle(
                int x, int y,
                int w, int h,
-               LColor_color,
+               Color_color,
                line_style = line_solid,
                line_width = line_thin) = 0;
 
@@ -110,19 +110,19 @@ public:
        virtual void fillRectangle(
                int x, int y,
                int w, int h,
-               LColor_color) = 0;
+               Color_color) = 0;
 
        /// draw an arc
        virtual void arc(
                int x, int y,
                unsigned int w, unsigned int h,
                int a1, int a2,
-               LColor_color) = 0;
+               Color_color) = 0;
 
        /// draw a pixel
        virtual void point(
                int x, int y,
-               LColor_color) = 0;
+               Color_color) = 0;
 
        /// draw a filled rectangle with the shape of a 3D button
        virtual void button(int x, int y,
@@ -158,8 +158,8 @@ public:
        void rectText(int x, int baseline,
                docstring const & str,
                LyXFont const & font,
-               LColor_color back,
-               LColor_color frame);
+               Color_color back,
+               Color_color frame);
 
        /// draw a string and enclose it inside a button frame
        void buttonText(int x, int baseline, docstring const & s,
index d9040e493dd09c6f86a32175f35abbe0349d0ce0..c428821135b785f5fb565e2ff9675d32d39a826b 100644 (file)
@@ -29,7 +29,7 @@
 #include "Cursor.h"
 #include "debug.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXFont.h"
 #include "LyXRC.h"
 #include "Row.h"
index 47ccd4d1da983a3eec967773ba0bbc10708babbe..9060c41502b53e2221d0f6907097d0eb86c3b017 100644 (file)
        * ControlBranch.[Ch] (branchlist): new member function.
 
        * ControlDocument.C (setBranchColor): removed.
-       (apply): update LColor to accommodate the new BranchList colors.
+       (apply): update Color to accommodate the new BranchList colors.
 
 2003-12-14  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * ControlCharacter.h:
        * ControlPrefs.C:
        * ControlPrefs.h:
-       * character.h: rename EnumLColor as LColor_color.
+       * character.h: rename EnumColor as Color_color.
 
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
-       * ControlCharacter.C: add #include "LColor.h".
+       * ControlCharacter.C: add #include "Color.h".
 
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
-       * character.C: add #include "LColor.h".
+       * character.C: add #include "Color.h".
 
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
        * ControlCharacter.C (setColor, getColor):
-       pass EnumLColor args, rather than LColor::color ones.
+       pass EnumColor args, rather than Color::color ones.
 
-       * ControlPrefs.C: add #include "LColor.h".
-       * ControlPrefs.h:remove #include "LColor.h".
+       * ControlPrefs.C: add #include "Color.h".
+       * ControlPrefs.h:remove #include "Color.h".
 
-       * ControlPrefs.[Ch] (setColor): pass EnumLColor arg, not than LColor::color one.
+       * ControlPrefs.[Ch] (setColor): pass EnumColor arg, not than Color::color one.
 
-       * character.h:remove #include "LColor.h".
-       typedef ColorPair as a std::pair<string, EnumLColor>.
+       * character.h:remove #include "Color.h".
+       typedef ColorPair as a std::pair<string, EnumColor>.
 
 2003-09-15  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
        and have a "display colour" to distinguish them on-screen.
 
        ColorHandler was somewhat cleaned up.
-       (1) make possible a dynamically growing LColor list by allowing
+       (1) make possible a dynamically growing Color list by allowing
        the graphic context cache to grow along (vector);
        (2) eliminate an IMHO unnecessary step in colour allocation.
 
index 76fe57ec07668ebec1e79eee19d75ec817d31b64..b5dd7fe67a0a1c14eae0057df6158d3b5d4f9695 100644 (file)
@@ -18,7 +18,7 @@
 #include "bufferview_funcs.h"
 #include "FuncRequest.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 
 using lyx::bv_funcs::font2string;
 using std::string;
@@ -44,7 +44,7 @@ bool ControlCharacter::initialiseParams(string const &)
            getShape()    != LyXFont::IGNORE_SHAPE  ||
            getSize()     != LyXFont::IGNORE_SIZE ||
            getBar()      != IGNORE ||
-           getColor()    != LColor::ignore ||
+           getColor()    != Color::ignore ||
            font_->language() != ignore_language)
                dialog().bc().valid();
 
@@ -178,29 +178,29 @@ void ControlCharacter::setBar(FONT_STATE val)
 }
 
 
-LColor_color ControlCharacter::getColor() const
+Color_color ControlCharacter::getColor() const
 {
        if (!font_.get())
-               return LColor::ignore;
+               return Color::ignore;
 
        return font_->color();
 }
 
 
-void ControlCharacter::setColor(LColor_color val)
+void ControlCharacter::setColor(Color_color val)
 {
        switch (val) {
-       case LColor::ignore:
-       case LColor::none:
-       case LColor::black:
-       case LColor::white:
-       case LColor::red:
-       case LColor::green:
-       case LColor::blue:
-       case LColor::cyan:
-       case LColor::magenta:
-       case LColor::yellow:
-       case LColor::inherit:
+       case Color::ignore:
+       case Color::none:
+       case Color::black:
+       case Color::white:
+       case Color::red:
+       case Color::green:
+       case Color::blue:
+       case Color::cyan:
+       case Color::magenta:
+       case Color::yellow:
+       case Color::inherit:
                font_->setColor(val);
                break;
        default:
index 66313459b8bd5c79318400bcd622a399cbb9d57b..fa40fccd4ad7d81eb5e93b35fe32e75b8b8c7c62 100644 (file)
@@ -19,7 +19,7 @@
 
 namespace lyx {
 
-class LColor_color;
+class Color_color;
 
 namespace frontend {
 
@@ -49,7 +49,7 @@ public:
        ///
        void setBar(FONT_STATE);
        ///
-       void setColor(LColor_color);
+       void setColor(Color_color);
        ///
        void setLanguage(std::string const &);
        ///
@@ -66,7 +66,7 @@ public:
        ///
        FONT_STATE getBar() const;
        ///
-       LColor_color getColor() const;
+       Color_color getColor() const;
        ///
        std::string getLanguage() const;
        ///
index c25b84809f9d4ce221d25cad4399187503fcdd4f..cbffe910ba3ee1967ec78d2eb66e819fd1f6fea3 100644 (file)
@@ -22,7 +22,7 @@
 #include "gettext.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "OutputParams.h"
 #include "LyXTextClassList.h"
 #include "tex-strings.h"
index ddc76f7c0d0f1b419a2f1c64f601e42b291743d5..7a20255e351b38bdcfe64f1274711d58e907614d 100644 (file)
@@ -19,7 +19,7 @@
 #include "gettext.h"
 #include "FuncRequest.h"
 #include "paper.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "support/FileFilterList.h"
 
@@ -92,7 +92,7 @@ void ControlPrefs::dispatchParams()
 }
 
 
-void ControlPrefs::setColor(LColor_color col, string const & hex)
+void ControlPrefs::setColor(Color_color col, string const & hex)
 {
        colors_.push_back(lcolor.getLyXName(col) + ' ' + hex);
 }
index 2deabd74f900c6f01946c827ae1211812f6a586a..205fa0be3f05b1e21cc762c45fc584dcc0380f36 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace lyx {
 
-class LColor_color;
+class Color_color;
 
 namespace frontend {
 
@@ -66,7 +66,7 @@ public:
                                    docstring const & title) const;
 
        /// set a color
-       void setColor(LColor_color col, std::string const & hex);
+       void setColor(Color_color col, std::string const & hex);
 
        /// update the screen fonts after change
        void updateScreenFonts();
index 352701a6ee0b36736d729783a43f1231d032c0b6..3034cddc81a02f9194092cdec26754e5025c7460 100644 (file)
@@ -25,7 +25,7 @@
 #include <algorithm>
 #include <config.h>
 
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/FileDialog.h"
 #include "frontends/Alert.h"
@@ -1050,47 +1050,47 @@ vector<ColorPair> const getColorData()
        ColorPair pr;
 
        pr.first = _("No change");
-       pr.second = LColor::ignore;
+       pr.second = Color::ignore;
        color[0] = pr;
 
        pr.first = _("No color");
-       pr.second = LColor::none;
+       pr.second = Color::none;
        color[1] = pr;
 
        pr.first = _("Black");
-       pr.second = LColor::black;
+       pr.second = Color::black;
        color[2] = pr;
 
        pr.first = _("White");
-       pr.second = LColor::white;
+       pr.second = Color::white;
        color[3] = pr;
 
        pr.first = _("Red");
-       pr.second = LColor::red;
+       pr.second = Color::red;
        color[4] = pr;
 
        pr.first = _("Green");
-       pr.second = LColor::green;
+       pr.second = Color::green;
        color[5] = pr;
 
        pr.first = _("Blue");
-       pr.second = LColor::blue;
+       pr.second = Color::blue;
        color[6] = pr;
 
        pr.first = _("Cyan");
-       pr.second = LColor::cyan;
+       pr.second = Color::cyan;
        color[7] = pr;
 
        pr.first = _("Magenta");
-       pr.second = LColor::magenta;
+       pr.second = Color::magenta;
        color[8] = pr;
 
        pr.first = _("Yellow");
-       pr.second = LColor::yellow;
+       pr.second = Color::yellow;
        color[9] = pr;
 
        pr.first = _("Reset");
-       pr.second = LColor::inherit;
+       pr.second = Color::inherit;
        color[10] = pr;
 
        return color;
index 8a835bc1c43d8296d7521da09e6bb750ffc63543..886061f8ee38048c92ab8cd2575b7c18de3991c2 100644 (file)
@@ -174,7 +174,7 @@ getAuthorYearStrings(std::string const & key,
 } // namespace lyx
 
 
-class LColor_color;
+class Color_color;
 
 
 /** Functions of use to the character GUI controller and view */
@@ -206,7 +206,7 @@ typedef std::pair<docstring, LyXFont::FONT_SIZE>   SizePair;
 ///
 typedef std::pair<docstring, FONT_STATE> BarPair;
 ///
-typedef std::pair<docstring, LColor_color> ColorPair;
+typedef std::pair<docstring, Color_color> ColorPair;
 
 ///
 std::vector<FamilyPair>   const getFamilyData();
index a7244d0e0989846d09da1e0eb0f7d937f734a6d0..534eb13f0bd2ed76e7086b4e907511bf69ec196a 100644 (file)
 
 2004-11-17  Lars Gullik Bjønnes  <larsbj@gullik.net>
 
-       * QPrefsDialog.h: include LColor.h to satisfy concept checks.
+       * QPrefsDialog.h: include Color.h to satisfy concept checks.
        * lcolorcache.h: ditto
 
 2004-11-15  Jean-Marc Lasgouttes  <lasgouttes@lyx.org>
 2004-05-02  Angus Leeming  <leeming@lyx.org>
 
        * QLPainter.C (image): set the background colour to
-       LColor::graphicsbg.
+       Color::graphicsbg.
 
        * QLImage.C (setPixmap_impl): remove commented out xforms code
        to set pixmap background colour.
        * QPrefsDialog.h:
        * lcolorcache.C:
        * lcolorcache.h:
-       * lyx_gui.C: rename EnumLColor as LColor_color.
+       * lyx_gui.C: rename EnumColor as Color_color.
 
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
 
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
-       * QCharacter.C, QPrefs.C, lyx_gui.C: add #include "LColor.h".
+       * QCharacter.C, QPrefs.C, lyx_gui.C: add #include "Color.h".
 
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
-       * QLPainter.C: add #include "LColor.h".
+       * QLPainter.C: add #include "Color.h".
        * QLPainter.[Ch] (setPen, point, line, lines, rectangle, fillPolygon, arc):
-       pass EnumLColor args, rather than LColor::color ones.
+       pass EnumColor args, rather than Color::color ones.
 
-       * QPrefsDialog.C: add #include "LColor.h".
-       * QPrefsDialog.h: remove #include "LColor.h". Store a vector<EnumLColor> colors_;
+       * QPrefsDialog.C: add #include "Color.h".
+       * QPrefsDialog.h: remove #include "Color.h". Store a vector<EnumColor> colors_;
 
-       * QWorkArea.C: add #include "LColor.h".
+       * QWorkArea.C: add #include "Color.h".
 
-       * lcolorcache.C: add #include "LColor.h".
-       * lcolorcache.h: store a map<EnumLColor, QColor>.
-       * lcolorcache.[Ch] (get):pass EnumLColor args, rather than LColor::color ones.
+       * lcolorcache.C: add #include "Color.h".
+       * lcolorcache.h: store a map<EnumColor, QColor>.
+       * lcolorcache.[Ch] (get):pass EnumColor args, rather than Color::color ones.
 
-       * qscreen.C: add #include "LColor.h".
+       * qscreen.C: add #include "Color.h".
 
-       * lyx_gui.C (hexname, update_color): pass EnumLColor args, rather
-       than LColor::color ones.
+       * lyx_gui.C (hexname, update_color): pass EnumColor args, rather
+       than Color::color ones.
 
 2003-09-15  Angus Leeming  <leeming@lyx.org>
 
 
        * Makefile.am:
        * lcolorcache.h:
-       * lcolorcache.C: add LColor::color -> QColor cache
+       * lcolorcache.C: add Color::color -> QColor cache
 
        * QLPainter.C:
        * QPrefs.C:
 
 2002-11-25  John Levon  <levon@movementarian.org>
 
-       * qscreen.C: use LColor::cursor properly
+       * qscreen.C: use Color::cursor properly
 
        * QPrefs.C:
        * ui/QPrefKeyboardModule.ui:
index dca532b86877bf3f4652425c1b8d9c00d7331db8..7c5127d9f29fd18f4ba4050c158a9007e420fc3c 100644 (file)
@@ -13,7 +13,7 @@
 #include "color.h"
 #include "ColorCache.h"
 
-#include "LColor.h"
+#include "Color.h"
 
 
 namespace lyx {
@@ -24,7 +24,7 @@ const QColor grey80(0xcc, 0xcc, 0xcc);
 const QColor grey90(0xe5, 0xe5, 0xe5);
 const QColor none = Qt::black;
 
-QColor const & ColorCache::get(LColor_color col) const
+QColor const & ColorCache::get(Color_color col) const
 {
        lcolor_map::const_iterator cit = colormap.find(col);
        if (cit != colormap.end())
index 0604061537a6ca36f2b4a0ead482456b7370b8ab..05dabea4b04e9c0b7316ba61f3ae3de2101dcaa5 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef COLORCACHE_H
 #define COLORCACHE_H
 
-#include "LColor.h"
+#include "Color.h"
 
 #include <QColor>
 
@@ -26,20 +26,20 @@ struct RGBColor;
 // FIXME: use a fixed-size array not a map ?
 
 /**
- * Cache from LColor to QColor.
+ * Cache from Color to QColor.
  */
 class ColorCache {
 public:
        ColorCache() {}
 
        /// get the given color
-       QColor const & get(LColor_color color) const;
+       QColor const & get(Color_color color) const;
 
        /// clear all colors
        void clear();
 
 private:
-       typedef std::map<LColor_color, QColor> lcolor_map;
+       typedef std::map<Color_color, QColor> lcolor_map;
 
        mutable lcolor_map colormap;
 };
index c6749688f1534dcf823abb6d11a3570c0c98dad3..971cf53e9efd00a3d55f9198c6904264175e187b 100644 (file)
@@ -248,7 +248,7 @@ void GuiApplication::syncEvents()
 }
 
 
-bool GuiApplication::getRgbColor(LColor_color col,
+bool GuiApplication::getRgbColor(Color_color col,
        RGBColor & rgbcol)
 {
        QColor const & qcol = color_cache_.get(col);
@@ -265,13 +265,13 @@ bool GuiApplication::getRgbColor(LColor_color col,
 }
 
 
-string const GuiApplication::hexName(LColor_color col)
+string const GuiApplication::hexName(Color_color col)
 {
        return lyx::support::ltrim(fromqstr(color_cache_.get(col).name()), "#");
 }
 
 
-void GuiApplication::updateColor(LColor_color)
+void GuiApplication::updateColor(Color_color)
 {
        // FIXME: Bleh, can't we just clear them all at once ?
        color_cache_.clear();
index ab2f1583ef0ec14042a732f15345528e7365a436..10711794ec2600d314fed21c627ddba82300684e 100644 (file)
@@ -63,9 +63,9 @@ public:
        virtual std::string const romanFontName();
        virtual std::string const sansFontName();
        virtual std::string const typewriterFontName();
-       virtual bool getRgbColor(LColor_color col, RGBColor & rgbcol);
-       virtual std::string const hexName(LColor_color col);
-       virtual void updateColor(LColor_color col);
+       virtual bool getRgbColor(Color_color col, RGBColor & rgbcol);
+       virtual std::string const hexName(Color_color col);
+       virtual void updateColor(Color_color col);
        virtual void registerSocketCallback(
                int fd, boost::function<void()> func);
        void unregisterSocketCallback(int fd);
index 0b383c7bd61f5317573211229b1cd41a66663f2f..ff6764ec603163af1e8e44ab3e6cae9e24944dfb 100644 (file)
@@ -24,7 +24,7 @@
 #include "rowpainter.h"
 #include "debug.h"
 #include "FuncRequest.h"
-#include "LColor.h"
+#include "Color.h"
 #include "version.h"
 #include "LyXRC.h"
 
@@ -129,7 +129,7 @@ public:
 
        void update(int x, int y, int h, CursorShape shape)
        {
-               color_ = guiApp->colorCache().get(LColor::cursor);
+               color_ = guiApp->colorCache().get(Color::cursor);
                rect_ = QRect(x, y, CursorWidth, h);
                shape_ = shape;
        }
@@ -458,7 +458,7 @@ void GuiWorkArea::update(int x, int y, int w, int h)
 void GuiWorkArea::doGreyOut(QLPainter & pain)
 {
        pain.fillRectangle(0, 0, width(), height(),
-               LColor::bottomarea);
+               Color::bottomarea);
 
        //if (!lyxrc.show_banner)
        //      return;
index 86eb85f30641fb00efc72527e05eff0a3c962f58..44cb05889c2c86b4f125c96906493afe8b7a9947 100644 (file)
@@ -16,7 +16,7 @@
 #include "Qt2BC.h"
 #include "qt_helpers.h"
 
-#include "LColor.h"
+#include "Color.h"
 
 
 #include <QCloseEvent>
index 91f9571a0f16c05671ae890dfc537f567a07a7b0..3c26f71c607e8b579141ae48e09354306587f71d 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "debug.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "support/unicode.h"
 
@@ -38,7 +38,7 @@ QLPainter::QLPainter(QPaintDevice * device)
        : QPainter(device), Painter()
 {
        // new QPainter has default QPen:
-       current_color_ = LColor::black;
+       current_color_ = Color::black;
        current_ls_ = line_solid;
        current_lw_ = line_thin;
 }
@@ -51,7 +51,7 @@ QLPainter::~QLPainter()
 }
 
 
-void QLPainter::setQPainterPen(LColor_color col,
+void QLPainter::setQPainterPen(Color_color col,
        Painter::line_style ls, Painter::line_width lw)
 {
        if (col == current_color_ && ls == current_ls_ && lw == current_lw_)
@@ -79,7 +79,7 @@ void QLPainter::setQPainterPen(LColor_color col,
 }
 
 
-void QLPainter::point(int x, int y, LColor_color col)
+void QLPainter::point(int x, int y, Color_color col)
 {
        if (!isDrawingEnabled())
                return;
@@ -90,7 +90,7 @@ void QLPainter::point(int x, int y, LColor_color col)
 
 
 void QLPainter::line(int x1, int y1, int x2, int y2,
-       LColor_color col,
+       Color_color col,
        line_style ls,
        line_width lw)
 {
@@ -105,7 +105,7 @@ void QLPainter::line(int x1, int y1, int x2, int y2,
 
 
 void QLPainter::lines(int const * xp, int const * yp, int np,
-       LColor_color col,
+       Color_color col,
        line_style ls,
        line_width lw)
 {
@@ -133,7 +133,7 @@ void QLPainter::lines(int const * xp, int const * yp, int np,
 
 
 void QLPainter::rectangle(int x, int y, int w, int h,
-       LColor_color col,
+       Color_color col,
        line_style ls,
        line_width lw)
 {
@@ -145,14 +145,14 @@ void QLPainter::rectangle(int x, int y, int w, int h,
 }
 
 
-void QLPainter::fillRectangle(int x, int y, int w, int h, LColor_color col)
+void QLPainter::fillRectangle(int x, int y, int w, int h, Color_color col)
 {
        fillRect(x, y, w, h, guiApp->colorCache().get(col));
 }
 
 
 void QLPainter::arc(int x, int y, unsigned int w, unsigned int h,
-       int a1, int a2, LColor_color col)
+       int a1, int a2, Color_color col)
 {
        if (!isDrawingEnabled())
                return;
@@ -170,7 +170,7 @@ void QLPainter::image(int x, int y, int w, int h, graphics::Image const & i)
        graphics::QLImage const & qlimage =
                static_cast<graphics::QLImage const &>(i);
 
-       fillRectangle(x, y, w, h, LColor::graphicsbg);
+       fillRectangle(x, y, w, h, Color::graphicsbg);
 
        if (!isDrawingEnabled())
                return;
index 5a5c72d814d950305adf5e8a09432d5e4cfc19cc..d86f3fa42985e090235c1a6c913aa3666a214c9a 100644 (file)
@@ -15,7 +15,7 @@
 
 #include "frontends/Painter.h"
 
-#include "LColor.h"
+#include "Color.h"
 
 #include <QPainter>
 
@@ -39,7 +39,7 @@ public:
        virtual void line(
                int x1, int y1,
                int x2, int y2,
-               LColor_color,
+               Color_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -53,7 +53,7 @@ public:
                int const * xp,
                int const * yp,
                int np,
-               LColor_color,
+               Color_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -61,7 +61,7 @@ public:
        virtual void rectangle(
                int x, int y,
                int w, int h,
-               LColor_color,
+               Color_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -69,19 +69,19 @@ public:
        virtual void fillRectangle(
                int x, int y,
                int w, int h,
-               LColor_color);
+               Color_color);
 
        /// draw an arc
        virtual void arc(
                int x, int y,
                unsigned int w, unsigned int h,
                int a1, int a2,
-               LColor_color);
+               Color_color);
 
        /// draw a pixel
        virtual void point(
                int x, int y,
-               LColor_color);
+               Color_color);
 
        /// draw an image from the image cache
        virtual void image(int x, int y,
@@ -104,11 +104,11 @@ private:
                QString const & str, LyXFont const & f);
 
        /// set pen parameters
-       void setQPainterPen(LColor_color col,
+       void setQPainterPen(Color_color col,
                line_style ls = line_solid,
                line_width lw = line_thin);
 
-       LColor::color current_color_;
+       Color::color current_color_;
        Painter::line_style current_ls_;
        Painter::line_width current_lw_;
 };
index 50879fdc83ab515bcbf06bb875484227bc1473ce..3ebc19e20b649df5235a7242b37959800fccfcee 100644 (file)
@@ -18,7 +18,7 @@
 
 #include "Session.h"
 #include "debug.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXFont.h"
 #include "PanelStack.h"
 #include "QFontExample.h"
@@ -517,19 +517,19 @@ PrefColors::PrefColors(QPrefs * form, QWidget * parent)
        // FIXME: all of this initialization should be put into the controller.
        // See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg113301.html
        // for some discussion of why that is not trivial.
-       for (int i = 0; i < LColor::ignore; ++i) {
-               LColor::color lc = static_cast<LColor::color>(i);
-               if (lc == LColor::none
-                       || lc == LColor::black
-                       || lc == LColor::white
-                       || lc == LColor::red
-                       || lc == LColor::green
-                       || lc == LColor::blue
-                       || lc == LColor::cyan
-                       || lc == LColor::magenta
-                       || lc == LColor::yellow
-                       || lc == LColor::inherit
-                       || lc == LColor::ignore) continue;
+       for (int i = 0; i < Color::ignore; ++i) {
+               Color::color lc = static_cast<Color::color>(i);
+               if (lc == Color::none
+                       || lc == Color::black
+                       || lc == Color::white
+                       || lc == Color::red
+                       || lc == Color::green
+                       || lc == Color::blue
+                       || lc == Color::cyan
+                       || lc == Color::magenta
+                       || lc == Color::yellow
+                       || lc == Color::inherit
+                       || lc == Color::ignore) continue;
 
                lcolors_.push_back(lc);
                QColor color = QColor(guiApp->colorCache().get(lc));
index 126ca986aa4dbf5e9633d32371637bba5b1b6c5e..6efdcadbdc8c9ae1982b225ac6a89224d58fd95a 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "QDialogView.h"
 
-#include "LColor.h"
+#include "Color.h"
 #include "LyXRC.h"
 
 #include "ui/PrefsUi.h"
@@ -158,7 +158,7 @@ private Q_SLOTS:
        void change_color();
 
 private:
-       std::vector<LColor_color> lcolors_;
+       std::vector<Color_color> lcolors_;
        // FIXME the use of mutable here is required due to the
        // fact that initialization is not done in the controller
        // but in the constructor.
index b0995aa1591f3d9f3f55091e423eaa89cf7528f0..d80df9d825efd916c5a1b944a76320e40e7badbe 100644 (file)
@@ -19,7 +19,7 @@
 #include "debug.h"
 #include "Format.h"
 #include "InsetIterator.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXRC.h"
 #include "OutputParams.h"
 #include "Paragraph.h"
@@ -592,8 +592,8 @@ void PreviewLoader::Impl::startLoading()
        cs << pconverter_->command << ' ' << pconverter_->to << ' '
           << support::quoteName(latexfile.toFilesystemEncoding()) << ' '
           << int(font_scaling_factor_) << ' '
-          << theApp()->hexName(LColor::preview) << ' '
-          << theApp()->hexName(LColor::background);
+          << theApp()->hexName(Color::preview) << ' '
+          << theApp()->hexName(Color::background);
 
        string const command = support::libScriptSearch(cs.str());
 
index 47ca76f1985d777a90ab06051bf052a7106eff3d..8512c49585c8137be353a9608b879a930bf369c6 100644 (file)
@@ -15,7 +15,7 @@
 #include "Buffer.h"
 #include "CoordCache.h"
 #include "BufferView.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Cursor.h"
 #include "debug.h"
 #include "Dimension.h"
@@ -109,7 +109,7 @@ static TranslatorMap const build_translator()
 
 
 /// pretty arbitrary dimensions
-InsetBase::InsetBase(): dim_(10, 10, 10), background_color_(LColor::background)
+InsetBase::InsetBase(): dim_(10, 10, 10), background_color_(Color::background)
 {}
 
 
@@ -286,8 +286,8 @@ void InsetBase::metricsMarkers2(Dimension & dim, int framesize) const
 
 void InsetBase::drawMarkers(PainterInfo & pi, int x, int y) const
 {
-       LColor::color pen_color = editing(pi.base.bv)?
-               LColor::mathframe : LColor::background;
+       Color::color pen_color = editing(pi.base.bv)?
+               Color::mathframe : Color::background;
 
        int const t = x + width() - 1;
        int const d = y + descent();
@@ -301,8 +301,8 @@ void InsetBase::drawMarkers(PainterInfo & pi, int x, int y) const
 
 void InsetBase::drawMarkers2(PainterInfo & pi, int x, int y) const
 {
-       LColor::color pen_color = editing(pi.base.bv)?
-               LColor::mathframe : LColor::background;
+       Color::color pen_color = editing(pi.base.bv)?
+               Color::mathframe : Color::background;
 
        drawMarkers(pi, x, y);
        int const t = x + width() - 1;
@@ -355,15 +355,15 @@ void InsetBase::dump() const
 }
 
 
-void InsetBase::setBackgroundColor(LColor_color color)
+void InsetBase::setBackgroundColor(Color_color color)
 {
        background_color_ = color;
 }
 
 
-LColor_color InsetBase::backgroundColor() const
+Color_color InsetBase::backgroundColor() const
 {
-       return LColor::color(background_color_);
+       return Color::color(background_color_);
 }
 
 
index 7aa01806aba8df10cb1d50674edf2964fa87628a..27083cdee8d462f5d3cbca96382888e7a6dabb51 100644 (file)
@@ -31,7 +31,7 @@ class FuncStatus;
 class InsetMath;
 class InsetText;
 class LaTeXFeatures;
-class LColor_color;
+class Color_color;
 class Cursor;
 class Lexer;
 class LyXText;
@@ -446,9 +446,9 @@ public:
        ///
        int scroll() const { return 0; }
        ///
-       void setBackgroundColor(LColor_color);
+       void setBackgroundColor(Color_color);
        ///
-       LColor_color backgroundColor() const;
+       Color_color backgroundColor() const;
        ///
        enum CollapseStatus {
                Collapsed,
@@ -477,7 +477,7 @@ protected:
        mutable Dimension dim_;
 private:
        virtual std::auto_ptr<InsetBase> doClone() const = 0;
-       /** We store the LColor::color value as an int to get LColor.h out
+       /** We store the Color::color value as an int to get Color.h out
         *  of the header file.
         */
        int background_color_;
index 91fccc39482f894f9ea84f5725105b5de5a6d365..cec91236605a8b5638e8cc9fe519ec6d6e48baed 100644 (file)
@@ -22,7 +22,7 @@
 #include "FuncRequest.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "Paragraph.h"
@@ -164,8 +164,8 @@ void InsetBox::setButtonLabel()
 
        setLabel(label);
 
-       font.setColor(LColor::foreground);
-       setBackgroundColor(LColor::background);
+       font.setColor(Color::foreground);
+       setBackgroundColor(Color::background);
        setLabelFont(font);
 }
 
index 29f19e9ba77ed2225149e26a6cefb8c6d108c64b..38e32e4bce38383d29a148a768068265ff2c9c90 100644 (file)
@@ -20,7 +20,7 @@
 #include "FuncRequest.h"
 #include "FuncStatus.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "Paragraph.h"
 #include "OutputParams.h"
@@ -99,17 +99,17 @@ void InsetBranch::setButtonLabel()
        font.decSize();
 
        docstring s = _("Branch: ") + params_.branch;
-       font.setColor(LColor::foreground);
+       font.setColor(Color::foreground);
        if (!params_.branch.empty()) {
                // FIXME UNICODE
-               LColor_color c = lcolor.getFromLyXName(to_utf8(params_.branch));
-               if (c == LColor::none) {
-                       c = LColor::error;
+               Color_color c = lcolor.getFromLyXName(to_utf8(params_.branch));
+               if (c == Color::none) {
+                       c = Color::error;
                        s = _("Undef: ") + s;
                }
                setBackgroundColor(c);
        } else
-               setBackgroundColor(LColor::background);
+               setBackgroundColor(Color::background);
        setLabel(isOpen() ? s : getNewLabel(s) );
        setLabelFont(font);
 }
index 6e53edf7c0abafff27e2b18119ec62d5ae1629f9..be9d77efd7793a245884774022ee3fae5b48bce0 100644 (file)
@@ -24,7 +24,7 @@
 #include "FuncRequest.h"
 #include "FuncStatus.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "MetricsInfo.h"
 #include "output_latex.h"
 #include "OutputParams.h"
@@ -56,7 +56,7 @@ InsetCaption::InsetCaption(BufferParams const & bp)
 {
        setAutoBreakRows(true);
        setDrawFrame(true);
-       setFrameColor(LColor::captionframe);
+       setFrameColor(Color::captionframe);
 }
 
 
index 2b1450d7183eee7f788ba695f03f3b47cacaa009..57e770907368cd706ddc654380c41ebec9605e6d 100644 (file)
@@ -23,7 +23,7 @@
 #include "Cursor.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "LyXText.h"
 #include "MetricsInfo.h"
@@ -102,7 +102,7 @@ void InsetCharStyle::setUndefined()
        params_.latexparam.clear();
        params_.font = LyXFont(LyXFont::ALL_INHERIT);
        params_.labelfont = LyXFont(LyXFont::ALL_INHERIT);
-       params_.labelfont.setColor(LColor::error);
+       params_.labelfont.setColor(Color::error);
        params_.show_label = true;
 }
 
@@ -212,7 +212,7 @@ void InsetCharStyle::draw(PainterInfo & pi, int x, int y) const
                        s = _("Undef: ") + s;
                theFontMetrics(font).rectText(s, w, a, d);
                pi.pain.rectText(x + (dim_.wid - w) / 2, y + desc + a,
-                       s, font, LColor::none, LColor::none);
+                       s, font, Color::none, Color::none);
        }
 
        // a visual clue when the cursor is inside the inset
index 5b5515ff6b576957a4e123ae367512afa105c2cb..ad8e892d49e543abb1780183df770d494f375120 100644 (file)
@@ -23,7 +23,7 @@
 #include "FloatList.h"
 #include "FuncStatus.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "FuncRequest.h"
 #include "MetricsInfo.h"
@@ -57,7 +57,7 @@ InsetCollapsable::InsetCollapsable
 {
        setAutoBreakRows(true);
        setDrawFrame(true);
-       setFrameColor(LColor::collapsableframe);
+       setFrameColor(Color::collapsableframe);
        setInsetName(from_ascii("Collapsable"));
        setButtonLabel();
 }
index 1ed5ae91b979c9ec680a7ff9a66e9c7f1882c91c..f87b1c7b35b379f0d6154e2a0ed924d6efebb7b7 100644 (file)
@@ -23,7 +23,7 @@
 #include "FuncStatus.h"
 #include "gettext.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXAction.h"
 #include "Lexer.h"
 #include "LyXTextClass.h"
@@ -57,7 +57,7 @@ void InsetERT::init()
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::latex);
+       font.setColor(Color::latex);
        setLabelFont(font);
        text_.current_font.setLanguage(latex_language);
        text_.real_current_font.setLanguage(latex_language);
@@ -431,7 +431,7 @@ void InsetERT::getDrawFont(LyXFont & font) const
 {
        font = LyXFont(LyXFont::ALL_INHERIT, latex_language);
        font.setFamily(LyXFont::TYPEWRITER_FAMILY);
-       font.setColor(LColor::latex);
+       font.setColor(Color::latex);
 }
 
 
index 5a5e2e2366fd1fda4259d0b581dbce775bde4714..e7126066a69b4be28f7e41a40c2aed88835ae077 100644 (file)
@@ -25,7 +25,7 @@
 #include "FuncStatus.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "OutputParams.h"
 #include "Paragraph.h"
@@ -122,7 +122,7 @@ InsetFloat::InsetFloat(BufferParams const & bp, string const & type)
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::collapsable);
+       font.setColor(Color::collapsable);
        setLabelFont(font);
        params_.type = type;
        setInsetName(from_utf8(type));
index a34b3f1e8868ba0181684166c8bf2a384a852a5f..eee2c8c69388e5aaedf30ce18a98c2a26212027c 100644 (file)
@@ -15,7 +15,7 @@
 #include "Buffer.h"
 #include "BufferView.h"
 #include "BufferParams.h"
-#include "LColor.h"
+#include "Color.h"
 #include "MetricsInfo.h"
 #include "Paragraph.h"
 
@@ -28,7 +28,7 @@ InsetFootlike::InsetFootlike(BufferParams const & bp)
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::collapsable);
+       font.setColor(Color::collapsable);
        setLabelFont(font);
 }
 
@@ -39,7 +39,7 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in)
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::collapsable);
+       font.setColor(Color::collapsable);
        setLabelFont(font);
 }
 
index 73e8fc216c1bb1df4c8f4c3a08c7c6987d2f9441..1b5966aaeedc5c7c1bc440846488be96f621dac2 100644 (file)
@@ -13,7 +13,7 @@
 #include "InsetLine.h"
 
 #include "debug.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXText.h"
 #include "MetricsInfo.h"
 #include "LaTeXFeatures.h"
@@ -55,7 +55,7 @@ bool InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetLine::draw(PainterInfo & pi, int x, int y) const
 {
-       pi.pain.line(x, y, x + dim_.wid, y, LColor::topline, Painter::line_solid,
+       pi.pain.line(x, y, x + dim_.wid, y, Color::topline, Painter::line_solid,
                        Painter::line_thick);
 }
 
index 51874b64f641bdf13ea7a00f717d30e5f15e2d36..a2f555a53eb99e860ccca9e4171dd8772cb144f1 100644 (file)
@@ -13,7 +13,7 @@
 #include "InsetNewline.h"
 
 #include "debug.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXText.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
@@ -101,7 +101,7 @@ void InsetNewline::draw(PainterInfo & pi, int x, int y) const
                xp[2] = int(x + wid * 0.625);
        }
 
-       pi.pain.lines(xp, yp, 3, LColor::eolmarker);
+       pi.pain.lines(xp, yp, 3, Color::eolmarker);
 
        yp[0] = int(y - 0.500 * asc * 0.75);
        yp[1] = int(y - 0.500 * asc * 0.75);
@@ -117,7 +117,7 @@ void InsetNewline::draw(PainterInfo & pi, int x, int y) const
                xp[2] = int(x);
        }
 
-       pi.pain.lines(xp, yp, 3, LColor::eolmarker);
+       pi.pain.lines(xp, yp, 3, Color::eolmarker);
 }
 
 
index 6c35dd45456f36c43c2e8d4c9ca971a7cd97c50f..c93ee6da0a35a71ff8c4c8fd48fbaf89014e8e2c 100644 (file)
@@ -23,7 +23,7 @@
 #include "FuncStatus.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
@@ -176,24 +176,24 @@ void InsetNote::setButtonLabel()
 
        switch (params_.type) {
        case InsetNoteParams::Note:
-               font.setColor(LColor::note);
-               setBackgroundColor(LColor::notebg);
+               font.setColor(Color::note);
+               setBackgroundColor(Color::notebg);
                break;
        case InsetNoteParams::Comment:
-               font.setColor(LColor::comment);
-               setBackgroundColor(LColor::commentbg);
+               font.setColor(Color::comment);
+               setBackgroundColor(Color::commentbg);
                break;
        case InsetNoteParams::Greyedout:
-               font.setColor(LColor::greyedout);
-               setBackgroundColor(LColor::greyedoutbg);
+               font.setColor(Color::greyedout);
+               setBackgroundColor(Color::greyedoutbg);
                break;
        case InsetNoteParams::Framed:
-               font.setColor(LColor::greyedout);
-               setBackgroundColor(LColor::greyedoutbg);
+               font.setColor(Color::greyedout);
+               setBackgroundColor(Color::greyedoutbg);
                break;
        case InsetNoteParams::Shaded:
-               font.setColor(LColor::greyedout);
-               setBackgroundColor(LColor::shadedbg);
+               font.setColor(Color::greyedout);
+               setBackgroundColor(Color::shadedbg);
                break;
        }
        setLabelFont(font);
index 64bf9fa3f173b4034648420fe4ea37f1de37d685..d6a85574bb3e74c21f5b0486036159416c7f7aa8 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "debug.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Paragraph.h"
 
 #include <sstream>
@@ -32,7 +32,7 @@ InsetOptArg::InsetOptArg(BufferParams const & ins)
        : InsetCollapsable(ins)
 {
        LyXFont font(LyXFont::ALL_SANE);
-       font.setColor(LColor::collapsable);
+       font.setColor(Color::collapsable);
        setLabelFont(font);
        setLabel(_("opt"));
 }
@@ -42,7 +42,7 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in)
        : InsetCollapsable(in)
 {
        LyXFont font(LyXFont::ALL_SANE);
-       font.setColor(LColor::collapsable);
+       font.setColor(Color::collapsable);
        setLabelFont(font);
        setLabel(_("opt"));
 }
index e7152f7650d8cb8d58d335419d9aec58317457c0..2334a1372390551401b84908b8a6277360c00b20 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "debug.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXText.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
@@ -58,7 +58,7 @@ bool InsetPagebreak::metrics(MetricsInfo & mi, Dimension & dim) const
 void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
 {
        LyXFont font;
-       font.setColor(LColor::pagebreak);
+       font.setColor(Color::pagebreak);
        font.decSize();
 
        int w = 0;
@@ -70,12 +70,12 @@ void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
        int const text_end = text_start + w;
 
        pi.pain.rectText(text_start, y + d, insetLabel(), font,
-               LColor::none, LColor::none);
+               Color::none, Color::none);
 
        pi.pain.line(x, y, text_start, y,
-                  LColor::pagebreak, Painter::line_onoffdash);
+                  Color::pagebreak, Painter::line_onoffdash);
        pi.pain.line(text_end, y, int(x + dim_.wid), y,
-                  LColor::pagebreak, Painter::line_onoffdash);
+                  Color::pagebreak, Painter::line_onoffdash);
 }
 
 
index 60bd79fdb0d9449975acc048237a7d083ba8857a..bdfdbe0beb69301e16414f4af956c387a58422b3 100644 (file)
@@ -16,7 +16,7 @@
 #include "InsetSpace.h"
 
 #include "debug.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
@@ -101,9 +101,9 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const
        yp[3] = y - max(h / 4, 1);
 
        if (kind_ == PROTECTED || kind_ == ENSPACE || kind_ == NEGTHIN)
-               pi.pain.lines(xp, yp, 4, LColor::latex);
+               pi.pain.lines(xp, yp, 4, Color::latex);
        else
-               pi.pain.lines(xp, yp, 4, LColor::special);
+               pi.pain.lines(xp, yp, 4, Color::special);
 }
 
 
index ac527982390ad874b50a2fe952af0ad26b21c248..f863b27bc2bd84c2588b1f44c6245e72f707ea95 100644 (file)
@@ -16,7 +16,7 @@
 
 #include "debug.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
 
@@ -74,25 +74,25 @@ void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) const
        switch (kind_) {
        case HYPHENATION:
        {
-               font.setColor(LColor::special);
+               font.setColor(Color::special);
                pi.pain.text(x, y, char_type('-'), font);
                break;
        }
        case LIGATURE_BREAK:
        {
-               font.setColor(LColor::special);
+               font.setColor(Color::special);
                pi.pain.text(x, y, char_type('|'), font);
                break;
        }
        case END_OF_SENTENCE:
        {
-               font.setColor(LColor::special);
+               font.setColor(Color::special);
                pi.pain.text(x, y, char_type('.'), font);
                break;
        }
        case LDOTS:
        {
-               font.setColor(LColor::special);
+               font.setColor(Color::special);
                 string ell = ". . . ";
                 docstring dell(ell.begin(), ell.end());
                pi.pain.text(x, y, dell, font);
@@ -114,7 +114,7 @@ void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) const
                xp[2] = ox + w; yp[2] = y - h/2;
                xp[3] = ox;     yp[3] = y;
 
-               pi.pain.lines(xp, yp, 4, LColor::special);
+               pi.pain.lines(xp, yp, 4, Color::special);
                break;
        }
        }
index 92ba102555ae4b7931c7f9e7d77cd6a5ff3004e2..6596396c35a266af095921714a323b1cd8a9b959 100644 (file)
@@ -33,7 +33,7 @@
 #include "gettext.h"
 #include "Language.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "lyx_cb.h"
 #include "Lexer.h"
 #include "MetricsInfo.h"
@@ -3096,7 +3096,7 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
                                int const w = tabular.getWidthOfColumn(cell);
                                if (i >= cs && i <= ce && j >= rs && j <= re)
                                        pi.pain.fillRectangle(xx, y, w, h,
-                                                             LColor::selection);
+                                                             Color::selection);
                                xx += w;
                        }
                        y += h;
@@ -3113,12 +3113,12 @@ void InsetTabular::drawCellLines(Painter & pain, int x, int y,
 {
        int x2 = x + tabular.getWidthOfColumn(cell);
        bool on_off = false;
-       LColor::color col = LColor::tabularline;
-       LColor::color onoffcol = LColor::tabularonoffline;
+       Color::color col = Color::tabularline;
+       Color::color onoffcol = Color::tabularonoffline;
 
        if (erased) {
-               col = LColor::strikeout;
-               onoffcol = LColor::strikeout;
+               col = Color::strikeout;
+               onoffcol = Color::strikeout;
        }
 
        if (!tabular.topAlreadyDrawn(cell)) {
index 4aa3088c389f480aec8d910faa4bf7e6f0a761ca..f9b90bc682d5bfb48bfb24310dd88eb546939a55 100644 (file)
@@ -25,7 +25,7 @@
 #include "FuncRequest.h"
 #include "gettext.h"
 #include "Intl.h"
-#include "LColor.h"
+#include "Color.h"
 #include "lyxfind.h"
 #include "Lexer.h"
 #include "LyXRC.h"
@@ -77,7 +77,7 @@ int InsetText::border_ = 2;
 
 
 InsetText::InsetText(BufferParams const & bp)
-       : drawFrame_(false), frame_color_(LColor::insetframe)
+       : drawFrame_(false), frame_color_(Color::insetframe)
 {
        paragraphs().push_back(Paragraph());
        paragraphs().back().layout(bp.getLyXTextClass().defaultLayout());
@@ -393,13 +393,13 @@ void InsetText::setDrawFrame(bool flag)
 }
 
 
-LColor_color InsetText::frameColor() const
+Color_color InsetText::frameColor() const
 {
-       return LColor::color(frame_color_);
+       return Color::color(frame_color_);
 }
 
 
-void InsetText::setFrameColor(LColor_color col)
+void InsetText::setFrameColor(Color_color col)
 {
        frame_color_ = col;
 }
index cac2851396bf56e57e04807eebfc08270282a2fe..83eef5c8e6635df6301678150c917eab8852d340 100644 (file)
@@ -29,7 +29,7 @@ class BufferParams;
 class BufferView;
 class CursorSlice;
 class Dimension;
-class LColor_color;
+class Color_color;
 class ParagraphList;
 
 
@@ -89,9 +89,9 @@ public:
        ///
        void setDrawFrame(bool);
        ///
-       LColor_color frameColor() const;
+       Color_color frameColor() const;
        ///
-       void setFrameColor(LColor_color);
+       void setFrameColor(Color_color);
        ///
        bool showInsetDialog(BufferView *) const;
        ///
@@ -150,7 +150,7 @@ private:
 
        ///
        bool drawFrame_;
-       /** We store the LColor::color value as an int to get LColor.h out
+       /** We store the Color::color value as an int to get Color.h out
         *  of the header file.
         */
        int frame_color_;
index 04acc8a6f7d53e35d868d47e2897b28705b96a09..face6fab364bb5e161834429ce06a2fe6b7e4bf5 100644 (file)
@@ -42,7 +42,7 @@ InsetTheorem::InsetTheorem()
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::collapsable);
+       font.setColor(Color::collapsable);
        setLabelFont(font);
 #if 0
        setAutoCollapse(false);
index a1134fcbc9bcfb3a1cb785e097fbf78b934b024b..fb0c8dbe875b27cf7bd626abbcd368ca02631f88 100644 (file)
@@ -18,7 +18,7 @@
 #include "DispatchResult.h"
 #include "FuncRequest.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "LyXText.h"
 #include "MetricsInfo.h"
@@ -179,7 +179,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
        int d = 0;
 
        LyXFont font;
-       font.setColor(LColor::added_space);
+       font.setColor(Color::added_space);
        font.decSize();
        font.decSize();
        docstring const lab = label();
@@ -187,18 +187,18 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
 
        pi.pain.rectText(x + 2 * arrow_size + 5,
                         start + (end - start) / 2 + (a - d) / 2,
-                        lab, font, LColor::none, LColor::none);
+                        lab, font, Color::none, Color::none);
 
        // top arrow
-       pi.pain.line(x, ty1, midx, ty2, LColor::added_space);
-       pi.pain.line(midx, ty2, rightx, ty1, LColor::added_space);
+       pi.pain.line(x, ty1, midx, ty2, Color::added_space);
+       pi.pain.line(midx, ty2, rightx, ty1, Color::added_space);
 
        // bottom arrow
-       pi.pain.line(x, by1, midx, by2, LColor::added_space);
-       pi.pain.line(midx, by2, rightx, by1, LColor::added_space);
+       pi.pain.line(x, by1, midx, by2, Color::added_space);
+       pi.pain.line(midx, by2, rightx, by1, Color::added_space);
 
        // joining line
-       pi.pain.line(midx, ty2, midx, by2, LColor::added_space);
+       pi.pain.line(midx, ty2, midx, by2, Color::added_space);
 }
 
 
index b70f08b866b7a5506bc97b4a3d145be272928a9f..263c290e11b7170a3e63cec702e839ee7e4f75c6 100644 (file)
@@ -24,7 +24,7 @@
 #include "FuncStatus.h"
 #include "gettext.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "OutputParams.h"
 #include "Paragraph.h"
@@ -50,7 +50,7 @@ InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
        LyXFont font(LyXFont::ALL_SANE);
        font.decSize();
        font.decSize();
-       font.setColor(LColor::collapsable);
+       font.setColor(Color::collapsable);
        setLabelFont(font);
        params_.type = type;
        params_.width = LyXLength(50, LyXLength::PCW);
index b13afada17c904b203277fc515cb99b94bee97c8..cce32e334f61c8490c0d451729c56abeb8381992 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "RenderButton.h"
 
-#include "LColor.h"
+#include "Color.h"
 #include "MetricsInfo.h"
 
 #include "frontends/FontMetrics.h"
@@ -67,14 +67,14 @@ void RenderButton::draw(PainterInfo & pi, int x, int y) const
 {
        // Draw it as a box with the LaTeX text
        LyXFont font(LyXFont::ALL_SANE);
-       font.setColor(LColor::command);
+       font.setColor(Color::command);
        font.decSize();
 
        if (editable_) {
                pi.pain.buttonText(x + 2, y, text_, font, renderState());
        } else {
                pi.pain.rectText(x + 2, y, text_, font,
-                                LColor::commandbg, LColor::commandframe);
+                                Color::commandbg, Color::commandframe);
        }
 }
 
index 99f1d34023132bb166bea0947658258f14a6cbc4..3a5bc405c31d42b6d8061b1acaedbb9bf3ec4948 100644 (file)
@@ -15,7 +15,7 @@
 #include "insets/Inset.h"
 
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyX.h"
 #include "LyXRC.h"
 #include "MetricsInfo.h"
@@ -205,7 +205,7 @@ void RenderGraphic::draw(PainterInfo & pi, int x, int y) const
                                  y - dim_.asc,
                                  dim_.wid - 2 * InsetOld::TEXT_TO_INSET_OFFSET,
                                  dim_.asc + dim_.des,
-                                 LColor::foreground);
+                                 Color::foreground);
 
                // Print the file name.
                LyXFont msgFont = pi.base.font;
index 9a1836e9ae420addd68d15324f41911f2c9646d2..a7ecdbfcda5ad0edc232d2be42b4cf37b4cc2ca4 100644 (file)
@@ -16,7 +16,7 @@
 #include "BufferView.h"
 #include "Dimension.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyX.h"
 #include "LyXRC.h"
 #include "MetricsInfo.h"
@@ -160,7 +160,7 @@ void RenderPreview::draw(PainterInfo & pi, int x, int y) const
                                  y - dim_.asc,
                                  dim_.wid - 2 * offset,
                                  dim_.asc + dim_.des,
-                                 LColor::foreground);
+                                 Color::foreground);
 
                LyXFont font(pi.base.font);
                font.setFamily(LyXFont::SANS_FAMILY);
index 912bb258ba5e577c8dabf7039708430ba8a537b9..91195646f1b35bbf4749b832f68249369e374a48 100644 (file)
@@ -19,7 +19,7 @@
 #include "Cursor.h"
 #include "debug.h"
 #include "gettext.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Lexer.h"
 #include "OutputParams.h"
 
@@ -145,7 +145,7 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
 {
        // label
        LyXFont font = p.base.font;
-       font.setColor(LColor::math);
+       font.setColor(Color::math);
 
        PainterInfo pi(p.base.bv, p.pain);
        pi.base.style = LM_ST_TEXT;
@@ -155,9 +155,9 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
        int const w = dim_.wid - 2;
        int const h = dim_.height() - 2;
 
-       // LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too
-       pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg);
-       pi.pain.rectangle(x, a, w, h, LColor::mathframe);
+       // Color::mathbg used to be "AntiqueWhite" but is "linen" now, too
+       pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg);
+       pi.pain.rectangle(x, a, w, h, Color::mathframe);
 
 #ifdef WITH_WARNINGS
 #warning FIXME
index 2ff48888f771fc0aaba0674460a658a2098333e7..cac33db43548771e56b2e2e1d77aa6e3cc083adb 100644 (file)
@@ -14,7 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "support/std_ostream.h"
 #include "frontends/Painter.h"
@@ -50,7 +50,7 @@ bool InsetMathBoxed::metrics(MetricsInfo & mi, Dimension & dim) const
 void InsetMathBoxed::draw(PainterInfo & pi, int x, int y) const
 {
        pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
-               dim_.width() - 2, dim_.height() - 2, LColor::foreground);
+               dim_.width() - 2, dim_.height() - 2, Color::foreground);
        cell(0).draw(pi, x + 3, y);
        setPosCache(pi, x, y);
 }
index e096c7a3ce3bf6fff03e084d72b147a55fc72617..f7b18cdc3aae181509857473a2593e603422a878 100644 (file)
@@ -14,7 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 #include "MathSupport.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
@@ -63,7 +63,7 @@ bool InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const
 void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
 {
        LyXFont font = pi.base.font;
-       font.setColor(LColor::latex);
+       font.setColor(Color::latex);
        Dimension t = theFontMetrics(font).dimension('{');
        pi.pain.text(x, y, '{', font);
        cell(0).draw(pi, x + t.wid, y);
index c3358bfe34907c6c8e1d582df3a03ace9d103ca3..f237eb9c4fceb05a4eb28434fa17eba6c8be7698 100644 (file)
@@ -24,7 +24,7 @@ namespace lyx {
 using std::auto_ptr;
 using std::string;
 
-InsetMathColor::InsetMathColor(bool oldstyle, LColor_color const & color)
+InsetMathColor::InsetMathColor(bool oldstyle, Color_color const & color)
        : InsetMathNest(1), oldstyle_(oldstyle),
          color_(from_utf8(lcolor.getLaTeXName(color)))
 {}
@@ -54,7 +54,7 @@ bool InsetMathColor::metrics(MetricsInfo & mi, Dimension & dim) const
 
 void InsetMathColor::draw(PainterInfo & pi, int x, int y) const
 {
-       LColor_color origcol = pi.base.font.color();
+       Color_color origcol = pi.base.font.color();
        pi.base.font.setColor(lcolor.getFromLaTeXName(to_utf8(color_)));
        cell(0).draw(pi, x + 1, y);
        pi.base.font.setColor(origcol);
index 5d23261a077d522ddf2e78d277cd2fd550574696..1c15c8e07d265c05601f35872347b10f23d9728b 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef MATH_COLORINSET_H
 #define MATH_COLORINSET_H
 
-#include "LColor.h"
+#include "Color.h"
 
 #include "InsetMathNest.h"
 
@@ -25,7 +25,7 @@ class InsetMathColor : public InsetMathNest {
 public:
        /// Create a color inset from LyX color number
        explicit InsetMathColor(bool oldstyle,
-               LColor_color const & color = LColor::none);
+               Color_color const & color = Color::none);
        /// Create a color inset from LaTeX color name
        explicit InsetMathColor(bool oldstyle, docstring const & color);
        ///
index 5dded132b687f7d2ec0c5da8b3f5f222cb7a253d..70da736cf9f815412444c84ea753e9289bea09dc 100644 (file)
@@ -14,7 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "frontends/Painter.h"
 
 
@@ -56,7 +56,7 @@ void InsetMathDFrac::draw(PainterInfo & pi, int x, int y) const
        int m = x + dim_.wid / 2;
        cell(0).draw(pi, m - cell(0).width() / 2, y - cell(0).descent() - 2 - 5);
        cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent()  + 2 - 5);
-       pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, LColor::math);
+       pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, Color::math);
        setPosCache(pi, x, y);
 }
 
index 4eb91a8b97cdeab8edae0de21d05dec3809d2db2..642c9cd64ad2e18890746aafcde1f42800998b25 100644 (file)
@@ -13,7 +13,7 @@
 #include "InsetMathFBox.h"
 #include "MathData.h"
 #include "MathStream.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "support/std_ostream.h"
 #include "frontends/Painter.h"
@@ -56,7 +56,7 @@ bool InsetMathFBox::metrics(MetricsInfo & mi, Dimension & dim) const
 void InsetMathFBox::draw(PainterInfo & pi, int x, int y) const
 {
        pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
-               dim_.width() - 2, dim_.height() - 2, LColor::foreground);
+               dim_.width() - 2, dim_.height() - 2, Color::foreground);
        FontSetChanger dummy(pi.base, "textnormal");
        cell(0).draw(pi, x + 3, y);
        setPosCache(pi, x, y);
index 924cebe79cf423f323a3bd95367ddaa99c82650d..0237227f8e456b5e7461bbe02369644101dc2bba 100644 (file)
@@ -16,7 +16,7 @@
 #include "MathStream.h"
 #include "TextPainter.h"
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 #include "frontends/Painter.h"
 
 
@@ -86,7 +86,7 @@ void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const
                pi.pain.line(x + cell(0).width(), 
                                y + dim_.des - 2, 
                                x + cell(0).width() + 5, 
-                               y - dim_.asc + 2, LColor::math);
+                               y - dim_.asc + 2, Color::math);
        } else {
                cell(0).draw(pi, m - cell(0).width() / 2, 
                                y - cell(0).descent() - 2 - 5);
@@ -95,7 +95,7 @@ void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const
        }
        if (kind_ == FRAC || kind_ == OVER)
                pi.pain.line(x + 1, y - 5, 
-                               x + dim_.wid - 2, y - 5, LColor::math);
+                               x + dim_.wid - 2, y - 5, Color::math);
        drawMarkers(pi, x, y);
 }
 
index e77fe38fc6dd276fca4a7916d77eefe43700a382..5bd9b9302e9e6e321c1e4bae668e4dd816a2c65f 100644 (file)
@@ -14,7 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 #include "MathSupport.h"
-#include "LColor.h"
+#include "Color.h"
 #include "frontends/Painter.h"
 
 
@@ -54,7 +54,7 @@ void InsetMathFrameBox::draw(PainterInfo & pi, int x, int y) const
 {
        FontSetChanger dummy(pi.base, "textnormal");
        pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
-               dim_.width() - 2, dim_.height() - 2, LColor::foreground);
+               dim_.width() - 2, dim_.height() - 2, Color::foreground);
        x += 5;
 
        drawStrBlack(pi, x, y, from_ascii("["));
index afcf0cfa48928cbf6f45b1723c4624e9ff559edc..2d23ab4a20018a665cb6261a6e6b7f5790856fa2 100644 (file)
@@ -18,7 +18,7 @@
 #include "BufferView.h"
 #include "CutAndPaste.h"
 #include "FuncStatus.h"
-#include "LColor.h"
+#include "Color.h"
 #include "Cursor.h"
 #include "debug.h"
 #include "FuncRequest.h"
@@ -492,7 +492,7 @@ void InsetMathGrid::drawWithMargin(PainterInfo & pi, int x, int y,
                                - i * hlinesep() - hlinesep()/2 - rowsep()/2;
                        pi.pain.line(x + lmargin + 1, yy,
                                     x + dim_.width() - rmargin - 1, yy,
-                                    LColor::foreground);
+                                    Color::foreground);
                }
 
        for (col_type col = 0; col <= ncols(); ++col)
@@ -501,7 +501,7 @@ void InsetMathGrid::drawWithMargin(PainterInfo & pi, int x, int y,
                                - i * vlinesep() - vlinesep()/2 - colsep()/2;
                        pi.pain.line(xx, y - dim_.ascent() + 1,
                                     xx, y + dim_.descent() - 1,
-                                    LColor::foreground);
+                                    Color::foreground);
                }
        drawMarkers2(pi, x, y);
 }
index 1b963ac068762cc23022f0c2948ff93453a6eb1f..612e08d352f87843c7279952adf8052d22f36365 100644 (file)
@@ -33,7 +33,7 @@
 #include "BufferView.h"
 #include "CutAndPaste.h"
 #include "FuncStatus.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LaTeXFeatures.h"
 #include "Cursor.h"
 #include "debug.h"
@@ -1307,7 +1307,7 @@ void InsetMathHull::handleFont2(Cursor & cur, docstring const & arg)
        LyXFont font;
        bool b;
        bv_funcs::string2font(to_utf8(arg), font, b);
-       if (font.color() != LColor::inherit) {
+       if (font.color() != Color::inherit) {
                MathAtom at = MathAtom(new InsetMathColor(true, font.color()));
                cur.handleNest(at, 0);
        }
index 154af01e493ff96118d8ef424a253bb47eede339..ddafc5c270e031c7111dea93debd7db25f015998 100644 (file)
@@ -36,7 +36,7 @@
 #include "BufferView.h"
 #include "CutAndPaste.h"
 #include "FuncStatus.h"
-#include "LColor.h"
+#include "Color.h"
 #include "bufferview_funcs.h"
 #include "CoordCache.h"
 #include "Cursor.h"
@@ -213,7 +213,7 @@ void InsetMathNest::draw(PainterInfo & pi, int x, int y) const
 #if 0
        if (lock_)
                pi.pain.fillRectangle(x, y - ascent(), width(), height(),
-                                       LColor::mathlockbg);
+                                       Color::mathlockbg);
 #endif
        setPosCache(pi, x, y);
 }
@@ -245,7 +245,7 @@ void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
                int y1 = c.yo(bv) - c.ascent();
                int x2 = c.xo(bv) + c.pos2x(s2.pos());
                int y2 = c.yo(bv) + c.descent();
-               pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, LColor::selection);
+               pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, Color::selection);
        //lyxerr << "InsetMathNest::drawing selection 3: "
        //      << " x1: " << x1 << " x2: " << x2
        //      << " y1: " << y1 << " y2: " << y2 << endl;
@@ -257,7 +257,7 @@ void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
                                int y1 = c.yo(bv) - c.ascent();
                                int x2 = c.xo(bv) + c.width();
                                int y2 = c.yo(bv) + c.descent();
-                               pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, LColor::selection);
+                               pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, Color::selection);
                        }
                }
        }
@@ -409,7 +409,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
        LyXFont font;
        bool b;
        bv_funcs::string2font(to_utf8(arg), font, b);
-       if (font.color() != LColor::inherit) {
+       if (font.color() != Color::inherit) {
                MathAtom at = MathAtom(new InsetMathColor(true, font.color()));
                cur.handleNest(at, 0);
        }
index e4374dce2eed5a8c674621b83d3d7beddd6329b0..21ecfe9e508582817a40cd96a7c28e2fa8d67584 100644 (file)
@@ -14,7 +14,7 @@
 #include "MathStream.h"
 #include "MathStream.h"
 
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/Painter.h"
 
@@ -51,8 +51,8 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
        static int const arrow_size = 4;
 
        // We first draw the text and then an arrow
-       LColor_color const origcol = pi.base.font.color();
-       pi.base.font.setColor(LColor::special);
+       Color_color const origcol = pi.base.font.color();
+       pi.base.font.setColor(Color::special);
        cell(0).draw(pi, x + 1, y);
        pi.base.font.setColor(origcol);
 
@@ -79,15 +79,15 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
                int const y3 = y4 - arrow_size;
 
                // top arrow
-               pi.pain.line(x2, y1, x1, y2, LColor::added_space);
-               pi.pain.line(x2, y1, x3, y2, LColor::added_space);
+               pi.pain.line(x2, y1, x1, y2, Color::added_space);
+               pi.pain.line(x2, y1, x3, y2, Color::added_space);
 
                // bottom arrow
-               pi.pain.line(x2, y4, x1, y3, LColor::added_space);
-               pi.pain.line(x2, y4, x3, y3, LColor::added_space);
+               pi.pain.line(x2, y4, x1, y3, Color::added_space);
+               pi.pain.line(x2, y4, x3, y3, Color::added_space);
 
                // joining line
-               pi.pain.line(x2, y1, x2, y4, LColor::added_space);
+               pi.pain.line(x2, y1, x2, y4, Color::added_space);
        }
 
        if (kind_ == phantom || kind_ == hphantom) {
@@ -109,15 +109,15 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
                int const y3 = y2 + arrow_size;
 
                // left arrow
-               pi.pain.line(x1, y2, x2, y3, LColor::added_space);
-               pi.pain.line(x1, y2, x2, y1, LColor::added_space);
+               pi.pain.line(x1, y2, x2, y3, Color::added_space);
+               pi.pain.line(x1, y2, x2, y1, Color::added_space);
 
                // right arrow
-               pi.pain.line(x4, y2, x3, y3, LColor::added_space);
-               pi.pain.line(x4, y2, x3, y1, LColor::added_space);
+               pi.pain.line(x4, y2, x3, y3, Color::added_space);
+               pi.pain.line(x4, y2, x3, y1, Color::added_space);
 
                // joining line
-               pi.pain.line(x1, y2, x4, y2, LColor::added_space);
+               pi.pain.line(x1, y2, x4, y2, Color::added_space);
        }
 
        drawMarkers(pi, x, y);
index 324d804f6bd51c6f84bf976a6080c313cf37e381..9da52c7e65ab59ac68f3cd7b40cd98e1eb74b197 100644 (file)
@@ -15,7 +15,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 #include "Cursor.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/Painter.h"
 
@@ -68,7 +68,7 @@ void InsetMathRoot::draw(PainterInfo & pi, int x, int y) const
        xp[2] = x + w;             yp[2] = y + d;
        xp[3] = x + w - 2;         yp[3] = y + (d - a)/2 + 2;
        xp[4] = x + w - 5;         yp[4] = y + (d - a)/2 + 4;
-       pi.pain.lines(xp, yp, 5, LColor::math);
+       pi.pain.lines(xp, yp, 5, Color::math);
        drawMarkers(pi, x, y);
 }
 
index 8d3df0930b28499ebd585483ec25fcbeec27948e..144a6c534e540f8e78312126d0c12155a41d8af7 100644 (file)
@@ -15,7 +15,7 @@
 #include "MathStream.h"
 
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/Painter.h"
 
@@ -109,7 +109,7 @@ void InsetMathSpace::draw(PainterInfo & pi, int x, int y) const
        xp[2] = x + w - 2;  yp[2] = y;
        xp[3] = x + w - 2;  yp[3] = y - 3;
 
-       pi.pain.lines(xp, yp, 4, (space_ < 3) ? LColor::latex : LColor::math);
+       pi.pain.lines(xp, yp, 4, (space_ < 3) ? Color::latex : Color::math);
 }
 
 
index 55d773c946df7648f34703ff8615e240e4b8f2c7..9df6fca71b0b1d2077ca0709c57d23e2d33e33a4 100644 (file)
@@ -14,7 +14,7 @@
 #include "MathData.h"
 #include "MathStream.h"
 #include "TextPainter.h"
-#include "LColor.h"
+#include "Color.h"
 #include "frontends/Painter.h"
 
 
@@ -59,7 +59,7 @@ void InsetMathSqrt::draw(PainterInfo & pi, int x, int y) const
        xp[1] = x + 8;            yp[1] = y - a + 1;
        xp[2] = x + 5;            yp[2] = y + d - 1;
        xp[3] = x;                yp[3] = y + (d - a)/2;
-       pi.pain.lines(xp, yp, 4, LColor::math);
+       pi.pain.lines(xp, yp, 4, Color::math);
        drawMarkers(pi, x, y);
 }
 
index 84ed2b8157f686ee03e00f57124b910060c26590..92019717a75f4511a062d3ffb7c4d86f6c8faa23 100644 (file)
@@ -16,7 +16,7 @@
 #include "MathStream.h"
 
 #include "LaTeXFeatures.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/Painter.h"
 
@@ -61,7 +61,7 @@ void InsetMathTFrac::draw(PainterInfo & pi, int x, int y) const
        int m = x + dim_.wid / 2;
        cell(0).draw(pi, m - cell(0).width() / 2, y - cell(0).descent() - 2 - 5);
        cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent()  + 2 - 5);
-       pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, LColor::math);
+       pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, Color::math);
        setPosCache(pi, x, y);
 }
 
index 1853c2e4d946ddee65b044afec0aea2306c88431..5520ca47d5a909755dd589e70d005af4f32c8f25 100644 (file)
@@ -133,7 +133,7 @@ void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const
                pi.pain.text(x, y, "X");
                MathData const & s = sourceCell();
                MathData const & t = targetCell();
-               pi.pain.line(s.xm(), s.ym(), t.xm(), t.ym(), LColor::math);
+               pi.pain.line(s.xm(), s.ym(), t.xm(), t.ym(), Color::math);
                cell(1).draw(pi, (s.xm() + t.xm())/2, (s.ym() + t.ym())/2);
 
        }
index a0e9222c828a43626fe9f7e7613c37cd04e4d07c..806e61e89dfce60c5e912efe00638e3e19ba4597 100644 (file)
@@ -23,7 +23,7 @@
 #include "Buffer.h"
 #include "Cursor.h"
 #include "debug.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
@@ -299,7 +299,7 @@ void MathData::draw(PainterInfo & pi, int x, int y) const
        setXY(bv, x, y);
 
        if (empty()) {
-               pi.pain.rectangle(x, y - ascent(), width(), height(), LColor::mathline);
+               pi.pain.rectangle(x, y - ascent(), width(), height(), Color::mathline);
                return;
        }
 
index 024c5d4f126e5c861eb067e8db325d6500b4d97f..5650b4012fff701a61af964c3b079cbff10e8bb5 100644 (file)
@@ -19,7 +19,7 @@
 #include "debug.h"
 #include "gettext.h"
 #include "Lexer.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/FontMetrics.h"
 #include "frontends/Painter.h"
@@ -143,7 +143,7 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
 
        // label
        LyXFont font = p.base.font;
-       font.setColor(LColor::math);
+       font.setColor(Color::math);
 
        PainterInfo pi(p.base.bv, p.pain);
        pi.base.style = LM_ST_TEXT;
@@ -153,10 +153,10 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
        int const w = dim_.wid - 2;
        int const h = dim_.height() - 2;
 
-       // LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too
+       // Color::mathbg used to be "AntiqueWhite" but is "linen" now, too
        // the next line would overwrite the selection!
-       //pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg);
-       pi.pain.rectangle(x, a, w, h, LColor::mathframe);
+       //pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg);
+       pi.pain.rectangle(x, a, w, h, Color::mathframe);
 
 #ifdef WITH_WARNINGS
 #warning FIXME
@@ -175,10 +175,10 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
        int const w1 = cell(1).width();
        cell(0).draw(pi, x + 2, y + 1);
        pi.pain.rectangle(x, y - dim_.ascent() + 3,
-               w0 + 4, dim_.height() - 6, LColor::mathline);
+               w0 + 4, dim_.height() - 6, Color::mathline);
        cell(1).draw(pi, x + 8 + w0, y + 1);
        pi.pain.rectangle(x + w0 + 6, y - dim_.ascent() + 3,
-               w1 + 4, dim_.height() - 6, LColor::mathline);
+               w1 + 4, dim_.height() - 6, Color::mathline);
        
        if (lockMacro)
                MacroTable::globalMacros().get(name_).unlock();
index a381d66304144b6c6ef9830d22cc0bf23b1f7430..61030d8953a7e2205c85674158aa8d15ddb098be 100644 (file)
@@ -18,7 +18,7 @@
 #include "MathParser.h"
 
 #include "debug.h"
-#include "LColor.h"
+#include "Color.h"
 
 #include "frontends/FontLoader.h"
 #include "frontends/FontMetrics.h"
@@ -410,7 +410,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
 {
        if (name == ".") {
                pi.pain.line(x + w/2, y, x + w/2, y + h,
-                         LColor::cursor, Painter::line_onoffdash);
+                         Color::cursor, Painter::line_onoffdash);
                return;
        }
 
@@ -452,7 +452,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
                        pi.pain.line(
                                int(x + xx + 0.5), int(y + yy + 0.5),
                                int(x + x2 + 0.5), int(y + y2 + 0.5),
-                               LColor::math);
+                               Color::math);
                } else {
                        int xp[32];
                        int yp[32];
@@ -469,7 +469,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
                                yp[j] = int(y + yy + 0.5);
                                //  lyxerr << "P[" << j ' ' << xx << ' ' << yy << ' ' << x << ' ' << y << ']';
                        }
-                       pi.pain.lines(xp, yp, n, LColor::math);
+                       pi.pain.lines(xp, yp, n, Color::math);
                }
        }
 }
@@ -478,7 +478,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
 void drawStrRed(PainterInfo & pi, int x, int y, docstring const & str)
 {
        LyXFont f = pi.base.font;
-       f.setColor(LColor::latex);
+       f.setColor(Color::latex);
        pi.pain.text(x, y, str, f);
 }
 
@@ -486,7 +486,7 @@ void drawStrRed(PainterInfo & pi, int x, int y, docstring const & str)
 void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & str)
 {
        LyXFont f = pi.base.font;
-       f.setColor(LColor::foreground);
+       f.setColor(Color::foreground);
        pi.pain.text(x, y, str, f);
 }
 
@@ -504,7 +504,7 @@ struct fontinfo {
        LyXFont::FONT_FAMILY family_;
        LyXFont::FONT_SERIES series_;
        LyXFont::FONT_SHAPE  shape_;
-       LColor::color        color_;
+       Color::color        color_;
 };
 
 
@@ -518,87 +518,87 @@ LyXFont::FONT_SHAPE  const inh_shape  = LyXFont::INHERIT_SHAPE;
 fontinfo fontinfos[] = {
        // math fonts
        {"mathnormal",    LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
-                         LyXFont::ITALIC_SHAPE, LColor::math},
+                         LyXFont::ITALIC_SHAPE, Color::math},
        {"mathbf",        inh_family, LyXFont::BOLD_SERIES,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"mathcal",       LyXFont::CMSY_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"mathfrak",      LyXFont::EUFRAK_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"mathrm",        LyXFont::ROMAN_FAMILY, inh_series,
-                         LyXFont::UP_SHAPE, LColor::math},
+                         LyXFont::UP_SHAPE, Color::math},
        {"mathsf",        LyXFont::SANS_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"mathbb",        LyXFont::MSB_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"mathtt",        LyXFont::TYPEWRITER_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"mathit",        inh_family, inh_series,
-                         LyXFont::ITALIC_SHAPE, LColor::math},
+                         LyXFont::ITALIC_SHAPE, Color::math},
        {"cmex",          LyXFont::CMEX_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"cmm",           LyXFont::CMM_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"cmr",           LyXFont::CMR_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"cmsy",          LyXFont::CMSY_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"eufrak",        LyXFont::EUFRAK_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"msa",           LyXFont::MSA_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"msb",           LyXFont::MSB_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"wasy",          LyXFont::WASY_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, Color::none},
        {"esint",         LyXFont::ESINT_FAMILY, inh_series,
-                         inh_shape, LColor::none},
+                         inh_shape, Color::none},
 
        // Text fonts
        {"text",          inh_family, inh_series,
-                         inh_shape, LColor::foreground},
+                         inh_shape, Color::foreground},
        {"textbf",        inh_family, LyXFont::BOLD_SERIES,
-                         inh_shape, LColor::foreground},
+                         inh_shape, Color::foreground},
        {"textit",        inh_family, inh_series,
-                         LyXFont::ITALIC_SHAPE, LColor::foreground},
+                         LyXFont::ITALIC_SHAPE, Color::foreground},
        {"textmd",        inh_family, LyXFont::MEDIUM_SERIES,
-                         inh_shape, LColor::foreground},
+                         inh_shape, Color::foreground},
        {"textnormal",    inh_family, inh_series,
-                         LyXFont::UP_SHAPE, LColor::foreground},
+                         LyXFont::UP_SHAPE, Color::foreground},
        {"textrm",        LyXFont::ROMAN_FAMILY,
-                         inh_series, LyXFont::UP_SHAPE,LColor::foreground},
+                         inh_series, LyXFont::UP_SHAPE,Color::foreground},
        {"textsc",        inh_family, inh_series,
-                         LyXFont::SMALLCAPS_SHAPE, LColor::foreground},
+                         LyXFont::SMALLCAPS_SHAPE, Color::foreground},
        {"textsf",        LyXFont::SANS_FAMILY, inh_series,
-                         inh_shape, LColor::foreground},
+                         inh_shape, Color::foreground},
        {"textsl",        inh_family, inh_series,
-                         LyXFont::SLANTED_SHAPE, LColor::foreground},
+                         LyXFont::SLANTED_SHAPE, Color::foreground},
        {"texttt",        LyXFont::TYPEWRITER_FAMILY, inh_series,
-                         inh_shape, LColor::foreground},
+                         inh_shape, Color::foreground},
        {"textup",        inh_family, inh_series,
-                         LyXFont::UP_SHAPE, LColor::foreground},
+                         LyXFont::UP_SHAPE, Color::foreground},
 
        // TIPA support
        {"textipa",       inh_family, inh_series,
-                         inh_shape, LColor::foreground},
+                         inh_shape, Color::foreground},
 
        // LyX internal usage
        {"lyxtex",        inh_family, inh_series,
-                         LyXFont::UP_SHAPE, LColor::latex},
+                         LyXFont::UP_SHAPE, Color::latex},
        {"lyxsymbol",     LyXFont::SYMBOL_FAMILY, inh_series,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"lyxboldsymbol", LyXFont::SYMBOL_FAMILY, LyXFont::BOLD_SERIES,
-                         inh_shape, LColor::math},
+                         inh_shape, Color::math},
        {"lyxblacktext",  LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
-                         LyXFont::UP_SHAPE, LColor::foreground},
+                         LyXFont::UP_SHAPE, Color::foreground},
        {"lyxnochange",   inh_family, inh_series,
-                         inh_shape, LColor::foreground},
+                         inh_shape, Color::foreground},
        {"lyxfakebb",     LyXFont::TYPEWRITER_FAMILY, LyXFont::BOLD_SERIES,
-                         LyXFont::UP_SHAPE, LColor::math},
+                         LyXFont::UP_SHAPE, Color::math},
        {"lyxfakecal",    LyXFont::SANS_FAMILY, LyXFont::MEDIUM_SERIES,
-                         LyXFont::ITALIC_SHAPE, LColor::math},
+                         LyXFont::ITALIC_SHAPE, Color::math},
        {"lyxfakefrak",   LyXFont::ROMAN_FAMILY, LyXFont::BOLD_SERIES,
-                         LyXFont::ITALIC_SHAPE, LColor::math}
+                         LyXFont::ITALIC_SHAPE, Color::math}
 };
 
 
@@ -673,7 +673,7 @@ void augmentFont(LyXFont & font, docstring const & name)
                font.setSeries(info->series_);
        if (info->shape_ != inh_shape)
                font.setShape(info->shape_);
-       if (info->color_ != LColor::none)
+       if (info->color_ != Color::none)
                font.setColor(info->color_);
 }
 
index 8b7df5fad0415f371fabacd89dd73fe39d8f2480..ba4c1205863d5f16140eccc7c65ca0f01d1180ea 100644 (file)
@@ -22,7 +22,7 @@
 #include "Encoding.h"
 #include "gettext.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXRC.h"
 #include "Row.h"
 #include "MetricsInfo.h"
@@ -223,10 +223,10 @@ void RowPainter::paintInset(pos_type const pos, LyXFont const & font)
        int const x2 = x1 + dim.wid;
        int const y1 = yo_ + dim.des;
        int const y2 = yo_ - dim.asc;
-       pi.pain.line(x1, y1, x1, y2, LColor::green);
-       pi.pain.line(x1, y1, x2, y1, LColor::green);
-       pi.pain.line(x2, y1, x2, y2, LColor::green);
-       pi.pain.line(x1, y2, x2, y2, LColor::green);
+       pi.pain.line(x1, y1, x1, y2, Color::green);
+       pi.pain.line(x1, y1, x2, y1, Color::green);
+       pi.pain.line(x2, y1, x2, y2, Color::green);
+       pi.pain.line(x1, y2, x2, y2, Color::green);
 #endif
 }
 
@@ -368,9 +368,9 @@ void RowPainter::paintChars(pos_type & vpos, LyXFont const & font,
        if (prev_change != Change::UNCHANGED) {
                LyXFont copy(font);
                if (prev_change == Change::DELETED) {
-                       copy.setColor(LColor::strikeout);
+                       copy.setColor(Color::strikeout);
                } else if (prev_change == Change::INSERTED) {
-                       copy.setColor(LColor::newtext);
+                       copy.setColor(Color::newtext);
                }
                x_ += pain_.text(int(x_), yo_, s, copy);
        } else {
@@ -389,7 +389,7 @@ void RowPainter::paintForeignMark(double orig_x, LyXFont const & font, int desc)
                return;
 
        int const y = yo_ + 1 + desc;
-       pain_.line(int(orig_x), y, int(x_), y, LColor::language);
+       pain_.line(int(orig_x), y, int(x_), y, Color::language);
 }
 
 
@@ -449,7 +449,7 @@ void RowPainter::paintChangeBar()
                ? row_.ascent()
                : row_.height();
 
-       pain_.fillRectangle(5, yo_ - row_.ascent(), 3, height, LColor::changebar);
+       pain_.fillRectangle(5, yo_ - row_.ascent(), 3, height, Color::changebar);
 }
 
 
@@ -463,8 +463,8 @@ void RowPainter::paintAppendix()
        if (par_.params().startOfAppendix())
                y += 2 * defaultRowHeight();
 
-       pain_.line(1, y, 1, yo_ + row_.height(), LColor::appendix);
-       pain_.line(width_ - 2, y, width_ - 2, yo_ + row_.height(), LColor::appendix);
+       pain_.line(1, y, 1, yo_ + row_.height(), Color::appendix);
+       pain_.line(width_ - 2, y, width_ - 2, yo_ + row_.height(), Color::appendix);
 }
 
 
@@ -501,12 +501,12 @@ void RowPainter::paintDepthBar()
                int const starty = yo_ - row_.ascent();
                int const h =  row_.height() - 1 - (i - next_depth - 1) * 3;
 
-               pain_.line(x, starty, x, starty + h, LColor::depthbar);
+               pain_.line(x, starty, x, starty + h, Color::depthbar);
 
                if (i > prev_depth)
-                       pain_.fillRectangle(x, starty, w, 2, LColor::depthbar);
+                       pain_.fillRectangle(x, starty, w, 2, Color::depthbar);
                if (i > next_depth)
-                       pain_.fillRectangle(x, starty + h, w, 2, LColor::depthbar);
+                       pain_.fillRectangle(x, starty + h, w, 2, Color::depthbar);
        }
 }
 
@@ -514,7 +514,7 @@ void RowPainter::paintDepthBar()
 int RowPainter::paintAppendixStart(int y)
 {
        LyXFont pb_font;
-       pb_font.setColor(LColor::appendix);
+       pb_font.setColor(Color::appendix);
        pb_font.decSize();
 
        int w = 0;
@@ -527,10 +527,10 @@ int RowPainter::paintAppendixStart(int y)
        int const text_start = int(xo_ + (width_ - w) / 2);
        int const text_end = text_start + w;
 
-       pain_.rectText(text_start, y + d, label, pb_font, LColor::none, LColor::none);
+       pain_.rectText(text_start, y + d, label, pb_font, Color::none, Color::none);
 
-       pain_.line(int(xo_ + 1), y, text_start, y, LColor::appendix);
-       pain_.line(text_end, y, int(xo_ + width_ - 2), y, LColor::appendix);
+       pain_.line(int(xo_ + 1), y, text_start, y, Color::appendix);
+       pain_.line(text_end, y, int(xo_ + width_ - 2), y, Color::appendix);
 
        return 3 * defaultRowHeight();
 }
@@ -669,7 +669,7 @@ void RowPainter::paintLast()
        if (par_.isInserted(par_.size()) || par_.isDeleted(par_.size())) {
                FontMetrics const & fm = theFontMetrics(bv_.buffer()->params().getFont());
                int const length = fm.maxAscent() / 2;
-               LColor::color col = par_.isInserted(par_.size()) ? LColor::newtext : LColor::strikeout;
+               Color::color col = par_.isInserted(par_.size()) ? Color::newtext : Color::strikeout;
                
                pain_.line(int(x_) + 1, yo_ + 2, int(x_) + 1, yo_ + 2 - length, col,
                           Painter::line_solid, Painter::line_thick);
@@ -692,9 +692,9 @@ void RowPainter::paintLast()
                        x += (size - width_ + row_.width() + 1) * (is_rtl ? -1 : 1);
 
                if (endlabel == END_LABEL_BOX)
-                       pain_.rectangle(x, y, size, size, LColor::eolmarker);
+                       pain_.rectangle(x, y, size, size, Color::eolmarker);
                else
-                       pain_.fillRectangle(x, y, size, size, LColor::eolmarker);
+                       pain_.fillRectangle(x, y, size, size, Color::eolmarker);
                break;
        }
 
@@ -779,7 +779,7 @@ void RowPainter::paintText()
                                = theFontMetrics(bv_.buffer()->params().getFont());
                        int const middle = yo_ - fm.maxAscent() / 3;
                        pain_.line(last_strikeout_x, middle, int(x_), middle,
-                               LColor::strikeout, Painter::line_solid, Painter::line_thin);
+                               Color::strikeout, Painter::line_solid, Painter::line_thin);
                        running_strikeout = false;
                }
 
@@ -797,23 +797,23 @@ void RowPainter::paintText()
                        int const y0 = yo_;
                        int const y1 = y0 - defaultRowHeight() / 2;
 
-                       pain_.line(int(x_), y1, int(x_), y0, LColor::added_space);
+                       pain_.line(int(x_), y1, int(x_), y0, Color::added_space);
 
                        if (par_.hfillExpansion(row_, pos)) {
                                int const y2 = (y0 + y1) / 2;
 
                                if (pos >= body_pos) {
                                        pain_.line(int(x_), y2, int(x_ + hfill_), y2,
-                                                 LColor::added_space,
+                                                 Color::added_space,
                                                  Painter::line_onoffdash);
                                        x_ += hfill_;
                                } else {
                                        pain_.line(int(x_), y2, int(x_ + label_hfill_), y2,
-                                                 LColor::added_space,
+                                                 Color::added_space,
                                                  Painter::line_onoffdash);
                                        x_ += label_hfill_;
                                }
-                               pain_.line(int(x_), y1, int(x_), y0, LColor::added_space);
+                               pain_.line(int(x_), y1, int(x_), y0, Color::added_space);
                        }
                        x_ += 2;
                        ++vpos;
@@ -834,7 +834,7 @@ void RowPainter::paintText()
                        = theFontMetrics(bv_.buffer()->params().getFont());
                int const middle = yo_ - fm.maxAscent() / 3;
                pain_.line(last_strikeout_x, middle, int(x_), middle,
-                       LColor::strikeout, Painter::line_solid, Painter::line_thin);
+                       Color::strikeout, Painter::line_solid, Painter::line_thin);
                running_strikeout = false;
        }
 }
@@ -1042,12 +1042,12 @@ void paintText(BufferView & bv,
        // and grey out above (should not happen later)
 //     lyxerr << "par ascent: " << text.getPar(vi.p1).ascent() << endl;
        if (vi.y1 > 0 && vi.update_strategy != SingleParUpdate)
-               pain.fillRectangle(0, 0, bv.workWidth(), vi.y1, LColor::bottomarea);
+               pain.fillRectangle(0, 0, bv.workWidth(), vi.y1, Color::bottomarea);
 
        // and possibly grey out below
 //     lyxerr << "par descent: " << text.getPar(vi.p1).ascent() << endl;
        if (vi.y2 < bv.workHeight() && vi.update_strategy != SingleParUpdate)
-               pain.fillRectangle(0, vi.y2, bv.workWidth(), bv.workHeight() - vi.y2, LColor::bottomarea);
+               pain.fillRectangle(0, vi.y2, bv.workWidth(), bv.workHeight() - vi.y2, Color::bottomarea);
 }
 
 
index 3b54a25a054534ea0561dce1493ee148a4370682..9a5471054d22fb5f2b50685dfde0b2fda58e8e8e 100644 (file)
@@ -37,7 +37,7 @@
 #include "FontIterator.h"
 #include "gettext.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXLength.h"
 #include "Lexer.h"
 #include "LyXRC.h"
@@ -573,9 +573,9 @@ int LyXText::leftMargin(Buffer const & buffer, int max_width,
 }
 
 
-LColor_color LyXText::backgroundColor() const
+Color_color LyXText::backgroundColor() const
 {
-       return LColor_color(LColor::color(background_color_));
+       return Color_color(Color::color(background_color_));
 }
 
 
@@ -1440,7 +1440,7 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
                // paint only one rectangle
                int const b( !isRTL(*bv.buffer(), par1) ? x + x1 : x + X1 );
                int const w( !isRTL(*bv.buffer(), par1) ? X2 - x1 : x2 - X1 );
-               pi.pain.fillRectangle(b, y1, w, y2 - y1, LColor::selection);
+               pi.pain.fillRectangle(b, y1, w, y2 - y1, Color::selection);
                return;
        }
 
@@ -1450,13 +1450,13 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
 
        // paint upper rectangle
        pi.pain.fillRectangle(x + x1, y1, x2 - x1, y2 - y1,
-                                     LColor::selection);
+                                     Color::selection);
        // paint bottom rectangle
        pi.pain.fillRectangle(x + X1, Y1, X2 - X1, Y2 - Y1,
-                                     LColor::selection);
+                                     Color::selection);
        // paint center rectangle
        pi.pain.fillRectangle(x, y2, tm.width(),
-                             Y1 - y2, LColor::selection);
+                             Y1 - y2, Color::selection);
 }
 
 
index 32de7f8a6e8fa3cd9e0a6be2bdbe05375ec593ed..8ee99e8c7c7bf6fe5d9af546ee883c17d56d2898 100644 (file)
@@ -37,7 +37,7 @@
 #include "FuncRequest.h"
 #include "gettext.h"
 #include "Language.h"
-#include "LColor.h"
+#include "Color.h"
 #include "LyXFunc.h"
 #include "LyXRC.h"
 #include "Row.h"
@@ -75,7 +75,7 @@ using std::min;
 
 LyXText::LyXText()
        : current_font(LyXFont::ALL_INHERIT),
-         background_color_(LColor::background),
+         background_color_(Color::background),
          autoBreakRows_(false)
 {}