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, col_type cols);
26 MathInset * clone() const;
28 void metrics(MathMetricsInfo const & st) const;
30 void draw(Painter &, int x, int y) const;
32 string label(row_type row) const;
34 void label(row_type row, string const & label);
36 void numbered(row_type row, bool num);
38 bool numbered(row_type row) const;
40 bool numberedType() const;
46 std::vector<string> const getLabelList() const;
48 void validate(LaTeXFeatures & features) const;
49 /// identifies MatrixInsets
50 MathHullInset const * asHullInset() const { return this; }
51 /// identifies HullInset
52 MathHullInset * asHullInset() { return this; }
55 void addRow(row_type);
57 void delRow(row_type);
59 void addCol(col_type);
61 void delCol(col_type);
66 void mutate(string const &);
68 void mutate(MathInsetTypes);
71 int defaultColSpace(col_type col);
73 char defaultColAlign(col_type col);
76 MathInsetTypes getType() const;
78 void write(WriteStream & os) const;
80 void mathmlize(MathMLStream &) const;
82 void normalize(NormalStream &) const;
86 void setType(MathInsetTypes t);
88 void validate1(LaTeXFeatures & features);
90 void header_write(WriteStream &) const;
92 void footer_write(WriteStream &) const;
96 string nicelabel(row_type row) const;
101 MathInsetTypes objtype_;
103 std::vector<int> nonum_;
105 std::vector<string> label_;
107 mutable MathMetricsInfo mi_;