]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_substackinset.C
Replace LString.h with support/std_string.h,
[features.git] / src / mathed / math_substackinset.C
index c996d8bd7b7dbec7439c8a88ed116cf1c8562605..08f425e79571cdd931dd56bbc46cfd7e9da2aca9 100644 (file)
@@ -1,9 +1,20 @@
-#include <config.h>
+/**
+ * \file math_substackinset.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_substackinset.h"
 #include "math_mathmlstream.h"
-#include "math_streamstr.h"
+#include "support/std_ostream.h"
+
+using std::auto_ptr;
 
 
 MathSubstackInset::MathSubstackInset()
@@ -11,13 +22,13 @@ MathSubstackInset::MathSubstackInset()
 {}
 
 
-MathInset * MathSubstackInset::clone() const
+auto_ptr<InsetBase> MathSubstackInset::clone() const
 {
-       return new MathSubstackInset(*this);
+       return auto_ptr<InsetBase>(new MathSubstackInset(*this));
 }
 
 
-void MathSubstackInset::metrics(MetricsInfo & mi) const
+void MathSubstackInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
        if (mi.base.style == LM_ST_DISPLAY) {
                StyleChanger dummy(mi.base, LM_ST_TEXT);
@@ -25,6 +36,21 @@ void MathSubstackInset::metrics(MetricsInfo & mi) const
        } else {
                MathGridInset::metrics(mi);
        }
+       metricsMarkers();
+       dim = dim_;
+}
+
+
+void MathSubstackInset::draw(PainterInfo & pi, int x, int y) const
+{
+       MathGridInset::draw(pi, x + 1, y);
+       drawMarkers(pi, x, y);
+}
+
+
+void MathSubstackInset::infoize(std::ostream & os) const
+{
+       os << "Substack ";
 }