X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Frender_graphic.h;h=182e02f2d35181367e4aa60932223becb054ab2b;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=a8c61a6e8f78aa8ac76794fd929f5e2dbb34d51f;hpb=dff822442ad64ea35cfa7ed7265f24624093a476;p=lyx.git diff --git a/src/insets/render_graphic.h b/src/insets/render_graphic.h index a8c61a6e8f..182e02f2d3 100644 --- a/src/insets/render_graphic.h +++ b/src/insets/render_graphic.h @@ -17,50 +17,39 @@ #include "graphics/GraphicsLoader.h" #include "graphics/GraphicsParams.h" -#include + +namespace lyx { class RenderGraphic : public RenderBase { public: - RenderGraphic(); - RenderGraphic(RenderGraphic const &); - RenderBase * clone() const; + RenderGraphic(InsetBase const *); + RenderGraphic(RenderGraphic const &, InsetBase const *); + std::auto_ptr clone(InsetBase const *) const; /// compute the size of the object returned in dim - void metrics(MetricsInfo & mi, Dimension & dim) const; - /// draw inset and update (xo, yo)-cache + bool metrics(MetricsInfo & mi, Dimension & dim) const; + /// draw inset void draw(PainterInfo & pi, int x, int y) const; /// Refresh the info about which file to display and how to display it. - void update(lyx::graphics::Params const & params); - - /// Is the stored checksum different to that of the graphics loader? - bool hasFileChanged() const; + void update(graphics::Params const & params); - /** Connect and you'll be informed when the loading status of the image - * changes. - */ - typedef boost::signal0::slot_type slot_type; - boost::signals::connection connect(slot_type const &) const; + /// equivalent to dynamic_cast + virtual RenderGraphic * asGraphic() { return this; } private: /// Not implemented. RenderGraphic & operator=(RenderGraphic const &); - /// The message to display instead of the graphic itself. - std::string const statusMessage() const; - - /// Is the image ready to draw, or should we display a message instead? - bool readyToDisplay() const; - /// The stored data. - lyx::graphics::Loader loader_; - lyx::graphics::Params params_; - - /// Cached variable (not copied). - mutable unsigned long checksum_; + graphics::Loader loader_; + graphics::Params params_; }; + +} // namespace lyx + #endif // NOT RENDER_GRAPHIC_H