]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathDelim.h
Display equation/theorem numbers in insert cross reference dialog.
[lyx.git] / src / mathed / InsetMathDelim.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathDelim.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Alejandro Aguilar Sierra
8  * \author André Pönitz
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef MATH_DELIMINSET_H
14 #define MATH_DELIMINSET_H
15
16 #include "InsetMathNest.h"
17
18
19 namespace lyx {
20
21 /// A delimiter like '{' or '(' or '<'
22 class InsetMathDelim : public InsetMathNest {
23 public:
24         ///
25         InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right);
26         ///
27         InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right,
28                 MathData const &);
29         ///
30         InsetMathDelim * asDelimInset() override { return this; }
31         ///
32         InsetMathDelim const * asDelimInset() const override { return this; }
33         ///
34         MathClass mathClass() const override { return MC_INNER; }
35         /// is it (...)?
36         bool isParenthesis() const;
37         /// is it [...]?
38         bool isBrackets() const;
39         /// is it |...|?
40         bool isAbs() const;
41         ///
42         mode_type currentMode() const override { return MATH_MODE; }
43         ///
44         void metrics(MetricsInfo & mi, Dimension & dim) const override;
45         ///
46         void draw(PainterInfo &, int x, int y) const override;
47
48         ///
49         void validate(LaTeXFeatures & features) const override;
50         ///
51         void write(TeXMathStream & os) const override;
52         /// write normalized content
53         void normalize(NormalStream &) const override;
54         ///
55         void maple(MapleStream &) const override;
56         ///
57         void maxima(MaximaStream &) const override;
58         ///
59         void mathematica(MathematicaStream &) const override;
60         ///
61         void mathmlize(MathMLStream &) const override;
62         ///
63         void htmlize(HtmlStream &) const override;
64         ///
65         void octave(OctaveStream &) const override;
66         ///
67         InsetCode lyxCode() const override { return MATH_DELIM_CODE; }
68         ///
69         docstring left_;
70         ///
71         docstring right_;
72 private:
73         Inset * clone() const override;
74         ///
75         mutable int dw_;
76 };
77
78 } // namespace lyx
79
80 #endif