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"
12 MathBoxInset::MathBoxInset(string const & name)
13 : MathNestInset(1), name_(name)
17 auto_ptr<InsetBase> MathBoxInset::clone() const
19 return auto_ptr<InsetBase>(new MathBoxInset(*this));
23 void MathBoxInset::write(WriteStream & os) const
25 os << '\\' << name_ << '{' << cell(0) << '}';
29 void MathBoxInset::normalize(NormalStream & os) const
31 os << '[' << name_ << ' ';
32 //text_->write(buffer(), os);
37 void MathBoxInset::metrics(MetricsInfo & mi, Dimension & dim) const
39 FontSetChanger dummy(mi.base, "textnormal");
40 cell(0).metrics(mi, dim_);
46 void MathBoxInset::draw(PainterInfo & pi, int x, int y) const
48 FontSetChanger dummy(pi.base, "textnormal");
49 cell(0).draw(pi, x, y);
50 drawMarkers(pi, x, y);
54 void MathBoxInset::infoize(std::ostream & os) const
56 os << "Box: " << name_;