]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathDelim.h
Get package things working with modules prior to UI patch.
[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(docstring const & left, docstring const & right);
28         ///
29         InsetMathDelim(docstring const & left, docstring const & right, MathData const &);
30         ///
31         InsetMathDelim * asDelimInset() { return this; }
32         ///
33         InsetMathDelim const * asDelimInset() const { return this; }
34         /// is it (...)?
35         bool isParenthesis() const;
36         /// is it [...]?
37         bool isBrackets() const;
38         /// is it |...|?
39         bool isAbs() const;
40         ///
41         mode_type currentMode() const { return MATH_MODE; }
42         ///
43         bool metrics(MetricsInfo & mi, Dimension & dim) const;
44         ///
45         void draw(PainterInfo &, int x, int y) const;
46
47         ///
48         void write(WriteStream & os) const;
49         /// write normalized content
50         void normalize(NormalStream &) const;
51         ///
52         void maple(MapleStream &) const;
53         ///
54         void maxima(MaximaStream &) const;
55         ///
56         void mathematica(MathematicaStream &) const;
57         ///
58         void mathmlize(MathStream &) const;
59         ///
60         void octave(OctaveStream &) const;
61         ///
62         docstring left_;
63         ///
64         docstring right_;
65 private:
66         virtual std::auto_ptr<Inset> doClone() const;
67         ///
68         mutable int dw_;
69 };
70
71 } // namespace lyx
72
73 #endif