3 * \file InsetMathArray.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
12 #ifndef MATH_ARRAYINSET_H
13 #define MATH_ARRAYINSET_H
15 #include "InsetMathGrid.h"
21 /// Inset for things like \begin{array}...\end{array}
22 class InsetMathArray : public InsetMathGrid {
25 InsetMathArray(Buffer * buf, docstring const &, int m, int n);
27 InsetMathArray(Buffer * buf, docstring const &, int m, int n,
28 char valign, docstring const & halign);
29 /// convenience constructor from whitespace/newline separated data
30 InsetMathArray(Buffer * buf, docstring const &, docstring const & str);
32 void metrics(MetricsInfo & mi, Dimension & dim) const override;
34 void draw(PainterInfo & pi, int x, int y) const override;
36 InsetMathArray * asArrayInset() override { return this; }
38 InsetMathArray const * asArrayInset() const override { return this; }
41 void write(TeXMathStream & os) const override;
43 void infoize(odocstream & os) const override;
45 void normalize(NormalStream & os) const override;
47 void maple(MapleStream & os) const override;
49 void validate(LaTeXFeatures & features) const override;
51 InsetCode lyxCode() const override { return MATH_ARRAY_CODE; }
53 int leftMargin() const override { return 4; }
55 int rightMargin() const override { return 2; }
57 bool handlesMulticolumn() const override { return true; }
60 Inset * clone() const override;