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 result_type dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
52 void getLabelList(std::vector<string> &) 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 addFancyCol(col_type);
67 void delFancyCol(col_type);
70 string const & getType() const;
72 void mutate(string const &);
75 int defaultColSpace(col_type col);
77 char defaultColAlign(col_type col);
79 bool idxFirst(idx_type &, pos_type &) const;
81 bool idxLast(idx_type &, pos_type &) const;
84 void write(WriteStream & os) const;
86 void mathmlize(MathMLStream &) const;
88 void normalize(NormalStream &) const;
90 void infoize(std::ostream & os) const;
94 void setType(string const & type);
96 void validate1(LaTeXFeatures & features);
98 void header_write(WriteStream &) const;
100 void footer_write(WriteStream &) const;
102 string nicelabel(row_type row) const;
106 char const * standardFont() const;
107 /// consistency check
110 /// "none", "simple", "display", "eqnarray",...
113 std::vector<int> nonum_;
115 std::vector<string> label_;