// -*- 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 &);
+ ///
+ virtual std::auto_ptr<InsetBase> clone() 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:
///
- int dh;
+ mutable int dw_;
};
#endif