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