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(MetricsInfo & mi, Dimension & dim) const;
29 void draw(PainterInfo &, int x, int y) const;
31 void metricsT(TextMetricsInfo const & mi, Dimension & dim) 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 string fileInsetLabel() const;
85 void write(WriteStream & os) const;
87 void mathmlize(MathMLStream &) const;
89 void normalize(NormalStream &) const;
91 void infoize(std::ostream & os) const;
95 string eolString(row_type row, bool fragile) const;
99 void setType(string const & type);
101 void validate1(LaTeXFeatures & features);
103 void header_write(WriteStream &) const;
105 void footer_write(WriteStream &) const;
107 string nicelabel(row_type row) const;
109 void doExtern(FuncRequest const & func, idx_type & idx, pos_type & pos);
113 char const * standardFont() const;
114 /// consistency check
116 /// can this change its number of cols?
117 bool colChangeOK() const;
119 /// "none", "simple", "display", "eqnarray",...
122 std::vector<int> nonum_;
124 std::vector<string> label_;