]> git.lyx.org Git - lyx.git/blob - src/mathed/InsetMathArray.h
Put mathed on a diet: transfer dimension cache from inset to BufferView.
[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(docstring const &, int m, int n);
26         ///
27         InsetMathArray(docstring const &, int m, int n,
28                 char valign, docstring const & halign);
29         ///
30         InsetMathArray(docstring const &, char valign, docstring const & halign);
31         /// convenience constructor from whitespace/newline separated data
32         InsetMathArray(docstring const &, docstring const & str);
33         ///
34         void metrics(MetricsInfo & mi, Dimension & dim) const;
35         ///
36         Dimension const dimension(BufferView const &) const;
37         ///
38         void draw(PainterInfo & pi, int x, int y) const;
39         ///
40         InsetMathArray * asArrayInset() { return this; }
41         ///
42         InsetMathArray const * asArrayInset() const { return this; }
43
44         ///
45         void write(WriteStream & os) const;
46         ///
47         void infoize(odocstream & os) const;
48         ///
49         void normalize(NormalStream & os) const;
50         ///
51         void maple(MapleStream & os) const;
52         ///
53         void validate(LaTeXFeatures & features) const;
54 private:
55         virtual Inset * clone() const;
56         ///
57         docstring name_;
58 };
59
60
61 } // namespace lyx
62
63 #endif