]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathXYMatrix.C
fix reading UTF8 encoded symbol file
[lyx.git] / src / mathed / InsetMathXYMatrix.C
1 /**
2  * \file InsetMathXYMatrix.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 "InsetMathXYMatrix.h"
14 #include "MathStream.h"
15 #include "MathStream.h"
16
17 #include "LaTeXFeatures.h"
18 #include "support/std_ostream.h"
19
20
21 namespace lyx {
22
23
24 InsetMathXYMatrix::InsetMathXYMatrix()
25         : InsetMathGrid(1, 1)
26 {}
27
28
29 std::auto_ptr<InsetBase> InsetMathXYMatrix::doClone() const
30 {
31         return std::auto_ptr<InsetBase>(new InsetMathXYMatrix(*this));
32 }
33
34
35 int InsetMathXYMatrix::colsep() const
36 {
37         return 40;
38 }
39
40
41 int InsetMathXYMatrix::rowsep() const
42 {
43         return 40;
44 }
45
46
47 void InsetMathXYMatrix::metrics(MetricsInfo & mi, Dimension & dim) const
48 {
49         if (mi.base.style == LM_ST_DISPLAY)
50                 mi.base.style = LM_ST_TEXT;
51         InsetMathGrid::metrics(mi, dim);
52 }
53
54
55 void InsetMathXYMatrix::write(WriteStream & os) const
56 {
57         os << "\\xymatrix{";
58         InsetMathGrid::write(os);
59         os << "}\n";
60 }
61
62
63 void InsetMathXYMatrix::infoize(odocstream & os) const
64 {
65         os << "xymatrix ";
66         InsetMathGrid::infoize(os);
67 }
68
69
70 void InsetMathXYMatrix::normalize(NormalStream & os) const
71 {
72         os << "[xymatrix ";
73         InsetMathGrid::normalize(os);
74         os << ']';
75 }
76
77
78 void InsetMathXYMatrix::maple(MapleStream & os) const
79 {
80         os << "xymatrix(";
81         InsetMathGrid::maple(os);
82         os << ')';
83 }
84
85
86 } // namespace lyx