3 #include "math_boxinset.h"
4 #include "math_support.h"
5 #include "math_mathmlstream.h"
6 #include "math_streamstr.h"
7 #include "support/LOstream.h"
10 MathBoxInset::MathBoxInset(string const & name)
11 : MathNestInset(1), name_(name)
15 InsetBase * MathBoxInset::clone() const
17 return new MathBoxInset(*this);
21 void MathBoxInset::write(WriteStream & os) const
23 os << '\\' << name_ << '{' << cell(0) << '}';
27 void MathBoxInset::normalize(NormalStream & os) const
29 os << '[' << name_ << ' ';
30 //text_->write(buffer(), os);
35 void MathBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
37 FontSetChanger dummy(mi.base, "textnormal");
38 cell(0).metrics(mi, dim_);
44 void MathBoxInset::draw(PainterInfo & pi, int x, int y) const
46 FontSetChanger dummy(pi.base, "textnormal");
47 cell(0).draw(pi, x, y);
48 drawMarkers(pi, x, y);
52 void MathBoxInset::infoize(std::ostream & os) const
54 os << "Box: " << name_;