7 #include "math_boxinset.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
13 MathBoxInset::MathBoxInset(string const & name)
14 : MathGridInset(1, 1), name_(name)
18 MathInset * MathBoxInset::clone() const
20 return new MathBoxInset(*this);
24 void MathBoxInset::write(WriteStream & os) const
26 os << "\\" << name_ << "{" << cell(0) << "}";
30 void MathBoxInset::normalize(NormalStream & os) const
32 os << '[' << name_ << ' ';
33 //text_->write(buffer(), os);
38 void MathBoxInset::rebreak()
40 //lyxerr << "trying to rebreak...\n";
44 void MathBoxInset::metrics(MathMetricsInfo & mi) const
46 MathFontSetChanger dummy(mi.base, "textnormal");
47 MathGridInset::metrics(mi);
51 void MathBoxInset::draw(MathPainterInfo & pi, int x, int y) const
53 MathFontSetChanger dummy(pi.base, "textnormal");
54 MathGridInset::draw(pi, x, y);
55 mathed_draw_framebox(pi, x, y, this);