]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_casesinset.C
small up/down tweaking
[lyx.git] / src / mathed / math_casesinset.C
index a38899f44d6bfd16236b31747c385461772f87f2..8fe06a6a7eb099d9fad49b8876a4dca2ee99e69c 100644 (file)
@@ -8,7 +8,7 @@
 #include "math_parser.h"
 #include "math_mathmlstream.h"
 #include "math_support.h"
-#include "Painter.h"
+#include "support/LOstream.h"
 
 
 MathCasesInset::MathCasesInset(row_type n)
@@ -22,15 +22,15 @@ MathInset * MathCasesInset::clone() const
 }
 
 
-void MathCasesInset::metrics(MathMetricsInfo const & mi) const
+void MathCasesInset::metrics(MathMetricsInfo & mi) const
 {
        MathGridInset::metrics(mi);
-       width_ += 8;
+       dim_.w += 8;
 }
 
 
-void MathCasesInset::draw(Painter & pain, int x, int y) const
-{ 
+void MathCasesInset::draw(MathPainterInfo & pain, int x, int y) const
+{
        mathed_draw_deco(pain, x + 1, y - ascent(), 6, height(), "{");
        MathGridInset::draw(pain, x + 8, y);
 }
@@ -40,7 +40,7 @@ void MathCasesInset::write(WriteStream & os) const
 {
        if (os.fragile())
                os << "\\protect";
-       os << "\\begin{cases}";
+       os << "\\begin{cases}\n";
        MathGridInset::write(os);
        if (os.fragile())
                os << "\\protect";
@@ -52,7 +52,7 @@ void MathCasesInset::normalize(NormalStream & os) const
 {
        os << "[cases ";
        MathGridInset::normalize(os);
-       os << "]";
+       os << ']';
 }
 
 
@@ -60,5 +60,11 @@ void MathCasesInset::maplize(MapleStream & os) const
 {
        os << "cases(";
        MathGridInset::maplize(os);
-       os << ")";
+       os << ')';
+}
+
+
+void MathCasesInset::infoize(std::ostream & os) const
+{
+       os << "Cases ";
 }