]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathDelim.h
Limit the nopassthurchars case in beamer to URL
[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(Buffer * buf, docstring const & left, docstring const & right,
31                        MathData const &, bool const is_extracted);
32         ///
33         InsetMathDelim * asDelimInset() override { return this; }
34         ///
35         InsetMathDelim const * asDelimInset() const override { return this; }
36         ///
37         MathClass mathClass() const override { return MC_INNER; }
38         /// is it (...)?
39         bool isParenthesis() const;
40         /// is it [...]?
41         bool isBrackets() const;
42         /// is it |...|?
43         bool isAbs() const;
44         ///
45         mode_type currentMode() const override { return MATH_MODE; }
46         ///
47         void metrics(MetricsInfo & mi, Dimension & dim) const override;
48         ///
49         void draw(PainterInfo &, int x, int y) const override;
50
51         ///
52         void validate(LaTeXFeatures & features) const override;
53         ///
54         void write(TeXMathStream & os) const override;
55         /// write normalized content
56         void normalize(NormalStream &) const override;
57         ///
58         void maple(MapleStream &) const override;
59         ///
60         void maxima(MaximaStream &) const override;
61         ///
62         void mathematica(MathematicaStream &) const override;
63         ///
64         void mathmlize(MathMLStream &) const override;
65         ///
66         void htmlize(HtmlStream &) const override;
67         ///
68         void octave(OctaveStream &) const override;
69         ///
70         InsetCode lyxCode() const override { return MATH_DELIM_CODE; }
71         ///
72         docstring left_;
73         ///
74         docstring right_;
75 private:
76         Inset * clone() const override;
77         ///
78         mutable int dw_;
79         /// Is it extracted by MathExtern routines? They try to extract as much
80         /// semantics from a raw LaTeX formula in terms of LyX insets.
81         bool const is_extracted_;
82 };
83
84 } // namespace lyx
85
86 #endif