4 #include "math_braceinset.h"
5 #include "math_parser.h"
6 #include "math_support.h"
7 #include "math_mathmlstream.h"
8 #include "support/LOstream.h"
13 MathBraceInset::MathBraceInset()
18 MathBraceInset::MathBraceInset(MathArray const & ar)
25 MathInset * MathBraceInset::clone() const
27 return new MathBraceInset(*this);
31 void MathBraceInset::metrics(MathMetricsInfo & mi) const
35 mathed_char_dim(mi.base.font, '{', t);
37 dim_.a = max(cell(0).ascent(), t.a);
38 dim_.d = max(cell(0).descent(), t.d);
39 dim_.w = cell(0).width() + 2 * wid_;
43 void MathBraceInset::draw(MathPainterInfo & pi, int x, int y) const
45 LyXFont font = pi.base.font;
46 font.setColor(LColor::latex);
47 drawChar(pi, font, x, y, '{');
48 cell(0).draw(pi, x + wid_, y);
49 drawChar(pi, font, x + width() - wid_, y, '}');
53 void MathBraceInset::write(WriteStream & os) const
55 os << '{' << cell(0) << '}';
59 void MathBraceInset::normalize(NormalStream & os) const
61 os << "[block " << cell(0) << ']';
65 void MathBraceInset::maple(MapleStream & os) const
71 void MathBraceInset::octave(OctaveStream & os) const
77 void MathBraceInset::mathmlize(MathMLStream & os) const
79 os << MTag("mrow") << cell(0) << ETag("mrow");
83 void MathBraceInset::mathematica(MathematicaStream & os) const
89 void MathBraceInset::infoize(std::ostream & os) const
91 os << "Nested Block: ";