]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathEnsureMath.h
g-brief loads babel internally. So don't load it ourselves.
[lyx.git] / src / mathed / InsetMathEnsureMath.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathEnsureMath.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  * \author Enrico Forestieri
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_ENSUREMATHINSET_H
14 #define MATH_ENSUREMATHINSET_H
15
16 #include "InsetMathGrid.h"
17
18
19 namespace lyx {
20
21
22 /// Inset for ensuring math mode
23 class InsetMathEnsureMath : public InsetMathGrid {
24 public:
25         explicit InsetMathEnsureMath(Buffer * buf);
26         ///
27         mode_type currentMode() const override { return MATH_MODE; }
28         ///
29         void metrics(MetricsInfo & mi, Dimension & dim) const override;
30         ///
31         void draw(PainterInfo & pi, int x, int y) const override;
32         ///
33         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const override;
34         ///
35         void drawT(TextPainter & pi, int x, int y) const override;
36         ///
37         void addRow(row_type) override {}
38         ///
39         void delRow(row_type) override {}
40         ///
41         void swapRow(row_type) override {}
42         ///
43         void addCol(col_type) override {}
44         ///
45         void delCol(col_type) override {}
46         ///
47         void eol(TeXMathStream &, row_type, bool, bool, bool) const override {}
48         ///
49         docstring eocString(col_type, col_type) const override
50         { return docstring(); }
51         ///
52         void write(TeXMathStream & os) const override;
53         ///
54         void mathmlize(MathMLStream &) const override;
55         ///
56         void htmlize(HtmlStream &) const override;
57         ///
58         void infoize(odocstream & os) const override;
59         ///
60         void validate(LaTeXFeatures & features) const override;
61         ///
62         InsetCode lyxCode() const override { return MATH_ENSUREMATH_CODE; }
63 private:
64         Inset * clone() const override;
65 };
66
67
68 } // namespace lyx
69
70 #endif