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(MathWriteInfo & os) const;
32 void writeNormal(std::ostream &) const;
34 void metrics(MathMetricsInfo const & st) const;
36 void draw(Painter &, int x, int y) const;
38 string label(row_type row) const;
40 void label(row_type row, string const & label);
42 void numbered(row_type row, bool num);
44 bool numbered(row_type row) const;
46 bool numberedType() const;
52 std::vector<string> const getLabelList() const;
54 void validate(LaTeXFeatures & features) const;
55 /// identifies MatrixInsets
56 virtual MathMatrixInset const * asMatrixInset() const { return this; }
57 /// identifies MatrixInsets
58 virtual MathMatrixInset * asMatrixInset() { return this; }
61 void addRow(row_type);
63 void delRow(row_type);
65 void addCol(col_type);
67 void delCol(col_type);
72 void mutate(string const &);
74 void mutate(MathInsetTypes);
77 int defaultColSpace(col_type col);
79 char defaultColAlign(col_type col);
82 MathInsetTypes getType() const;
84 void mathmlize(MathMLStream &) const;
88 void setType(MathInsetTypes t);
90 void validate1(LaTeXFeatures & features);
92 void header_write(std::ostream &) const;
94 void footer_write(std::ostream &) const;
98 string nicelabel(row_type row) const;
101 MathInsetTypes objtype_;
103 std::vector<int> nonum_;
105 std::vector<string> label_;
107 mutable MathMetricsInfo mi_;