]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathFontOld.C
move everything into namespace lyx
[lyx.git] / src / mathed / InsetMathFontOld.C
1 /**
2  * \file InsetMathFontOld.C
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 #include "MathData.h"
15 #include "MathMLStream.h"
16 #include "MathParser.h"
17 #include "MathStream.h"
18 #include "support/std_ostream.h"
19
20
21 namespace lyx {
22
23 using std::auto_ptr;
24
25
26 InsetMathFontOld::InsetMathFontOld(latexkeys const * key)
27         : InsetMathNest(1), key_(key)
28 {
29         //lock(true);
30 }
31
32
33 auto_ptr<InsetBase> InsetMathFontOld::doClone() const
34 {
35         return auto_ptr<InsetBase>(new InsetMathFontOld(*this));
36 }
37
38
39 void InsetMathFontOld::metrics(MetricsInfo & mi, Dimension & dim) const
40 {
41         FontSetChanger dummy(mi.base, key_->name.c_str());
42         cell(0).metrics(mi, dim);
43         metricsMarkers(dim);
44         dim_ = dim;
45 }
46
47
48 void InsetMathFontOld::draw(PainterInfo & pi, int x, int y) const
49 {
50         FontSetChanger dummy(pi.base, key_->name.c_str());
51         cell(0).draw(pi, x + 1, y);
52         drawMarkers(pi, x, y);
53 }
54
55
56 void InsetMathFontOld::metricsT(TextMetricsInfo const & mi, Dimension & dim) const
57 {
58         cell(0).metricsT(mi, dim);
59 }
60
61
62 void InsetMathFontOld::drawT(TextPainter & pain, int x, int y) const
63 {
64         cell(0).drawT(pain, x, y);
65 }
66
67
68 void InsetMathFontOld::write(WriteStream & os) const
69 {
70         os << "{\\" << key_->name << ' ' << cell(0) << '}';
71 }
72
73
74 void InsetMathFontOld::normalize(NormalStream & os) const
75 {
76         os << "[font " << key_->name << ' ' << cell(0) << ']';
77 }
78
79
80 void InsetMathFontOld::infoize(std::ostream & os) const
81 {
82         os << "Font: " << key_->name;
83 }
84
85
86 } // namespace lyx