]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathAMSArray.h
Assure correct spacing of colored items in mathed
[lyx.git] / src / mathed / InsetMathAMSArray.h
index 2b5491fe37e7b2da5bf05d586f6a9ed6a827123c..25b81339dc650a85e20c5eee1901dbca786818eb 100644 (file)
@@ -4,7 +4,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
@@ -21,13 +21,18 @@ namespace lyx {
 class InsetMathAMSArray : public InsetMathGrid {
 public:
        ///
-       InsetMathAMSArray(docstring const & name, int m, int n);
+       InsetMathAMSArray(Buffer * buf, docstring const &, int m, int n);
        ///
-       InsetMathAMSArray(docstring const & name);
+       InsetMathAMSArray(Buffer * buf, docstring const &);     ///
+
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       int rowsep() const;
        ///
-       Dimension const dimension(BufferView const &) const;
+       int colsep() const;
+       ///
+       int border() const;
+       ///
+       void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
        void draw(PainterInfo & pain, int x, int y) const;
        ///
@@ -44,15 +49,29 @@ public:
        void infoize(odocstream & os) const;
        ///
        void normalize(NormalStream &) const;
+       // Don't need mathmlize or htmlize, as this is handled by
+       // InsetMathMatrix after being extracted in MathExtern.
+       // void mathmlize(MathStream &) const;
+       // void htmlize(HTMLStream &) const;
        ///
        void validate(LaTeXFeatures & features) const;
-private:
-       virtual Inset * clone() const;
+       ///
+       InsetCode lyxCode() const { return MATH_AMSARRAY_CODE; }
        ///
        char const * name_left() const;
        ///
        char const * name_right() const;
+       ///
+       int leftMargin() const { return small() ? 3 : 6; } //override
+       ///
+       int rightMargin() const { return small() ? 3: 6; } //override
+       ///
+       bool handlesMulticolumn() const { return true; } //override
 
+private:
+       virtual Inset * clone() const;
+       ///
+       bool small() const { return name_ == "smallmatrix"; }
        ///
        docstring name_;
 };