]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathDelim.h
69242d50a7e66b1d8aa5c48b6c2fc5123a22a6b5
[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() { return this; }
31         ///
32         InsetMathDelim const * asDelimInset() const { return this; }
33         ///
34         MathClass mathClass() const { return MC_INNER; }
35         ///
36         marker_type marker(BufferView const *) const { return NO_MARKER; }
37         /// is it (...)?
38         bool isParenthesis() const;
39         /// is it [...]?
40         bool isBrackets() const;
41         /// is it |...|?
42         bool isAbs() const;
43         ///
44         mode_type currentMode() const { return MATH_MODE; }
45         ///
46         void metrics(MetricsInfo & mi, Dimension & dim) const;
47         ///
48         void draw(PainterInfo &, int x, int y) const;
49
50         ///
51         void validate(LaTeXFeatures & features) const;
52         ///
53         void write(WriteStream & os) const;
54         /// write normalized content
55         void normalize(NormalStream &) const;
56         ///
57         void maple(MapleStream &) const;
58         ///
59         void maxima(MaximaStream &) const;
60         ///
61         void mathematica(MathematicaStream &) const;
62         ///
63         void mathmlize(MathStream &) const;
64         ///
65         void htmlize(HtmlStream &) const;
66         ///
67         void octave(OctaveStream &) const;
68         ///
69         InsetCode lyxCode() const { return MATH_DELIM_CODE; }
70         ///
71         docstring left_;
72         ///
73         docstring right_;
74 private:
75         virtual Inset * clone() const;
76         ///
77         mutable int dw_;
78 };
79
80 } // namespace lyx
81
82 #endif