]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathArray.h
Account for old versions of Pygments
[lyx.git] / src / mathed / InsetMathArray.h
1 // -*- C++ -*-
2 /**
3  * \file InsetMathArray.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author André Pönitz
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATH_ARRAYINSET_H
13 #define MATH_ARRAYINSET_H
14
15 #include "InsetMathGrid.h"
16
17
18 namespace lyx {
19
20
21 /// Inset for things like \begin{array}...\end{array}
22 class InsetMathArray : public InsetMathGrid {
23 public:
24         ///
25         InsetMathArray(Buffer * buf, docstring const &, int m, int n);
26         ///
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);
31         ///
32         void metrics(MetricsInfo & mi, Dimension & dim) const;
33         ///
34         void draw(PainterInfo & pi, int x, int y) const;
35         ///
36         InsetMathArray * asArrayInset() { return this; }
37         ///
38         InsetMathArray const * asArrayInset() const { return this; }
39
40         ///
41         void write(WriteStream & os) const;
42         ///
43         void infoize(odocstream & os) const;
44         ///
45         void normalize(NormalStream & os) const;
46         ///
47         void maple(MapleStream & os) const;
48         ///
49         void validate(LaTeXFeatures & features) const;
50         ///
51         InsetCode lyxCode() const { return MATH_ARRAY_CODE; }
52         ///
53         int leftMargin() const { return 4; } //override
54         ///
55         int rightMargin() const { return 2; } //override
56         ///
57         bool handlesMulticolumn() const { return true; } //override
58
59 private:
60         virtual Inset * clone() const;
61         ///
62         docstring name_;
63 };
64
65
66 } // namespace lyx
67
68 #endif