]> git.lyx.org Git - lyx.git/blob - src/ColorHandler.h
fix typo and and ukrainian
[lyx.git] / src / ColorHandler.h
1 // -*- C++ -*-
2 /* This file is part of
3  * ======================================================
4  * 
5  *           LyX, The Document Processor
6  *       
7  *          Copyright 1995-2000 The LyX Team
8  *
9  * ======================================================*/
10
11 #ifndef COLOR_HANDLER_H
12 #define COLOR_HANDLER_H
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 // This is only included to provide stuff for the non-public sections
19 #include <X11/Xlib.h>
20
21 #include "PainterBase.h"
22
23 class LyXFont;
24 class WorkArea;
25
26 ///
27 class LyXColorHandler {
28 public:
29         ///
30         LyXColorHandler();
31         ///
32         ~LyXColorHandler();
33         ///
34         unsigned long colorPixel(LColor::color c);
35         ///
36         GC getGCForeground(LColor::color c);
37         ///
38         GC getGCLinepars(PainterBase::line_style,
39                          PainterBase::line_width, LColor::color c);
40         /// update the cache after a color definition change
41         void updateColor(LColor::color c);
42
43 private:
44         ///
45         Display * display;
46         ///
47         Colormap colormap;
48         ///
49         GC colorGCcache[LColor::ignore + 1];
50         ///
51         typedef std::map<int, GC> LineGCCache;
52         ///
53         LineGCCache lineGCcache;
54         ///
55         Pixmap drawable;
56 };
57
58 ///
59 extern LyXColorHandler * lyxColorHandler;
60
61 #endif