#include "graphics/GraphicsLoader.h"
#include "graphics/GraphicsParams.h"
-#include <boost/signals/signal0.hpp>
+
+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<RenderBase> 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;
-
- /** Connect and you'll be informed when the loading status of the image
- * changes.
- */
- typedef boost::signal0<void>::slot_type slot_type;
- boost::signals::connection connect(slot_type const &) const;
+ void update(graphics::Params const & params);
/// equivalent to dynamic_cast
virtual RenderGraphic * asGraphic() { return this; }
RenderGraphic & operator=(RenderGraphic 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