]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathDelim.h
New methods in LaTeXFeatures specifically for collection of CSS
[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 #include <string>
19
20
21 namespace lyx {
22
23 /// A delimiter like '{' or '(' or '<'
24 class InsetMathDelim : public InsetMathNest {
25 public:
26         ///
27         InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right);
28         ///
29         InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right,
30                 MathData const &);
31         ///
32         InsetMathDelim * asDelimInset() { return this; }
33         ///
34         InsetMathDelim const * asDelimInset() const { return this; }
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 { return MATH_MODE; }
43         ///
44         void metrics(MetricsInfo & mi, Dimension & dim) const;
45         ///
46         void draw(PainterInfo &, int x, int y) const;
47
48         ///
49         void write(WriteStream & os) const;
50         /// write normalized content
51         void normalize(NormalStream &) const;
52         ///
53         void maple(MapleStream &) const;
54         ///
55         void maxima(MaximaStream &) const;
56         ///
57         void mathematica(MathematicaStream &) const;
58         ///
59         void mathmlize(MathStream &) const;
60         ///
61         void htmlize(HtmlStream &) const;
62         ///
63         void octave(OctaveStream &) const;
64         ///
65         InsetCode lyxCode() const { return MATH_DELIM_CODE; }
66         ///
67         docstring left_;
68         ///
69         docstring right_;
70 private:
71         virtual Inset * clone() const;
72         ///
73         mutable int dw_;
74 };
75
76 } // namespace lyx
77
78 #endif