]> git.lyx.org Git - lyx.git/blobdiff - src/Color.h
adjust
[lyx.git] / src / Color.h
index c64ba1656643e35fb774412b7872f46e2a3eccb9..d9be348ac8fa53591463e4739bd529a0b61b9bde 100644 (file)
@@ -123,8 +123,10 @@ public:
                mathbg,
                /// Macro math inset background color
                mathmacrobg,
-               /// Math inset frame color
+               /// Math inset frame color under focus
                mathframe,
+               /// Math inset frame color not under focus
+               mathcorners,
                /// Math line color
                mathline,
 
@@ -151,10 +153,10 @@ public:
                appendix,
                /// changebar color
                changebar,
-               /// strike-out color
-               strikeout,
+               /// deleted text color
+               deletedtext,
                /// added text color
-               newtext,
+               addedtext,
                /// Top and bottom line color
                topline,
                /// Table line color
@@ -251,6 +253,33 @@ extern Color lcolor;
 extern Color system_lcolor;
 
 
+struct RGBColor {
+       unsigned int r;
+       unsigned int g;
+       unsigned int b;
+       RGBColor() : r(0), g(0), b(0) {}
+       RGBColor(unsigned int red, unsigned int green, unsigned int blue)
+               : r(red), g(green), b(blue) {}
+       /// \param x11hexname is of the form "#ffa071"
+       RGBColor(std::string const & x11hexname);
+};
+
+inline
+bool operator==(RGBColor const & c1, RGBColor const & c2)
+{
+       return (c1.r == c2.r && c1.g == c2.g && c1.b == c2.b);
+}
+
+
+inline
+bool operator!=(RGBColor const & c1, RGBColor const & c2)
+{
+       return !(c1 == c2);
+}
+
+/// returns a string of form #rrggbb, given an RGBColor struct
+std::string const X11hexname(RGBColor const & col);
+
 } // namespace lyx
 
 #endif