2 #ifndef MATH_HULLINSET_H
3 #define MATH_HULLINSET_H
5 #include "math_gridinset.h"
11 /** This provides an interface between "LyX insets" and "LyX math insets"
12 * \author André Pönitz
17 class MathHullInset : public MathGridInset {
22 explicit MathHullInset(MathInsetTypes t);
24 MathHullInset(MathInsetTypes t, MathGridInset const & grid);
26 MathHullInset(MathInsetTypes t, col_type cols);
28 MathInset * clone() const;
30 void metrics(MathMetricsInfo const & st) const;
32 void draw(Painter &, int x, int y) const;
34 string label(row_type row) const;
36 void label(row_type row, string const & label);
38 void numbered(row_type row, bool num);
40 bool numbered(row_type row) const;
42 bool numberedType() const;
48 std::vector<string> const getLabelList() const;
50 void validate(LaTeXFeatures & features) const;
51 /// identifies MatrixInsets
52 MathHullInset const * asHullInset() const { return this; }
53 /// identifies HullInset
54 MathHullInset * asHullInset() { return this; }
57 void addRow(row_type);
59 void delRow(row_type);
61 void addCol(col_type);
63 void delCol(col_type);
68 void mutate(string const &);
70 void mutate(MathInsetTypes);
73 int defaultColSpace(col_type col);
75 char defaultColAlign(col_type col);
78 MathInsetTypes getType() const;
80 void write(WriteStream & os) const;
82 void mathmlize(MathMLStream &) const;
84 void normalize(NormalStream &) const;
88 void setType(MathInsetTypes t);
90 void validate1(LaTeXFeatures & features);
92 void header_write(WriteStream &) const;
94 void footer_write(WriteStream &) const;
98 string nicelabel(row_type row) const;
103 MathInsetTypes objtype_;
105 std::vector<int> nonum_;
107 std::vector<string> label_;
109 mutable MathMetricsInfo mi_;