]> git.lyx.org Git - lyx.git/blob - src/mathed/math_amsarrayinset.h
Fix math cursor positioning bug
[lyx.git] / src / mathed / math_amsarrayinset.h
1 // -*- C++ -*-
2 /**
3  * \file math_amsarrayinset.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_AMSARRAYINSET_H
13 #define MATH_AMSARRAYINSET_H
14
15 #include "math_gridinset.h"
16
17
18 /// Inset for things like [pbvV]matrix, psmatrix etc
19 class MathAMSArrayInset : public MathGridInset {
20 public:
21         ///
22         MathAMSArrayInset(std::string const & name, int m, int n);
23         ///
24         MathAMSArrayInset(std::string const & name);
25         ///
26         void metrics(MetricsInfo & mi, Dimension & dim) const;
27         ///
28         void draw(PainterInfo & pain, int x, int y) const;
29         ///
30         MathAMSArrayInset * asAMSArrayInset() { return this; }
31         ///
32         MathAMSArrayInset const * asAMSArrayInset() const { return this; }
33
34         ///
35         void write(WriteStream & os) const;
36         ///
37         void normalize(NormalStream &) const;
38         ///
39         void validate(LaTeXFeatures & features) const;
40 private:
41         virtual std::auto_ptr<InsetBase> doClone() const;
42         ///
43         char const * name_left() const;
44         ///
45         char const * name_right() const;
46
47         ///
48         std::string name_;
49 };
50
51 #endif