]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathEnsureMath.h
Account for old versions of Pygments
[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 "InsetMathNest.h"
17
18
19 namespace lyx {
20
21
22 /// Inset for ensuring math mode
23 class InsetMathEnsureMath : public InsetMathNest {
24 public:
25         InsetMathEnsureMath(Buffer * buf);
26         ///
27         mode_type currentMode() const { return MATH_MODE; }
28         ///
29         void metrics(MetricsInfo & mi, Dimension & dim) const;
30         ///
31         void draw(PainterInfo & pi, int x, int y) const;
32         ///
33         void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
34         ///
35         void drawT(TextPainter & pi, int x, int y) const;
36         ///
37         void write(WriteStream & os) const;
38         ///
39         void mathmlize(MathStream &) const;
40         ///
41         void htmlize(HtmlStream &) const;
42         ///
43         void infoize(odocstream & os) const;
44         ///
45         void validate(LaTeXFeatures & features) const;
46         ///
47         InsetCode lyxCode() const { return MATH_ENSUREMATH_CODE; }
48 private:
49         virtual Inset * clone() const;
50 };
51
52
53 } // namespace lyx
54
55 #endif