2 * \file InsetMathFontOld.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 "InsetMathFontOld.h"
15 #include "MathStream.h"
16 #include "MathParser.h"
17 #include "MathStream.h"
18 #include "support/std_ostream.h"
26 InsetMathFontOld::InsetMathFontOld(latexkeys const * key)
27 : InsetMathNest(1), key_(key)
33 auto_ptr<Inset> InsetMathFontOld::doClone() const
35 return auto_ptr<Inset>(new InsetMathFontOld(*this));
39 bool InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
41 FontSetChanger dummy(mi.base, key_->name.c_str());
42 cell(0).metrics(mi, dim);
51 void InsetMathFontOld::draw(PainterInfo & pi, int x, int y) const
53 FontSetChanger dummy(pi.base, key_->name.c_str());
54 cell(0).draw(pi, x + 1, y);
55 drawMarkers(pi, x, y);
59 void InsetMathFontOld::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
61 cell(0).metricsT(mi, dim);
65 void InsetMathFontOld::drawT(TextPainter & pain, int x, int y) const
67 cell(0).drawT(pain, x, y);
71 void InsetMathFontOld::write(WriteStream & os) const
73 os << "{\\" << key_->name << ' ' << cell(0) << '}';
77 void InsetMathFontOld::normalize(NormalStream & os) const
79 os << "[font " << key_->name << ' ' << cell(0) << ']';
83 void InsetMathFontOld::infoize(odocstream & os) const
85 os << "Font: " << key_->name;