3 * \file math_hullinset.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_HULLINSET_H
13 #define MATH_HULLINSET_H
15 #include "math_gridinset.h"
20 /// This provides an interface between "LyX insets" and "LyX math insets"
21 class MathHullInset : public MathGridInset {
26 explicit MathHullInset(string const & type);
28 virtual std::auto_ptr<InsetBase> clone() const;
30 mode_type currentMode() const;
32 void metrics(MetricsInfo & mi, Dimension & dim) const;
34 void draw(PainterInfo &, int x, int y) const;
36 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
38 void drawT(TextPainter &, int x, int y) const;
40 string label(row_type row) const;
42 void label(row_type row, string const & label);
44 void numbered(row_type row, bool num);
46 bool numbered(row_type row) const;
48 bool numberedType() const;
54 dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
56 void getLabelList(std::vector<string> &) const;
58 void validate(LaTeXFeatures & features) const;
59 /// identifies MatrixInsets
60 MathHullInset const * asHullInset() const { return this; }
61 /// identifies HullInset
62 MathHullInset * asHullInset() { return this; }
65 void addRow(row_type row);
67 void delRow(row_type row);
69 void addCol(col_type col);
71 void delCol(col_type col);
74 string const & getType() const;
76 void mutate(string const &);
79 int defaultColSpace(col_type col);
81 char defaultColAlign(col_type col);
83 bool idxFirst(idx_type &, pos_type &) const;
85 bool idxLast(idx_type &, pos_type &) const;
88 string fileInsetLabel() const;
90 void write(WriteStream & os) const;
92 void mathmlize(MathMLStream &) const;
94 void normalize(NormalStream &) const;
96 void infoize(std::ostream & os) const;
100 string eolString(row_type row, bool fragile) const;
104 void setType(string const & type);
106 void validate1(LaTeXFeatures & features);
108 void header_write(WriteStream &) const;
110 void footer_write(WriteStream &) const;
112 string nicelabel(row_type row) const;
114 void doExtern(FuncRequest const & func, idx_type & idx, pos_type & pos);
118 char const * standardFont() const;
119 /// consistency check
121 /// can this change its number of cols?
122 bool colChangeOK() const;
124 /// "none", "simple", "display", "eqnarray",...
127 std::vector<int> nonum_;
129 std::vector<string> label_;