4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
15 #include "dimension.h"
17 #include <boost/weak_ptr.hpp>
26 virtual ~RenderBase() {}
28 virtual RenderBase * clone() const = 0;
30 /// compute the size of the object returned in dim
31 virtual void metrics(MetricsInfo & mi, Dimension & dim) const = 0;
32 /// draw inset and update (xo, yo)-cache
33 virtual void draw(PainterInfo & pi, int x, int y) const = 0;
35 /// An accessor function to the cached store.
36 BufferView * view() const;
40 RenderBase(RenderBase const &) {}
41 void operator=(RenderBase const &) {}
43 /// These are cached variables (are not copied).
44 mutable boost::weak_ptr<BufferView> view_;
45 mutable Dimension dim_;
48 #endif // NOT RENDER_BASE_H