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 write(WriteStream & os) const;
30 void normalize(NormalStream &) const;
32 void metrics(MathMetricsInfo const & st) const;
34 void draw(Painter &, int x, int y) const;
36 string label(row_type row) const;
38 void label(row_type row, string const & label);
40 void numbered(row_type row, bool num);
42 bool numbered(row_type row) const;
44 bool numberedType() const;
50 std::vector<string> const getLabelList() const;
52 void validate(LaTeXFeatures & features) const;
53 /// identifies MatrixInsets
54 virtual MathHullInset const * asHullInset() const { return this; }
55 /// identifies HullInset
56 virtual MathHullInset * asHullInset() { return this; }
59 void addRow(row_type);
61 void delRow(row_type);
63 void addCol(col_type);
65 void delCol(col_type);
70 void mutate(string const &);
72 void mutate(MathInsetTypes);
75 int defaultColSpace(col_type col);
77 char defaultColAlign(col_type col);
80 MathInsetTypes getType() const;
82 void mathmlize(MathMLStream &) const;
86 void setType(MathInsetTypes t);
88 void validate1(LaTeXFeatures & features);
90 void header_write(std::ostream &) const;
92 void footer_write(std::ostream &) const;
96 string nicelabel(row_type row) const;
99 MathInsetTypes objtype_;
101 std::vector<int> nonum_;
103 std::vector<string> label_;
105 mutable MathMetricsInfo mi_;