2017-07-15 23:25:03 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file NullPainter.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author unknown
|
|
|
|
* \author John Levon
|
|
|
|
* \author Jean-Marc Lasgouttes
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NULLPAINTER_H
|
|
|
|
#define NULLPAINTER_H
|
|
|
|
|
|
|
|
#include "Painter.h"
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* NullPainter - A painter instance that does nothing
|
|
|
|
*/
|
|
|
|
class NullPainter : public Painter {
|
|
|
|
public:
|
2019-10-21 14:45:03 +00:00
|
|
|
NullPainter() : Painter(1, false) {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
~NullPainter() {}
|
|
|
|
|
|
|
|
/// draw a line from point to point
|
|
|
|
void line(int, int, int, int, Color,
|
2020-10-01 07:42:11 +00:00
|
|
|
line_style = line_solid, int = thin_line) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void lines(int const *, int const *, int, Color,
|
|
|
|
fill_style = fill_none, line_style = line_solid,
|
2020-10-01 07:42:11 +00:00
|
|
|
int = thin_line) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void path(int const *, int const *, int const *, int const *,
|
|
|
|
int const *, int const *, int, Color,
|
2020-10-01 07:42:11 +00:00
|
|
|
fill_style = fill_none, line_style = line_solid, int = thin_line) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a rectangle
|
|
|
|
void rectangle(int, int, int, int, Color,
|
2020-10-01 07:42:11 +00:00
|
|
|
line_style = line_solid, int = thin_line) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a filled rectangle
|
2020-10-01 07:42:11 +00:00
|
|
|
void fillRectangle(int, int, int, int, Color) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw an arc
|
2020-10-01 07:42:11 +00:00
|
|
|
void arc(int, int, unsigned int, unsigned int, int, int, Color) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a pixel
|
2020-10-01 07:42:11 +00:00
|
|
|
void point(int, int, Color) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw an image from the image cache
|
2020-12-13 08:51:32 +00:00
|
|
|
void image(int, int, int, int, graphics::Image const &, bool) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a string
|
2020-10-01 07:42:11 +00:00
|
|
|
void text(int, int, docstring const &, FontInfo const &) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a char
|
2020-10-01 07:42:11 +00:00
|
|
|
void text(int, int, char_type, FontInfo const &) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a string
|
2020-10-01 07:42:11 +00:00
|
|
|
void text(int, int, docstring const &, Font const &, double, double) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
///
|
|
|
|
void text(int, int, docstring const &, Font const &,
|
2020-10-01 07:42:11 +00:00
|
|
|
Color, size_type, size_type, double, double) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// This painter does not paint
|
2020-10-01 07:42:11 +00:00
|
|
|
bool isNull() const override { return true; }
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw the underbar, strikeout, xout, uuline and uwave font attributes
|
2020-10-01 07:42:11 +00:00
|
|
|
void textDecoration(FontInfo const &, int, int, int) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Draw a string and enclose it inside a rectangle. If
|
|
|
|
* back color is specified, the background is cleared with
|
|
|
|
* the given color. If frame is specified, a thin frame is drawn
|
|
|
|
* around the text with the given color.
|
|
|
|
*/
|
|
|
|
void rectText(int, int, docstring const &,
|
2020-10-01 07:42:11 +00:00
|
|
|
FontInfo const &, Color, Color) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a string and enclose it inside a button frame
|
|
|
|
void buttonText(int, int, docstring const &,
|
2020-10-01 07:42:11 +00:00
|
|
|
FontInfo const &, Color, Color, int) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
|
|
|
|
/// draw a character of a preedit string for cjk support.
|
|
|
|
int preeditText(int, int, char_type, FontInfo const &,
|
2020-10-01 07:42:11 +00:00
|
|
|
preedit_style) override { return 0; }
|
2017-07-15 23:25:03 +00:00
|
|
|
|
2020-07-11 21:56:48 +00:00
|
|
|
/// start monochrome painting mode, i.e. map every color a shade of \c blend.
|
2020-10-01 07:42:11 +00:00
|
|
|
void enterMonochromeMode(Color const &) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
/// leave monochrome painting mode
|
2020-10-01 07:42:11 +00:00
|
|
|
void leaveMonochromeMode() override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
/// draws a wavy line that can be used for underlining.
|
2020-10-01 07:42:11 +00:00
|
|
|
void wavyHorizontalLine(int, int, int, ColorCode) override {}
|
2017-07-15 23:25:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace frontend
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
|
|
#endif // NULLPAINTER_H
|