]> git.lyx.org Git - features.git/blob - src/mathed/math_arrayinset.C
change a lot of methods to begin with small char
[features.git] / src / mathed / math_arrayinset.C
1 #include <config.h>
2
3 #ifdef __GNUG__
4 #pragma implementation
5 #endif
6
7 #include "math_arrayinset.h"
8 #include "support/LOstream.h"
9 #include "Painter.h"
10
11
12
13 MathArrayInset::MathArrayInset(int m, int n)
14         : MathGridInset(m, n, "array", LM_OT_MATRIX)
15 {}
16
17
18 MathInset * MathArrayInset::clone() const
19 {
20         return new MathArrayInset(*this);
21 }
22
23
24 void MathArrayInset::Write(std::ostream & os, bool fragile) const
25 {
26         if (fragile)
27                 os << "\\protect";
28         os << "\\begin{array}";
29
30         if (v_align_ == 't' || v_align_ == 'b') 
31                 os << '[' << char(v_align_) << ']';
32
33         os << '{';
34         for (int col = 0; col < ncols(); ++col)
35                 os << colinfo_[col].h_align_;
36         os << "}\n";
37
38         MathGridInset::Write(os, fragile);
39
40         if (fragile)
41                 os << "\\protect";
42         os << "\\end{array}\n";
43 }