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_mathmlstream.h"
15 #include "math_support.h"
16 #include "LaTeXFeatures.h"
17 #include "support/std_ostream.h"
22 MathCasesInset::MathCasesInset(row_type n)
23 : MathGridInset(2, n, 'c', "ll")
27 auto_ptr<InsetBase> MathCasesInset::clone() const
29 return auto_ptr<InsetBase>(new MathCasesInset(*this));
33 void MathCasesInset::metrics(MetricsInfo & mi, Dimension & dim) const
35 MathGridInset::metrics(mi);
41 void MathCasesInset::draw(PainterInfo & pain, int x, int y) const
43 mathed_draw_deco(pain, x + 1, y - dim_.ascent(), 6, dim_.height(), "{");
44 MathGridInset::draw(pain, x + 8, y);
48 void MathCasesInset::write(WriteStream & os) const
52 os << "\\begin{cases}\n";
53 MathGridInset::write(os);
60 void MathCasesInset::normalize(NormalStream & os) const
63 MathGridInset::normalize(os);
68 void MathCasesInset::maple(MapleStream & os) const
71 MathGridInset::maple(os);
76 void MathCasesInset::infoize(std::ostream & os) const
82 void MathCasesInset::validate(LaTeXFeatures & features) const
84 features.require("amsmath");
85 MathGridInset::validate(features);