*
* \author Lars Gullik Bjønnes
*
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
#include "insettheorem.h"
+#include "metricsinfo.h"
#include "gettext.h"
#include "lyxfont.h"
#include "BufferView.h"
}
-Inset * InsetTheorem::clone(Buffer const &, bool) const
+InsetBase * InsetTheorem::clone() const
{
#ifdef WITH_WARNINGS
#warning Is this inset used? If YES this is WRONG!!! (Jug)
return result;
}
+void InsetTheorem::metrics(MetricsInfo & mi, Dimension & dim) const
+{
+ InsetCollapsable::metrics(mi, dim);
+ center_indent_ = (mi.base.textwidth - dim.wid) / 2;
+ dim.wid = mi.base.textwidth;
+ dim_ = dim;
+}
+
+
+void InsetTOC::draw(PainterInfo & pi, int x, int y) const
+{
+ InsetCollapsable::draw(pi, x + center_indent_, y);
+}
+
string const InsetTheorem::editMessage() const
{
int InsetTheorem::latex(Buffer const * buf, ostream & os,
- LatexRunParams const & runparams, bool fp) const
+ LatexRunParams const & runparams) const
{
os << "\\begin{theorem}%\n";
- int i = inset.latex(buf, os, runparams, fp);
+ int i = inset.latex(buf, os, runparams);
os << "\\end{theorem}%\n";
return i + 2;