2 * \file InsetMathClass.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 "InsetMathClass.h"
14 #include "MathStream.h"
16 #include "support/docstream.h"
21 InsetMathClass::InsetMathClass(Buffer * buf, MathClass mc)
22 : InsetMathNest(buf, 1), math_class_(mc)
26 Inset * InsetMathClass::clone() const
28 return new InsetMathClass(*this);
32 Limits InsetMathClass::defaultLimits(bool display) const
34 if (allowsLimitsChange() && display)
41 void InsetMathClass::metrics(MetricsInfo & mi, Dimension & dim) const
43 cell(0).metrics(mi, dim);
47 void InsetMathClass::draw(PainterInfo & pi, int x, int y) const
49 cell(0).draw(pi, x, y);
53 void InsetMathClass::write(TeXMathStream & os) const
55 InsetMathNest::write(os);
60 void InsetMathClass::mathmlize(MathMLStream & ms) const
62 // Skip the \mathXXX macro, the MathML processor is supposed to handle
63 // spacing down the line.
64 for (size_t i = 0; i < nargs(); ++i) {
70 docstring InsetMathClass::name() const
72 return class_to_string(math_class_);
76 void InsetMathClass::infoize(odocstream & os) const