3 * \file InsetMathAMSArray.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_AMSARRAYINSET_H
13 #define MATH_AMSARRAYINSET_H
15 #include "InsetMathGrid.h"
20 /// Inset for things like [pbvV]matrix, psmatrix etc
21 class InsetMathAMSArray : public InsetMathGrid {
24 InsetMathAMSArray(Buffer * buf, docstring const &, int m, int n);
26 InsetMathAMSArray(Buffer * buf, docstring const &); ///
35 void metrics(MetricsInfo & mi, Dimension & dim) const;
37 void draw(PainterInfo & pain, int x, int y) const;
39 InsetMathAMSArray * asAMSArrayInset() { return this; }
41 InsetMathAMSArray const * asAMSArrayInset() const { return this; }
44 bool getStatus(Cursor & cur, FuncRequest const & cmd,
45 FuncStatus & flag) const;
47 void write(WriteStream & os) const;
49 void infoize(odocstream & os) const;
51 void normalize(NormalStream &) const;
52 // Don't need mathmlize or htmlize, as this is handled by
53 // InsetMathMatrix after being extracted in MathExtern.
54 // void mathmlize(MathStream &) const;
55 // void htmlize(HTMLStream &) const;
57 void validate(LaTeXFeatures & features) const;
59 InsetCode lyxCode() const { return MATH_AMSARRAY_CODE; }
61 char const * name_left() const;
63 char const * name_right() const;
65 int leftMargin() const { return small() ? 3 : 6; } //override
67 int rightMargin() const { return small() ? 3: 6; } //override
69 bool handlesMulticolumn() const { return true; } //override
72 virtual Inset * clone() const;
74 bool small() const { return name_ == "smallmatrix"; }