]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathArray.h
Move <algorithm> from DocIterator.h
[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 override;
33         ///
34         void draw(PainterInfo & pi, int x, int y) const override;
35         ///
36         InsetMathArray * asArrayInset() override { return this; }
37         ///
38         InsetMathArray const * asArrayInset() const override { return this; }
39
40         ///
41         void write(WriteStream & os) const override;
42         ///
43         void infoize(odocstream & os) const override;
44         ///
45         void normalize(NormalStream & os) const override;
46         ///
47         void maple(MapleStream & os) const override;
48         ///
49         void validate(LaTeXFeatures & features) const override;
50         ///
51         InsetCode lyxCode() const override { return MATH_ARRAY_CODE; }
52         ///
53         int leftMargin() const override { return 4; }
54         ///
55         int rightMargin() const override { return 2; }
56         ///
57         bool handlesMulticolumn() const override { return true; }
58
59 private:
60         Inset * clone() const override;
61         ///
62         docstring name_;
63 };
64
65
66 } // namespace lyx
67
68 #endif