X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FRenderGraphic.h;h=fc631a0c7aed2c73605e5fac8816101119c748a6;hb=8124e6c02ea1fd6779bb6c47ffe2bca2c8bd2d97;hp=0d0727b3b31001eb955c59fd7bcac4980e12fa6f;hpb=c8d00ed1272cd489041bed2115081008b6a26489;p=lyx.git diff --git a/src/insets/RenderGraphic.h b/src/insets/RenderGraphic.h index 0d0727b3b3..fc631a0c7a 100644 --- a/src/insets/RenderGraphic.h +++ b/src/insets/RenderGraphic.h @@ -24,25 +24,30 @@ namespace lyx { class RenderGraphic : public RenderBase { public: - RenderGraphic(InsetBase const *); - RenderGraphic(RenderGraphic const &, InsetBase const *); - std::auto_ptr clone(InsetBase const *) const; + explicit RenderGraphic(Inset const *); + RenderGraphic(RenderGraphic const &, Inset const *); + RenderBase * clone(Inset const *) const override; /// compute the size of the object returned in dim - bool metrics(MetricsInfo & mi, Dimension & dim) const; + void metrics(MetricsInfo & mi, Dimension & dim) const override; /// draw inset - void draw(PainterInfo & pi, int x, int y) const; + void draw(PainterInfo & pi, int x, int y, bool const darkmode = false) const override; /// Refresh the info about which file to display and how to display it. void update(graphics::Params const & params); + /// Reloads the image if necessary + void reload() const; /// equivalent to dynamic_cast - virtual RenderGraphic * asGraphic() { return this; } + RenderGraphic * asGraphic() override { return this; } private: /// Not implemented. RenderGraphic & operator=(RenderGraphic const &); + /// Reference to owner + Inset const * inset_; + /// The stored data. graphics::Loader loader_; graphics::Params params_;