]> git.lyx.org Git - lyx.git/blob - src/frontends/NullPainter.h
Silence warning when unappropriate
[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 unknown
8  * \author John Levon
9  * \author Jean-Marc Lasgouttes
10  *
11  * Full author contact details are available in file CREDITS.
12  */
13
14 #ifndef NULLPAINTER_H
15 #define NULLPAINTER_H
16
17 #include "Painter.h"
18
19 namespace lyx {
20
21 namespace frontend {
22
23 /**
24  * NullPainter - A painter instance that does nothing
25  */
26 class NullPainter : public Painter {
27 public:
28         NullPainter() : Painter(1, false) {}
29
30         ~NullPainter() {}
31
32         /// draw a line from point to point
33         void line(int, int, int, int, Color,
34                 line_style = line_solid, int = thin_line) override {}
35
36         ///
37         void lines(int const *, int const *, int, Color,
38                 fill_style = fill_none, line_style = line_solid,
39                 int = thin_line) override {}
40
41         ///
42         void path(int const *, int const *, int const *, int const *,
43                 int const *, int const *, int, Color,
44                 fill_style = fill_none, line_style = line_solid, int = thin_line) override {}
45
46         /// draw a rectangle
47         void rectangle(int, int, int, int, Color,
48                 line_style = line_solid, int = thin_line) override {}
49
50         /// draw a filled rectangle
51         void fillRectangle(int, int, int, int, Color) override {}
52
53         /// draw an arc
54         void arc(int, int, unsigned int, unsigned int, int, int, Color) override {}
55
56         /// draw an ellipse
57         void ellipse(double, double, double, double, Color,
58                 fill_style = fill_none, line_style = line_solid,
59                 int = thin_line) override {}
60
61         /// draw a pixel
62         void point(int, int, Color) override {}
63
64         /// draw an image from the image cache
65         void image(int, int, int, int, graphics::Image const &, bool) override {}
66
67         /// draw a string
68         void text(int, int, docstring const &, FontInfo const &) override {}
69
70         /// draw a char
71         void text(int, int, char_type, FontInfo const &) override {}
72
73         /// draw a string
74         void text(int, int, docstring const &, Font const &, double, double) override {}
75
76         ///
77         void text(int, int, docstring const &, Font const &,
78                   Color, size_type, size_type, double, double) override {}
79
80         /// This painter does not paint
81         bool isNull() const override { return true; }
82
83         /// draw the underbar, strikeout, xout, uuline and uwave font attributes
84         void textDecoration(FontInfo const &, int, int, int) override {}
85
86         /**
87          * Draw a string and enclose it inside a rectangle. If
88          * back color is specified, the background is cleared with
89          * the given color. If frame is specified, a thin frame is drawn
90          * around the text with the given color.
91          */
92         void rectText(int, int, docstring const &,
93                       FontInfo const &, Color, Color) override {}
94
95         /// draw a string and enclose it inside a button frame
96         void buttonText(int, int, docstring const &,
97                         FontInfo const &, Color, Color, int) override {}
98
99         /// draw a character of a preedit string for cjk support.
100         int preeditText(int, int, char_type, FontInfo const &,
101                         preedit_style) override { return 0; }
102
103         /// start monochrome painting mode, i.e. map every color a shade of \c blend.
104         void enterMonochromeMode(Color const &) override {}
105         /// leave monochrome painting mode
106         void leaveMonochromeMode() override {}
107         /// draws a wavy line that can be used for underlining.
108         void wavyHorizontalLine(FontInfo const &, int, int, int, ColorCode) override {}
109 };
110
111 } // namespace frontend
112 } // namespace lyx
113
114 #endif // NULLPAINTER_H