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
10 * Full author contact details are available in file CREDITS.
13 #ifndef MATH_DELIMINSET_H
14 #define MATH_DELIMINSET_H
16 #include "InsetMathNest.h"
21 /// A delimiter like '{' or '(' or '<'
22 class InsetMathDelim : public InsetMathNest {
25 InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right);
27 InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right,
30 InsetMathDelim(Buffer * buf, docstring const & left, docstring const & right,
31 MathData const &, bool const is_extracted);
33 InsetMathDelim * asDelimInset() override { return this; }
35 InsetMathDelim const * asDelimInset() const override { return this; }
37 MathClass mathClass() const override { return MC_INNER; }
39 bool isParenthesis() const;
41 bool isBrackets() const;
45 mode_type currentMode() const override { return MATH_MODE; }
47 void metrics(MetricsInfo & mi, Dimension & dim) const override;
49 void draw(PainterInfo &, int x, int y) const override;
52 void validate(LaTeXFeatures & features) const override;
54 void write(TeXMathStream & os) const override;
55 /// write normalized content
56 void normalize(NormalStream &) const override;
58 void maple(MapleStream &) const override;
60 void maxima(MaximaStream &) const override;
62 void mathematica(MathematicaStream &) const override;
64 void mathmlize(MathMLStream &) const override;
66 void htmlize(HtmlStream &) const override;
68 void octave(OctaveStream &) const override;
70 InsetCode lyxCode() const override { return MATH_DELIM_CODE; }
76 Inset * clone() const override;
79 /// Is it extracted by MathExtern routines? They try to extract as much
80 /// semantics from a raw LaTeX formula in terms of LyX insets.
81 bool const is_extracted_;