2 * \file math_casesinset.C
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "math_casesinset.h"
14 #include "math_data.h"
15 #include "math_mathmlstream.h"
16 #include "math_support.h"
17 #include "LaTeXFeatures.h"
18 #include "support/std_ostream.h"
23 MathCasesInset::MathCasesInset(row_type n)
24 : MathGridInset(2, n, 'c', "ll")
28 auto_ptr<InsetBase> MathCasesInset::doClone() const
30 return auto_ptr<InsetBase>(new MathCasesInset(*this));
34 void MathCasesInset::metrics(MetricsInfo & mi, Dimension & dim) const
36 MathGridInset::metrics(mi);
42 void MathCasesInset::draw(PainterInfo & pi, int x, int y) const
44 mathed_draw_deco(pi, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
45 MathGridInset::draw(pi, x + 8, y);
46 setPosCache(pi, x, y);
50 void MathCasesInset::write(WriteStream & os) const
54 os << "\\begin{cases}\n";
55 MathGridInset::write(os);
62 void MathCasesInset::normalize(NormalStream & os) const
65 MathGridInset::normalize(os);
70 void MathCasesInset::maple(MapleStream & os) const
73 MathGridInset::maple(os);
78 void MathCasesInset::infoize(std::ostream & os) const
84 void MathCasesInset::validate(LaTeXFeatures & features) const
86 features.require("amsmath");
87 MathGridInset::validate(features);