]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_diminset.C
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_diminset.C
index 2e9e75ef71968ffc25dc8fe158623e62a520174e..939e4b89a82a63b41da6dc726a9c665f5bb683fb 100644 (file)
@@ -1,32 +1,44 @@
-#ifdef __GNUG__
-#pragma implementation
-#endif
+/**
+ * \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 "coordcache.h"
+#include "debug.h"
+
+
+MathDimInset::MathDimInset()
+{}
+
+
+int MathDimInset::ascent() const
+{
+       return dim_.asc;
+}
+
+
+int MathDimInset::descent() const
+{
+       return dim_.des;
+}
 
 
-void MathDimInset::metricsT(TextMetricsInfo const &) const
+int MathDimInset::width() const
 {
-#ifndef WITH_WARNINGS
-#warning temporarily disabled
-#endif
-/*
-       std::ostringstream os;
-       os << MathAtom(this);
-       dim_.w = int(os.str().size());
-       dim_.a = 1;
-       dim_.d = 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;
+       theCoords.insets().add(this, x, y);
 }