]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/Color.h
try this for distinguishing inner and outer tabs
[lyx.git] / src / frontends / xforms / Color.h
index 768b6ef3c060288e9a61d65c5f3c5bc9342e0396..acd04527ecc52672c01de3fe087a72f4582f648a 100644 (file)
 #ifndef COLOR_H
 #define COLOR_H
 
-#include <utility> // for pair
-
 #ifdef __GNUG_
 #pragma interface
 #endif
 
 #include "LString.h"
 
-class HSVColor;
-class RGBColor;
+struct RGBColor;
 
 struct HSVColor {
        double h;
        double s;
        double v;
        HSVColor() : h(0.0), s(0.0), v(0.0) {}
-       HSVColor(double hue, double sat, double val) : h(hue), s(sat), v(val) {}
-       HSVColor( RGBColor const & );
+       HSVColor(double hue, double sat, double val)
+               : h(hue), s(sat), v(val) {}
+       HSVColor(RGBColor const &);
 };
 
 struct RGBColor {
@@ -37,21 +35,18 @@ struct RGBColor {
        int g;
        int b;
        RGBColor() : r(0), g(0), b(0) {}
-       RGBColor(int red, int green, int blue) : r(red), g(green), b(blue) {}
-       RGBColor( HSVColor const & );
+       RGBColor(int red, int green, int blue)
+               : r(red), g(green), b(blue) {}
+       RGBColor(HSVColor const &);
 };
 
-typedef std::pair<string, RGBColor> X11Color;
-
-/// struct holding xform-specific colors
-struct XformColor {
+struct NamedColor : public RGBColor {
        string name;
-       int colorID;
-       RGBColor col;
-       XformColor() : colorID(0) {}
-       string const getname() { return name; }
-       static bool read( string const & );
-       static bool write( string const & );
+       NamedColor() : RGBColor() {}
+       NamedColor(string const & n, RGBColor const & c )
+               : RGBColor(c), name(n) {}
+       RGBColor const & color() const { return *this; }
+       string const & getname() const { return name; }
 };
 
 inline