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
14 * Full author contact details are available in file CREDITS
19 class MathHullInset : public MathGridInset {
24 explicit MathHullInset(string const & type);
26 MathInset * clone() const;
28 mode_type currentMode() const;
30 void metrics(MathMetricsInfo & mi) const;
32 void draw(MathPainterInfo &, int x, int y) const;
34 void metricsT(TextMetricsInfo const & mi) 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 result_type dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
54 void getLabelList(std::vector<string> &) const;
56 void validate(LaTeXFeatures & features) const;
57 /// identifies MatrixInsets
58 MathHullInset const * asHullInset() const { return this; }
59 /// identifies HullInset
60 MathHullInset * asHullInset() { return this; }
63 void addRow(row_type row);
65 void delRow(row_type row);
67 void addCol(col_type col);
69 void delCol(col_type col);
72 string const & getType() const;
74 void mutate(string const &);
77 int defaultColSpace(col_type col);
79 char defaultColAlign(col_type col);
81 bool idxFirst(idx_type &, pos_type &) const;
83 bool idxLast(idx_type &, pos_type &) const;
86 void write(WriteStream & os) const;
88 void mathmlize(MathMLStream &) const;
90 void normalize(NormalStream &) const;
92 void infoize(std::ostream & os) const;
96 string eolString(row_type row, bool fragile) const;
100 void setType(string const & type);
102 void validate1(LaTeXFeatures & features);
104 void header_write(WriteStream &) const;
106 void footer_write(WriteStream &) const;
108 string nicelabel(row_type row) const;
110 void doExtern(FuncRequest const & func, idx_type & idx, pos_type & pos);
114 char const * standardFont() const;
115 /// consistency check
117 /// can this change its number of cols?
118 bool colChangeOK() const;
120 /// "none", "simple", "display", "eqnarray",...
123 std::vector<int> nonum_;
125 std::vector<string> label_;