#include <config.h>
#include "math_diminset.h"
+#include "debug.h"
-void MathDimInset::metricsT(TextMetricsInfo const &) const
+MathDimInset::MathDimInset()
+ : xo_(-3), yo_(-3) // some sentinel value for debugging
+{}
+
+
+int MathDimInset::ascent() const
+{
+ return dim_.asc;
+}
+
+
+int MathDimInset::descent() const
+{
+ return dim_.des;
+}
+
+
+int MathDimInset::width() const
{
-#ifndef WITH_WARNINGS
-#warning temporarily disabled
-#endif
-/*
- std::ostringstream os;
- os << MathAtom(this);
- dim_.wid = int(os.str().size());
- dim_.asc = 1;
- dim_.des = 0;
-*/
+ return dim_.wid;
}
-void MathDimInset::drawT(TextPainter &, int, int) const
+void MathDimInset::setPosCache(PainterInfo const &, int x, int y) const
{
-/*
- std::ostringstream os;
- os << MathAtom(this);
- pain.draw(x, y, STRCONV(os.str()));
-*/
+ //lyxerr << "MathDimInset: cache to " << x << " " << y << std::endl;
+ xo_ = x;
+ yo_ = y;
}