X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_casesinset.C;h=5d992788c1a8a0253fa2a37b99e7b22e71425d4f;hb=c9e78a825bd659ddb7b4b55a6adfa7f0a1a98dd6;hp=c5fabe678a2d1f15f3077e5167373dbcb0bc56f8;hpb=f70513fe19b91d91e44d9dbf33572041457eebb7;p=lyx.git diff --git a/src/mathed/math_casesinset.C b/src/mathed/math_casesinset.C index c5fabe678a..5d992788c1 100644 --- a/src/mathed/math_casesinset.C +++ b/src/mathed/math_casesinset.C @@ -1,14 +1,11 @@ #include -#ifdef __GNUG__ -#pragma implementation -#endif #include "math_casesinset.h" #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 +19,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,11 +37,11 @@ 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"; - os << "\\end{cases}\n"; + os << "\\end{cases}"; } @@ -52,13 +49,19 @@ void MathCasesInset::normalize(NormalStream & os) const { os << "[cases "; MathGridInset::normalize(os); - os << "]"; + os << ']'; } -void MathCasesInset::maplize(MapleStream & os) const +void MathCasesInset::maple(MapleStream & os) const { os << "cases("; - MathGridInset::maplize(os); - os << ")"; + MathGridInset::maple(os); + os << ')'; +} + + +void MathCasesInset::infoize(std::ostream & os) const +{ + os << "Cases "; }