2 * \file InsetMathBox.cpp
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 "MathStream.h"
16 #include "MathStream.h"
17 #include "support/std_ostream.h"
26 InsetMathBox::InsetMathBox(docstring const & name)
27 : InsetMathNest(1), name_(name)
31 auto_ptr<InsetBase> InsetMathBox::doClone() const
33 return auto_ptr<InsetBase>(new InsetMathBox(*this));
37 void InsetMathBox::write(WriteStream & os) const
39 os << '\\' << name_ << '{' << cell(0) << '}';
43 void InsetMathBox::normalize(NormalStream & os) const
45 os << '[' << name_ << ' ';
46 //text_->write(buffer(), os);
51 bool InsetMathBox::metrics(MetricsInfo & mi, Dimension & dim) const
53 FontSetChanger dummy(mi.base, "textnormal");
54 cell(0).metrics(mi, dim);
63 void InsetMathBox::draw(PainterInfo & pi, int x, int y) const
65 FontSetChanger dummy(pi.base, "textnormal");
66 cell(0).draw(pi, x, y);
67 drawMarkers(pi, x, y);
71 void InsetMathBox::infoize(odocstream & os) const
73 os << "Box: " << name_;