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 void metricsT(TextMetricsInfo const & st) const;
36 void drawT(TextPainter &, int x, int y) const;
38 string label(row_type row) const;
40 void label(row_type row, string const & label);
42 void numbered(row_type row, bool num);
44 bool numbered(row_type row) const;
46 bool numberedType() const;
52 std::vector<string> const getLabelList() const;
54 void validate(LaTeXFeatures & features) const;
55 /// identifies MatrixInsets
56 MathHullInset const * asHullInset() const { return this; }
57 /// identifies HullInset
58 MathHullInset * asHullInset() { return this; }
61 void addRow(row_type);
63 void delRow(row_type);
65 void addCol(col_type);
67 void delCol(col_type);
72 void mutate(string const &);
74 void mutate(MathInsetTypes);
77 int defaultColSpace(col_type col);
79 char defaultColAlign(col_type col);
82 MathInsetTypes getType() const;
84 void write(WriteStream & os) const;
86 void mathmlize(MathMLStream &) const;
88 void normalize(NormalStream &) const;
92 void setType(MathInsetTypes t);
94 void validate1(LaTeXFeatures & features);
96 void header_write(WriteStream &) const;
98 void footer_write(WriteStream &) const;
102 string nicelabel(row_type row) const;
103 /// consistency check
107 MathInsetTypes objtype_;
109 std::vector<int> nonum_;
111 std::vector<string> label_;
113 mutable MathMetricsInfo mi_;