A bit more re-organization.
[lyx.git] / src / mathed / InsetMathFontOld.cpp
blobf4b87ba4c6229dad09254b55423ad550b318892a
1 /**
2 * \file InsetMathFontOld.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author André Pönitz
8 * Full author contact details are available in file CREDITS.
9 */
11 #include <config.h>
13 #include "InsetMathFontOld.h"
15 #include "MathData.h"
16 #include "MathStream.h"
17 #include "MathParser.h"
18 #include "MetricsInfo.h"
20 #include <ostream>
23 namespace lyx {
25 InsetMathFontOld::InsetMathFontOld(Buffer * buf, latexkeys const * key)
26 : InsetMathNest(buf, 1), key_(key)
28 //lock(true);
32 Inset * InsetMathFontOld::clone() const
34 return new InsetMathFontOld(*this);
38 void InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
40 FontSetChanger dummy(mi.base, key_->name.c_str());
41 cell(0).metrics(mi, dim);
42 metricsMarkers(dim);
46 void InsetMathFontOld::draw(PainterInfo & pi, int x, int y) const
48 FontSetChanger dummy(pi.base, key_->name.c_str());
49 cell(0).draw(pi, x + 1, y);
50 drawMarkers(pi, x, y);
54 void InsetMathFontOld::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
56 cell(0).metricsT(mi, dim);
60 void InsetMathFontOld::drawT(TextPainter & pain, int x, int y) const
62 cell(0).drawT(pain, x, y);
66 void InsetMathFontOld::write(WriteStream & os) const
68 os << "{\\" << key_->name << ' ' << cell(0) << '}';
72 void InsetMathFontOld::normalize(NormalStream & os) const
74 os << "[font " << key_->name << ' ' << cell(0) << ']';
78 void InsetMathFontOld::infoize(odocstream & os) const
80 os << "Font: " << key_->name;
84 } // namespace lyx