]> git.lyx.org Git - features.git/blob - src/mathed/math_deliminset.h
Replace LString.h with support/std_string.h,
[features.git] / src / mathed / math_deliminset.h
1 // -*- C++ -*-
2 /**
3  * \file math_deliminset.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 "math_nestinset.h"
17 #include "support/std_string.h"
18
19
20 /// A delimiter
21 class MathDelimInset : public MathNestInset {
22 public:
23         ///
24         MathDelimInset(string const & left, string const & right);
25         ///
26         MathDelimInset(string const & left, string const & right, MathArray const &);
27         ///
28         virtual std::auto_ptr<InsetBase> clone() const;
29         ///
30         MathDelimInset * asDelimInset() { return this; }
31         ///
32         MathDelimInset const * asDelimInset() const { return this; }
33         /// is it (...)?
34         bool isParanthesis() const;
35         /// is it [...]?
36         bool isBrackets() const;
37         /// is it |...|?
38         bool isAbs() const;
39         ///
40         void metrics(MetricsInfo & mi, Dimension & dim) const;
41         ///
42         void draw(PainterInfo &, int x, int y) const;
43
44         ///
45         void write(WriteStream & os) const;
46         /// write normalized content
47         void normalize(NormalStream &) const;
48         ///
49         void maple(MapleStream &) const;
50         ///
51         void maxima(MaximaStream &) const;
52         ///
53         void mathematica(MathematicaStream &) const;
54         ///
55         void mathmlize(MathMLStream &) const;
56         ///
57         void octave(OctaveStream &) const;
58         ///
59         string left_;
60         ///
61         string right_;
62 private:
63         ///
64         mutable int dw_;
65 };
66 #endif