]> git.lyx.org Git - features.git/blob - src/mathed/InsetMathPar.cpp
* Inset:
[features.git] / src / mathed / InsetMathPar.cpp
1 /**
2  * \file InsetMathPar.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 "InsetMathPar.h"
14 #include "MathData.h"
15 #include "MathStream.h"
16 #include "support/std_ostream.h"
17
18
19 namespace lyx {
20
21 InsetMathPar::InsetMathPar(MathData const & ar)
22 {
23         cells_[0] = ar;
24 }
25
26
27 void InsetMathPar::metrics(MetricsInfo & mi, Dimension & dim) const
28 {
29         FontSetChanger dummy1(mi.base, "textnormal");
30         InsetMathGrid::metrics(mi);
31         dim = dim_;
32 }
33
34
35 void InsetMathPar::draw(PainterInfo & pi, int x, int y) const
36 {
37         FontSetChanger dummy1(pi.base, "textnormal");
38         InsetMathGrid::draw(pi, x, y);
39 }
40
41
42 void InsetMathPar::write(WriteStream & os) const
43 {
44         for (idx_type i = 0; i < nargs(); ++i)
45                 os << cell(i) << "\n";
46 }
47
48
49 void InsetMathPar::infoize(odocstream & os) const
50 {
51         os << "Type: Paragraph ";
52 }
53
54
55 Inset * InsetMathPar::clone() const
56 {
57         return new InsetMathPar(*this);
58 }
59
60
61 } // namespace lyx