3 #include "math_braceinset.h"
4 #include "math_parser.h"
5 #include "math_support.h"
6 #include "math_mathmlstream.h"
7 #include "support/LOstream.h"
13 MathBraceInset::MathBraceInset()
18 MathBraceInset::MathBraceInset(MathArray const & ar)
25 auto_ptr<InsetBase> MathBraceInset::clone() const
27 return auto_ptr<InsetBase>(new MathBraceInset(*this));
31 void MathBraceInset::metrics(MetricsInfo & mi, Dimension & dim) const
35 mathed_char_dim(mi.base.font, '{', t);
37 dim_.asc = max(cell(0).ascent(), t.asc);
38 dim_.des = max(cell(0).descent(), t.des);
39 dim_.wid = cell(0).width() + 2 * wid_;
44 void MathBraceInset::draw(PainterInfo & pi, int x, int y) const
46 LyXFont font = pi.base.font;
47 font.setColor(LColor::latex);
48 drawChar(pi, font, x, y, '{');
49 cell(0).draw(pi, x + wid_, y);
50 drawChar(pi, font, x + dim_.width() - wid_, y, '}');
54 void MathBraceInset::write(WriteStream & os) const
56 os << '{' << cell(0) << '}';
60 void MathBraceInset::normalize(NormalStream & os) const
62 os << "[block " << cell(0) << ']';
66 void MathBraceInset::maple(MapleStream & os) const
72 void MathBraceInset::octave(OctaveStream & os) const
78 void MathBraceInset::mathmlize(MathMLStream & os) const
80 os << MTag("mrow") << cell(0) << ETag("mrow");
84 void MathBraceInset::mathematica(MathematicaStream & os) const
90 void MathBraceInset::infoize(std::ostream & os) const
92 os << "Nested Block: ";