A bit more re-organization.
[lyx.git] / src / mathed / InsetMathDelim.h
blob67e1db09063db2ea4494fbbd354d710ab9761732
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.
7 * \author Alejandro Aguilar Sierra
8 * \author André Pönitz
10 * Full author contact details are available in file CREDITS.
13 #ifndef MATH_DELIMINSET_H
14 #define MATH_DELIMINSET_H
16 #include "InsetMathNest.h"
18 #include <string>
21 namespace lyx {
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;
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 octave(OctaveStream &) const;
62 ///
63 InsetCode lyxCode() const { return MATH_DELIM_CODE; }
64 ///
65 docstring left_;
66 ///
67 docstring right_;
68 private:
69 virtual Inset * clone() const;
70 ///
71 mutable int dw_;
74 } // namespace lyx
76 #endif