]> git.lyx.org Git - lyx.git/blobdiff - src/LColor.h
Fix crash when entering unhandled math objects in toolbar
[lyx.git] / src / LColor.h
index 57e29fc8e418b82e3d787b29a3c037dea8924c40..eae06f550042cdf224ebc3027be8dcb4d022e9af 100644 (file)
@@ -18,6 +18,7 @@
 #include <map>
 
 #include "LString.h"
+#include <boost/utility.hpp>
 
 /**
   This is a stateless class. 
@@ -31,8 +32,7 @@
   - A logical color, such as no color, inherit, math
 
   */
-
-class LColor {
+class LColor : public noncopyable {
 public:
        /// Names of colors, including all logical colors
        enum color {
@@ -55,7 +55,7 @@ public:
                ///
                yellow,
 
-               /// Needed interface colors
+               // Needed interface colors
 
                /// Background color
                background,
@@ -78,6 +78,8 @@ public:
 
                /// Color for the depth bars in the margin
                depthbar,
+               /// Color for marking foreign language words
+               language,
 
                /// Text color for command insets
                command,
@@ -159,7 +161,7 @@ public:
                /// Color used for bottom background
                buttonbg,
 
-               /// Logical attributes
+               // Logical attributes
 
                /// Color is inherited
                inherit,
@@ -171,17 +173,19 @@ public:
        LColor();
        ///
        void setColor(LColor::color col, string const & x11name);
+       ///
+       bool setColor(string const & lyxname, string const & x11name);
        /// Get GUI name of color
-       string getGUIName(LColor::color c) const;
+       string const getGUIName(LColor::color c) const;
 
        /// Get X11 name of color
-       string getX11Name(LColor::color c) const;
+       string const getX11Name(LColor::color c) const;
 
        /// Get LaTeX name of color
-       string getLaTeXName(LColor::color c) const;
+       string const getLaTeXName(LColor::color c) const;
 
        /// Get LyX name of color
-       string getLyXName(LColor::color c) const;
+       string const getLyXName(LColor::color c) const;
        ///
        LColor::color getFromGUIName(string const & guiname) const;
        ///
@@ -189,9 +193,13 @@ public:
 private:
        ///
        struct information {
+               ///
                string guiname;
+               ///
                string latexname;
+               ///
                string x11name;
+               ///
                string lyxname;
        };
 
@@ -202,10 +210,11 @@ private:
 
        ///
        typedef std::map<LColor::color, information> InfoTab;
-
+       ///
        InfoTab infotab;
 };
 
+///
 extern LColor lcolor;
 
 #endif