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(string const & type);
24 MathInset * clone() const;
26 mode_type currentMode() const;
28 void metrics(MathMetricsInfo & mi) const;
30 void draw(MathPainterInfo &, int x, int y) const;
32 void metricsT(TextMetricsInfo const & mi) const;
34 void drawT(TextPainter &, 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> getLabelList() const;
52 void validate(LaTeXFeatures & features) const;
53 /// identifies MatrixInsets
54 MathHullInset const * asHullInset() const { return this; }
55 /// identifies HullInset
56 MathHullInset * asHullInset() { return this; }
59 void addRow(row_type);
61 void delRow(row_type);
63 void addFancyCol(col_type);
65 void delFancyCol(col_type);
68 string const & getType() const;
70 void mutate(string const &);
73 int defaultColSpace(col_type col);
75 char defaultColAlign(col_type col);
77 bool idxFirst(idx_type &, pos_type &) const;
79 bool idxLast(idx_type &, pos_type &) const;
82 void write(WriteStream & os) const;
84 void mathmlize(MathMLStream &) const;
86 void normalize(NormalStream &) const;
88 void infoize(std::ostream & os) const;
92 void setType(string const & type);
94 void validate1(LaTeXFeatures & features);
96 void header_write(WriteStream &) const;
98 void footer_write(WriteStream &) const;
100 string nicelabel(row_type row) const;
104 char const * standardFont() const;
105 /// consistency check
108 /// "none", "simple", "display", "eqnarray",...
111 std::vector<int> nonum_;
113 std::vector<string> label_;