]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Color.h
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / Color.h
index 6216e5cefd127f18d69eae46b04a351745e55211..498f3e9e9ba3c5aa0c2b4a47598461b8471f93b6 100644 (file)
 #ifndef COLOR_H
 #define COLOR_H
 
+#include <string>
 
-#include "support/std_string.h"
-
-
-class EnumLColor;
+class LColor_color;
 
+namespace lyx {
+namespace frontend {
 
 /** Given col, fills r, g, b in the range 0-255.
     The function returns true if successful.
     It returns false on failure and sets r, g, b to 0. */
-bool getRGBColor(EnumLColor col,
+bool getRGBColor(LColor_color col,
                 unsigned int & r, unsigned int & g, unsigned int & b);
 
 struct RGBColor;
 /// returns a string of form #rrggbb, given an RGBColor struct
-string const X11hexname(RGBColor const & col);
+std::string const X11hexname(RGBColor const & col);
 
 struct HSVColor {
        double h;
@@ -52,16 +52,17 @@ struct RGBColor {
                : r(red), g(green), b(blue) {}
        RGBColor(HSVColor const &);
        /// \param x11hexname is of the form "#ffa071"
-       RGBColor(string const & x11hexname);
+       RGBColor(std::string const & x11hexname);
 };
 
 struct NamedColor : public RGBColor {
-       string name;
+       std::string lyxname;
+       std::string guiname;
        NamedColor() : RGBColor() {}
-       NamedColor(string const & n, RGBColor const & c)
-               : RGBColor(c), name(n) {}
+       NamedColor(std::string const & lyx, std::string const & gui,
+                  RGBColor const & c)
+               : RGBColor(c), lyxname(lyx), guiname(gui) {}
        RGBColor const & color() const { return *this; }
-       string const & getname() const { return name; }
 };
 
 inline
@@ -77,4 +78,7 @@ bool operator!=(RGBColor const & c1, RGBColor const & c2)
        return !(c1 == c2);
 }
 
+} // namespace frontend
+} // namespace lyx
+
 #endif