]> git.lyx.org Git - features.git/blob - src/mathed/InsetMathFontOld.cpp
remove unneeded includes.
[features.git] / src / mathed / InsetMathFontOld.cpp
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.
5  *
6  * \author André Pönitz
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "InsetMathFontOld.h"
14
15 #include "MathData.h"
16 #include "MathStream.h"
17 #include "MathParser.h"
18 #include "MetricsInfo.h"
19
20
21 namespace lyx {
22
23 InsetMathFontOld::InsetMathFontOld(latexkeys const * key)
24         : InsetMathNest(1), key_(key)
25 {
26         //lock(true);
27 }
28
29
30 Inset * InsetMathFontOld::clone() const
31 {
32         return new InsetMathFontOld(*this);
33 }
34
35
36 void InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
37 {
38         FontSetChanger dummy(mi.base, key_->name.c_str());
39         cell(0).metrics(mi, dim);
40         metricsMarkers(dim);
41 }
42
43
44 void InsetMathFontOld::draw(PainterInfo & pi, int x, int y) const
45 {
46         FontSetChanger dummy(pi.base, key_->name.c_str());
47         cell(0).draw(pi, x + 1, y);
48         drawMarkers(pi, x, y);
49 }
50
51
52 void InsetMathFontOld::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
53 {
54         cell(0).metricsT(mi, dim);
55 }
56
57
58 void InsetMathFontOld::drawT(TextPainter & pain, int x, int y) const
59 {
60         cell(0).drawT(pain, x, y);
61 }
62
63
64 void InsetMathFontOld::write(WriteStream & os) const
65 {
66         os << "{\\" << key_->name << ' ' << cell(0) << '}';
67 }
68
69
70 void InsetMathFontOld::normalize(NormalStream & os) const
71 {
72         os << "[font " << key_->name << ' ' << cell(0) << ']';
73 }
74
75
76 void InsetMathFontOld::infoize(odocstream & os) const
77 {
78         os << "Font: " << key_->name;
79 }
80
81
82 } // namespace lyx