]> git.lyx.org Git - lyx.git/blob - src/insets/render_graphic.h
* src/LyXAction.C: mark goto-clear-bookmark as working without buffer
[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 namespace lyx {
22
23
24 class RenderGraphic : public RenderBase
25 {
26 public:
27         RenderGraphic(InsetBase const *);
28         RenderGraphic(RenderGraphic const &, InsetBase const *);
29         std::auto_ptr<RenderBase> clone(InsetBase const *) const;
30
31         /// compute the size of the object returned in dim
32         bool metrics(MetricsInfo & mi, Dimension & dim) const;
33         /// draw inset
34         void draw(PainterInfo & pi, int x, int y) const;
35
36         /// Refresh the info about which file to display and how to display it.
37         void update(graphics::Params const & params);
38
39         /// equivalent to dynamic_cast
40         virtual RenderGraphic * asGraphic() { return this; }
41
42 private:
43         /// Not implemented.
44         RenderGraphic & operator=(RenderGraphic const &);
45
46         /// The stored data.
47         graphics::Loader loader_;
48         graphics::Params params_;
49 };
50
51
52
53 } // namespace lyx
54
55 #endif // NOT RENDER_GRAPHIC_H