X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FColorHandler.h;h=b5864e0f6e2b39ed580047b0f0d821f2bb47e4d2;hb=00d24ec87650e4ac7db77ad54cb4aa2f688100f3;hp=f868fbfb341c247d72a10e2a543d4a8c85ee7690;hpb=7f1be334f16188342a7e37f5af92c916ba92309c;p=lyx.git diff --git a/src/ColorHandler.h b/src/ColorHandler.h index f868fbfb34..b5864e0f6e 100644 --- a/src/ColorHandler.h +++ b/src/ColorHandler.h @@ -4,7 +4,7 @@ * * LyX, The Document Processor * - * Copyright 1995-2000 The LyX Team + * Copyright 1995-2001 The LyX Team * * ======================================================*/ @@ -15,20 +15,20 @@ #pragma interface #endif -//#include "config.h" -//#include "LString.h" +#include // This is only included to provide stuff for the non-public sections #include -#include #include "PainterBase.h" -#include "LColor.h" class LyXFont; class WorkArea; -/// +/** + * This is a factory class that can produce GCs with a specific + * color. It will cache GCs for performance. + */ class LyXColorHandler { public: /// @@ -42,6 +42,9 @@ public: /// GC getGCLinepars(PainterBase::line_style, PainterBase::line_width, LColor::color c); + /// update the cache after a color definition change + void updateColor(LColor::color c); + private: /// Display * display; @@ -57,6 +60,7 @@ private: Pixmap drawable; }; -extern LyXColorHandler * lyxColorHandler; +/// +extern boost::scoped_ptr lyxColorHandler; #endif