X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Ffrontends%2Fxforms%2FColorHandler.h;h=d4086ae9a6f1e80ffe87e54b7e8f9d915845a0cc;hb=0c0c43b8eb42b4a895e12c774a9b12f2c5bc6c03;hp=a402f22f3e0853b62ff5c7a345699be9a4120a5a;hpb=69cb723040a9c6a045f1eb86e3ccab7e0b2838e5;p=lyx.git diff --git a/src/frontends/xforms/ColorHandler.h b/src/frontends/xforms/ColorHandler.h index a402f22f3e..d4086ae9a6 100644 --- a/src/frontends/xforms/ColorHandler.h +++ b/src/frontends/xforms/ColorHandler.h @@ -6,23 +6,27 @@ * * \author unknown * - * Full author contact details are available in file CREDITS + * Full author contact details are available in file CREDITS. */ #ifndef COLOR_HANDLER_H #define COLOR_HANDLER_H - #include "frontends/Painter.h" #include +#include #include // This is only included to provide stuff for the non-public sections #include +class LColor_color; class LyXFont; +namespace lyx { +namespace frontend { + /** * This is a factory class that can produce GCs with a specific * color. It will cache GCs for performance. @@ -34,14 +38,14 @@ public: /// ~LyXColorHandler(); /// - unsigned long colorPixel(LColor::color c); + unsigned long colorPixel(LColor_color c); /// - GC getGCForeground(LColor::color c); + GC getGCForeground(LColor_color c); /// GC getGCLinepars(Painter::line_style, - Painter::line_width, LColor::color c); + Painter::line_width, LColor_color c); /// update the cache after a color definition change - void updateColor(LColor::color c); + void updateColor(LColor_color c); private: /// @@ -49,7 +53,9 @@ private: /// Colormap colormap; /// - GC colorGCcache[LColor::ignore + 1]; + std::vector colorGCcache; + /// + GC getGCForeground(std::string const & s); /// typedef std::map LineGCCache; /// @@ -61,4 +67,7 @@ private: /// extern boost::scoped_ptr lyxColorHandler; +} // namespace frontend +} // namespace lyx + #endif