2 #ifndef MATH_HULLINSET_H
3 #define MATH_HULLINSET_H
5 #include "math_gridinset.h"
8 /** This provides an interface between "LyX insets" and "LyX math insets"
11 * Full author contact details are available in file CREDITS
16 class MathHullInset : public MathGridInset {
21 explicit MathHullInset(string const & type);
23 MathInset * clone() const;
25 mode_type currentMode() const;
27 void metrics(MathMetricsInfo & mi) const;
29 void draw(MathPainterInfo &, int x, int y) const;
31 void metricsT(TextMetricsInfo const & mi) const;
33 void drawT(TextPainter &, int x, int y) const;
35 string label(row_type row) const;
37 void label(row_type row, string const & label);
39 void numbered(row_type row, bool num);
41 bool numbered(row_type row) const;
43 bool numberedType() const;
49 dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
51 void getLabelList(std::vector<string> &) const;
53 void validate(LaTeXFeatures & features) const;
54 /// identifies MatrixInsets
55 MathHullInset const * asHullInset() const { return this; }
56 /// identifies HullInset
57 MathHullInset * asHullInset() { return this; }
60 void addRow(row_type row);
62 void delRow(row_type row);
64 void addCol(col_type col);
66 void delCol(col_type col);
69 string const & getType() const;
71 void mutate(string const &);
74 int defaultColSpace(col_type col);
76 char defaultColAlign(col_type col);
78 bool idxFirst(idx_type &, pos_type &) const;
80 bool idxLast(idx_type &, pos_type &) const;
83 void write(WriteStream & os) const;
85 void mathmlize(MathMLStream &) const;
87 void normalize(NormalStream &) const;
89 void infoize(std::ostream & os) const;
93 string eolString(row_type row, bool fragile) const;
97 void setType(string const & type);
99 void validate1(LaTeXFeatures & features);
101 void header_write(WriteStream &) const;
103 void footer_write(WriteStream &) const;
105 string nicelabel(row_type row) const;
107 void doExtern(FuncRequest const & func, idx_type & idx, pos_type & pos);
111 char const * standardFont() const;
112 /// consistency check
114 /// can this change its number of cols?
115 bool colChangeOK() const;
117 /// "none", "simple", "display", "eqnarray",...
120 std::vector<int> nonum_;
122 std::vector<string> label_;