7 #include "math_boxinset.h"
8 #include "math_support.h"
9 #include "math_mathmlstream.h"
10 #include "math_streamstr.h"
11 #include "support/LOstream.h"
14 MathBoxInset::MathBoxInset(string const & name)
15 : MathGridInset(1, 1), name_(name)
19 MathInset * MathBoxInset::clone() const
21 return new MathBoxInset(*this);
25 void MathBoxInset::write(WriteStream & os) const
27 os << "\\" << name_ << "{" << cell(0) << "}";
31 void MathBoxInset::normalize(NormalStream & os) const
33 os << '[' << name_ << ' ';
34 //text_->write(buffer(), os);
39 void MathBoxInset::rebreak()
41 //lyxerr << "trying to rebreak...\n";
45 void MathBoxInset::metrics(MathMetricsInfo & mi) const
47 MathFontSetChanger dummy(mi.base, "textnormal");
48 MathGridInset::metrics(mi);
52 void MathBoxInset::draw(MathPainterInfo & pi, int x, int y) const
54 MathFontSetChanger dummy(pi.base, "textnormal");
55 MathGridInset::draw(pi, x, y);
56 mathed_draw_framebox(pi, x, y, this);
60 void MathBoxInset::infoize(std::ostream & os) const
62 os << "Box: " << name_;