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::clone() 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 & pain, int x, int y) const
44 mathed_draw_deco(pain, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
45 MathGridInset::draw(pain, x + 8, y);
49 void MathCasesInset::write(WriteStream & os) const
53 os << "\\begin{cases}\n";
54 MathGridInset::write(os);
61 void MathCasesInset::normalize(NormalStream & os) const
64 MathGridInset::normalize(os);
69 void MathCasesInset::maple(MapleStream & os) const
72 MathGridInset::maple(os);
77 void MathCasesInset::infoize(std::ostream & os) const
83 void MathCasesInset::validate(LaTeXFeatures & features) const
85 features.require("amsmath");
86 MathGridInset::validate(features);