3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
8 * Full author contact details are available in file CREDITS.
13 #include "InsetMathBox.h"
15 #include "MathMLStream.h"
16 #include "MathStream.h"
17 #include "support/std_ostream.h"
23 InsetMathBox::InsetMathBox(string const & name)
24 : InsetMathNest(1), name_(name)
28 auto_ptr<InsetBase> InsetMathBox::doClone() const
30 return auto_ptr<InsetBase>(new InsetMathBox(*this));
34 void InsetMathBox::write(WriteStream & os) const
36 os << '\\' << name_ << '{' << cell(0) << '}';
40 void InsetMathBox::normalize(NormalStream & os) const
42 os << '[' << name_ << ' ';
43 //text_->write(buffer(), os);
48 void InsetMathBox::metrics(MetricsInfo & mi, Dimension & dim) const
50 FontSetChanger dummy(mi.base, "textnormal");
51 cell(0).metrics(mi, dim);
57 void InsetMathBox::draw(PainterInfo & pi, int x, int y) const
59 FontSetChanger dummy(pi.base, "textnormal");
60 cell(0).draw(pi, x, y);
61 drawMarkers(pi, x, y);
65 void InsetMathBox::infoize(std::ostream & os) const
67 os << "Box: " << name_;