]> git.lyx.org Git - lyx.git/blob - src/mathed/math_matrixinset.h
c2daa85dadcb14a69ede5dc7110de79f45602375
[lyx.git] / src / mathed / math_matrixinset.h
1 // -*- C++ -*-
2 #ifndef MATH_MATRIXINSET_H
3 #define MATH_MATRIXINSET_H
4
5 #include <vector>
6
7 #include "math_grid.h"
8
9 #ifdef __GNUG__
10 #pragma interface
11 #endif
12
13 /** Multiline math paragraph base class.
14     This is the base to all multiline editable math objects
15     like array and eqnarray.
16     \author Alejandro Aguilar Sierra
17 */
18
19 class LaTeXFeatures;
20
21 class MathMatrixInset : public MathGridInset {
22 public: 
23         ///
24         MathMatrixInset();
25         ///
26         explicit MathMatrixInset(MathInsetTypes t);
27         ///
28         MathInset * clone() const;
29         ///
30         void Write(std::ostream &, bool fragile) const;
31         ///
32         void Metrics(MathStyles st, int asc = 0, int des = 0);
33         ///
34         void draw(Painter &, int, int);
35         ///
36         string label(int row) const;
37         ///
38         void label(int row, string const & label);
39         ///
40         void numbered(int row, bool num);
41         ///
42         bool numbered(int row) const;
43         ///
44         bool numberedType() const;
45         ///
46         bool display() const;
47         ///
48         bool ams() const;
49         ///
50         std::vector<string> const getLabelList() const;
51         ///
52         void Validate(LaTeXFeatures & features) const;
53
54         ///
55         void addRow(int);
56         ///
57         void delRow(int);
58         ///
59         void addCol(int);
60         ///
61         void delCol(int);
62         ///
63         void appendRow();
64
65         /// change type
66         void mutate(string const &);
67         ///
68         void mutate(short);
69
70 private:
71         ///
72         void Validate1(LaTeXFeatures & features);
73         ///
74         void header_write(std::ostream &) const;
75         ///
76         void footer_write(std::ostream &) const;
77         ///
78         void glueall();
79         ///
80         string nicelabel(int row) const;
81
82         ///
83         std::vector<int> nonum_;
84         ///
85         std::vector<string> label_;
86 };
87
88 #endif