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 "InsetMathNest.h"
22 /// Inset for ensuring math mode
23 class InsetMathEnsureMath : public InsetMathNest {
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 write(TeXMathStream & os) const override;
39 void mathmlize(MathMLStream &) const override;
41 void htmlize(HtmlStream &) const override;
43 void infoize(odocstream & os) const override;
45 void validate(LaTeXFeatures & features) const override;
47 InsetCode lyxCode() const override { return MATH_ENSUREMATH_CODE; }
49 Inset * clone() const override;