]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_deliminset.h
Make Helge happy: no more crash on arrow up/down in math macro
[lyx.git] / src / mathed / math_deliminset.h
index b2336a0ee7e7a38b1f1a7c1ab79ab08fb31ca94d..23955f8d009aff28b945cb2221a0e5626a1e24e1 100644 (file)
@@ -1,30 +1,66 @@
 // -*- C++ -*-
+/**
+ * \file math_deliminset.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author Alejandro Aguilar Sierra
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
 #ifndef MATH_DELIMINSET_H
 #define MATH_DELIMINSET_H
 
-#include "math_parinset.h"
+#include "math_nestinset.h"
+
+#include <string>
+
 
 /// A delimiter
-class MathDelimInset: public MathParInset {
+class MathDelimInset : public MathNestInset {
 public:
        ///
-       MathDelimInset(int, int, short st = LM_ST_TEXT);
+       MathDelimInset(std::string const & left, std::string const & right);
+       ///
+       MathDelimInset(std::string const & left, std::string const & right, MathArray const &);
+       ///
+       MathDelimInset * asDelimInset() { return this; }
+       ///
+       MathDelimInset const * asDelimInset() const { return this; }
+       /// is it (...)?
+       bool isParanthesis() const;
+       /// is it [...]?
+       bool isBrackets() const;
+       /// is it |...|?
+       bool isAbs() const;
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       ///
+       void draw(PainterInfo &, int x, int y) const;
+
+       ///
+       void write(WriteStream & os) const;
+       /// write normalized content
+       void normalize(NormalStream &) const;
        ///
-       MathedInset * Clone();
+       void maple(MapleStream &) const;
        ///
-       void draw(Painter &, int, int);
+       void maxima(MaximaStream &) const;
        ///
-       void Write(std::ostream &, bool fragile);
+       void mathematica(MathematicaStream &) const;
        ///
-       void Metrics();
-protected:
+       void mathmlize(MathMLStream &) const;
        ///
-       int left;
+       void octave(OctaveStream &) const;
        ///
-       int right;
+       std::string left_;
        ///
-       int dw;
+       std::string right_;
+private:
+       virtual std::auto_ptr<InsetBase> doClone() const;
        ///
-       int dh;
+       mutable int dw_;
 };
 #endif