]> git.lyx.org Git - lyx.git/blob - src/frontends/nullpainter.h
Fix bug 2195: Slowness in rendering inside insets, especially on the Mac
[lyx.git] / src / frontends / nullpainter.h
1 // -*- C++ -*-
2 /**
3  * \file nullpainter.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alfredo Braunstein
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef NULLPAINTER_H
13 #define NULLPAINTER_H
14
15 #include "LColor.h"
16 #include "Painter.h"
17
18 class NullPainter : public Painter {
19 public:
20         ///
21         NullPainter() {}
22
23         virtual ~NullPainter() {}
24
25         /// begin painting
26         void start() {}
27         /// end painting
28         void end() {}
29
30         ///
31         int paperWidth() const { return 0; }
32         ///
33         int paperHeight() const;
34
35         ///
36         void line(int, int, int, int, LColor_color,
37                        line_style = line_solid, line_width = line_thin) {}
38         ///
39         void lines(int const *, int const *, int, LColor_color,
40                         line_style = line_solid, line_width = line_thin) {}
41         ///
42         void rectangle(int, int, int, int,      LColor_color,
43                 line_style = line_solid, line_width = line_thin) {}
44         ///
45         void fillRectangle(int, int, int, int, LColor_color) {}
46         ///
47         void fillPolygon(int const *, int const *, int, LColor_color) {}
48         ///
49         void arc(int, int,      unsigned int, unsigned int,
50                 int, int, LColor_color) {}
51         ///
52         void point(int, int, LColor_color) {}
53         ///
54         void button(int, int, int, int) {}
55         ///
56         void image(int, int, int, int, lyx::graphics::Image const &) {}
57         ///
58         void text(int, int, std::string const &, LyXFont const &) {}
59         ///
60         void text(int, int, char const *, size_t, LyXFont const &) {}
61         ///
62         void text(int, int, char, LyXFont const &) {}
63         ///
64         void rectText(int, int, std::string const &,
65                 LyXFont const &, LColor_color, LColor_color) {}
66         ///
67         void buttonText(int, int, std::string const &, LyXFont const &) {}
68         ///
69         void underline(LyXFont const &, int, int, int) {}
70         ///
71         void buttonFrame(int, int, int, int) {}
72 };
73
74 #endif // NULLPAINTER_H