]> git.lyx.org Git - lyx.git/blobdiff - src/LColor.h
tostr -> convert and some bformat work
[lyx.git] / src / LColor.h
index 8c84cd6956a7af0d7236a7c32d96570e348bfecd..700bb66abaf0ac9269b2c32f07fc217ea39281f6 100644 (file)
 #include <string>
 
 /**
-  This is a stateless class.
-
-  It has one basic purposes:
-  To serve as a color-namespace container (the Color enum).
-
-
-  */
+ * This is a stateless class.
+ *
+ * It has one basic purposes:
+ * To serve as a color-namespace container (the Color enum).
+ */
 /**
  * \class LColor
  *
@@ -191,13 +189,19 @@ public:
        ///
        ~LColor();
        ///
-       void operator=(LColor const &);
+       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.
        std::string const getGUIName(LColor::color c) const;
 
@@ -228,15 +232,15 @@ private:
  *  passed as a function argument without having to expose LColor.h.
  */
 class LColor_color {
-        LColor::color val_;
+       LColor::color val_;
 public:
-        /** The default constructor is nasty,
+       /** 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_; }
+       operator LColor::color() const{ return val_; }
 };