]> git.lyx.org Git - lyx.git/blob - src/insets/RenderGraphic.h
Embedding: display a pin at the top left corner of embedded figures
[lyx.git] / src / insets / RenderGraphic.h
1 // -*- C++ -*-
2 /**
3  * \file RenderGraphic.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 RENDERGRAPHIC_H
13 #define RENDERGRAPHIC_H
14
15 #include "RenderBase.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(Inset const *);
28         RenderGraphic(RenderGraphic const &, Inset const *);
29         RenderBase * clone(Inset const *) const;
30
31         /// compute the size of the object returned in dim
32         void 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::Loader icon_;
49         graphics::Params params_;
50 };
51
52
53
54 } // namespace lyx
55
56 #endif // NOT RENDERGRAPHIC_H