7 #include "math_braceinset.h"
8 #include "math_parser.h"
9 #include "math_support.h"
10 #include "math_mathmlstream.h"
11 #include "support/LOstream.h"
16 MathBraceInset::MathBraceInset()
21 MathBraceInset::MathBraceInset(MathArray const & ar)
28 MathInset * MathBraceInset::clone() const
30 return new MathBraceInset(*this);
34 void MathBraceInset::metrics(MathMetricsInfo & mi) const
38 mathed_char_dim(mi.base.font, '{', t);
40 dim_.a = max(cell(0).ascent(), t.a);
41 dim_.d = max(cell(0).descent(), t.a);
42 dim_.w = cell(0).width() + 2 * wid_;
46 void MathBraceInset::draw(MathPainterInfo & pi, int x, int y) const
48 LyXFont font = pi.base.font;
49 font.setColor(LColor::latex);
50 drawChar(pi, font, x, y, '{');
51 cell(0).draw(pi, x + wid_, y);
52 drawChar(pi, font, x + width() - wid_, y, '}');
56 void MathBraceInset::write(WriteStream & os) const
58 os << '{' << cell(0) << '}';
62 void MathBraceInset::normalize(NormalStream & os) const
64 os << "[block " << cell(0) << ']';
68 void MathBraceInset::maplize(MapleStream & os) const
74 void MathBraceInset::octavize(OctaveStream & os) const
80 void MathBraceInset::mathmlize(MathMLStream & os) const
82 os << MTag("mrow") << cell(0) << ETag("mrow");
86 void MathBraceInset::mathematicize(MathematicaStream & os) const
92 void MathBraceInset::infoize(std::ostream & os) const
94 os << "Nested Block: ";