+/**
+ * \file math_diminset.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_diminset.h"
-#include "Lsstream.h"
-#include "textpainter.h"
+#include "debug.h"
+
+
+MathDimInset::MathDimInset()
+ : xo_(-3), yo_(-3) // some sentinel value for debugging
+{}
+
+
+int MathDimInset::ascent() const
+{
+ return dim_.asc;
+}
-void MathDimInset::dimensions(Dimension & dim) const
+int MathDimInset::descent() const
{
- dim = dim_;
+ return dim_.des;
}
-void MathDimInset::metricsT(TextMetricsInfo const &) const
+int MathDimInset::width() const
{
- std::ostringstream os;
- os << *this;
- dim_.w = int(os.str().size());
- dim_.a = 1;
- dim_.d = 0;
+ return dim_.wid;
}
-void MathDimInset::drawT(TextPainter & pain, int x, int y) const
+void MathDimInset::setPosCache(PainterInfo const &, int x, int y) const
{
- std::ostringstream os;
- os << *this;
- pain.draw(x, y, os.str().c_str());
+ //lyxerr << "MathDimInset: cache to " << x << " " << y << std::endl;
+ xo_ = x;
+ yo_ = y;
}