]> git.lyx.org Git - lyx.git/blobdiff - src/ColorHandler.h
fix typo that put too many include paths for most people
[lyx.git] / src / ColorHandler.h
index f868fbfb341c247d72a10e2a543d4a8c85ee7690..185f03dcd7646b2c18dd7b50bb49fd812915f426 100644 (file)
@@ -1,10 +1,10 @@
 // -*- C++ -*-
 /* This file is part of
  * ======================================================
- * 
+ *
  *           LyX, The Document Processor
- *      
- *         Copyright 1995-2000 The LyX Team
+ *
+ *         Copyright 1995-2001 The LyX Team
  *
  * ======================================================*/
 
 #pragma interface
 #endif
 
-//#include "config.h"
-//#include "LString.h"
+#include <boost/smart_ptr.hpp>
 
 // This is only included to provide stuff for the non-public sections
 #include <X11/Xlib.h>
 
-#include <map>
 #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 +41,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 +59,7 @@ private:
        Pixmap drawable;
 };
 
-extern LyXColorHandler * lyxColorHandler;
+///
+extern boost::scoped_ptr<LyXColorHandler> lyxColorHandler;
 
 #endif