]> git.lyx.org Git - lyx.git/blob - src/insets/render_graphic.h
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / render_graphic.h
1 // -*- C++ -*-
2 /**
3  * \file render_graphic.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef RENDER_GRAPHIC_H
13 #define RENDER_GRAPHIC_H
14
15 #include "render_base.h"
16
17 #include "graphics/GraphicsLoader.h"
18 #include "graphics/GraphicsParams.h"
19
20
21 class RenderGraphic : public RenderBase
22 {
23 public:
24         RenderGraphic(InsetBase const *);
25         RenderGraphic(RenderGraphic const &, InsetBase const *);
26         std::auto_ptr<RenderBase> clone(InsetBase const *) const;
27
28         /// compute the size of the object returned in dim
29         void metrics(MetricsInfo & mi, Dimension & dim) const;
30         /// draw inset
31         void draw(PainterInfo & pi, int x, int y) const;
32
33         /// Refresh the info about which file to display and how to display it.
34         void update(lyx::graphics::Params const & params);
35
36         /// equivalent to dynamic_cast
37         virtual RenderGraphic * asGraphic() { return this; }
38
39 private:
40         /// Not implemented.
41         RenderGraphic & operator=(RenderGraphic const &);
42
43         /// The stored data.
44         lyx::graphics::Loader loader_;
45         lyx::graphics::Params params_;
46 };
47
48
49 #endif // NOT RENDER_GRAPHIC_H