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