]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathString.h
Make BufferView::singeParUpdate more robust
[lyx.git] / src / mathed / InsetMathString.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathString.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  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_STRINGINSET_H
13 #define MATH_STRINGINSET_H
14
15 #include "InsetMath.h"
16
17 #include "support/docstring.h"
18
19
20 namespace lyx {
21
22 /** Some collection of chars with similar properties
23  *  mainly for math-extern
24  */
25
26 class InsetMathString : public InsetMath {
27 public:
28         ///
29         explicit InsetMathString(Buffer * buf, docstring const & s);
30         ///
31         void metrics(MetricsInfo & mi, Dimension & dim) const override;
32         ///
33         void draw(PainterInfo & pi, int x, int y) const override;
34         ///
35         docstring str() const { return str_; }
36         ///
37         InsetMathString * asStringInset() override { return this; }
38         ///
39         InsetMathString const * asStringInset() const override { return this; }
40
41         ///
42         void normalize(NormalStream &) const override;
43         ///
44         void octave(OctaveStream &) const override;
45         ///
46         void maple(MapleStream &) const override;
47         ///
48         void mathematica(MathematicaStream &) const override;
49         ///
50         void mathmlize(MathMLStream &) const override;
51         ///
52         void write(TeXMathStream & os) const override;
53         ///
54         InsetCode lyxCode() const override { return MATH_STRING_CODE; }
55
56 private:
57         Inset * clone() const override;
58         /// the string
59         docstring str_;
60 };
61
62 } // namespace lyx
63
64 #endif