-#include <config.h>
+/**
+ * \file math_numberinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+#include <config.h>
#include "math_numberinset.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
#include "math_support.h"
-#include "debug.h"
+
+using std::string;
+using std::auto_ptr;
MathNumberInset::MathNumberInset(string const & s)
{}
-MathInset * MathNumberInset::clone() const
+auto_ptr<InsetBase> MathNumberInset::doClone() const
{
- return new MathNumberInset(*this);
+ return auto_ptr<InsetBase>(new MathNumberInset(*this));
}
-Dimension MathNumberInset::metrics(MetricsInfo & mi) const
+void MathNumberInset::metrics(MetricsInfo & mi, Dimension & dim) const
{
- Dimension dim;
mathed_string_dim(mi.base.font, str_, dim);
- return dim;
}
void MathNumberInset::draw(PainterInfo & pi, int x, int y) const
{
- //lyxerr << "drawing '" << str_ << "' code: " << code_ << endl;
- drawStr(pi, pi.base.font, x, y, str_);
+ pi.draw(x, y, str_);
}