3 * \file InsetMathEnsureMath.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Enrico Forestieri
10 * Full author contact details are available in file CREDITS.
13 #ifndef MATH_ENSUREMATHINSET_H
14 #define MATH_ENSUREMATHINSET_H
16 #include "InsetMathGrid.h"
22 /// Inset for ensuring math mode
23 class InsetMathEnsureMath : public InsetMathGrid {
25 explicit InsetMathEnsureMath(Buffer * buf);
27 mode_type currentMode() const override { return MATH_MODE; }
29 void metrics(MetricsInfo & mi, Dimension & dim) const override;
31 void draw(PainterInfo & pi, int x, int y) const override;
33 void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
35 void drawT(TextPainter & pi, int x, int y) const override;
37 void addRow(row_type) override {}
39 void delRow(row_type) override {}
41 void swapRow(row_type) override {}
43 void addCol(col_type) override {}
45 void delCol(col_type) override {}
47 docstring eolString(row_type, bool, bool, bool) const override
48 { return docstring(); }
50 docstring eocString(col_type, col_type) const override
51 { return docstring(); }
53 void write(TeXMathStream & os) const override;
55 void mathmlize(MathMLStream &) const override;
57 void htmlize(HtmlStream &) const override;
59 void infoize(odocstream & os) const override;
61 void validate(LaTeXFeatures & features) const override;
63 InsetCode lyxCode() const override { return MATH_ENSUREMATH_CODE; }
65 Inset * clone() const override;