2 #ifndef MATH_MATRIXINSET_H
3 #define MATH_MATRIXINSET_H
5 #include "math_gridinset.h"
11 /** Multiline math paragraph base class.
12 This is the base to all multiline editable math objects
13 like array and eqnarray.
14 \author Alejandro Aguilar Sierra
19 class MathMatrixInset : public MathGridInset {
24 explicit MathMatrixInset(MathInsetTypes t);
26 MathMatrixInset(MathInsetTypes t, col_type cols);
28 MathInset * clone() const;
30 void write(std::ostream &, bool fragile) const;
32 void metrics(MathStyles st) const;
34 void draw(Painter &, int x, int y) const;
36 string label(row_type row) const;
38 void label(row_type row, string const & label);
40 void numbered(row_type row, bool num);
42 bool numbered(row_type row) const;
44 bool numberedType() const;
50 std::vector<string> const getLabelList() const;
52 void validate(LaTeXFeatures & features) const;
53 /// identifies MatrixInsets
54 virtual MathMatrixInset const * asMatrixInset() const { return this; }
55 /// identifies MatrixInsets
56 virtual MathMatrixInset * asMatrixInset() { return this; }
59 void addRow(row_type);
61 void delRow(row_type);
63 void addCol(col_type);
65 void delCol(col_type);
70 void mutate(string const &);
72 void mutate(MathInsetTypes);
75 int defaultColSpace(col_type col);
77 char defaultColAlign(col_type col);
80 MathInsetTypes getType() const;
84 void setType(MathInsetTypes t);
86 void validate1(LaTeXFeatures & features);
88 void header_write(std::ostream &) const;
90 void footer_write(std::ostream &) const;
94 string nicelabel(row_type row) const;
97 MathInsetTypes objtype_;
99 std::vector<int> nonum_;
101 std::vector<string> label_;