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