]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathAMSArray.h
Revert "Fix a number of signedness warnings"
[lyx.git] / src / mathed / InsetMathAMSArray.h
index 6555c5914bacc068d8b19e92ec8f10da50ce16a9..ab9ead0bd08dcd71d3b9df0b13f05da9cfd3ff7d 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,36 +21,57 @@ 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 &);     ///
+
+       ///
+       int rowsep() const override;
+       ///
+       int colsep() const override;
        ///
-       void metrics(MetricsInfo & mi, Dimension & dim) const;
+       int border() const override;
        ///
-       void draw(PainterInfo & pain, int x, int y) const;
+       void metrics(MetricsInfo & mi, Dimension & dim) const override;
        ///
-       InsetMathAMSArray * asAMSArrayInset() { return this; }
+       void draw(PainterInfo & pi, int x, int y) const override;
        ///
-       InsetMathAMSArray const * asAMSArrayInset() const { return this; }
+       InsetMathAMSArray * asAMSArrayInset() override { return this; }
+       ///
+       InsetMathAMSArray const * asAMSArrayInset() const override { return this; }
 
        ///
        bool getStatus(Cursor & cur, FuncRequest const & cmd,
-               FuncStatus & flag) const;
+               FuncStatus & flag) const override;
        ///
-       void write(WriteStream & os) const;
+       void write(WriteStream & os) const override;
        ///
-       void infoize(odocstream & os) const;
+       void infoize(odocstream & os) const override;
        ///
-       void normalize(NormalStream &) const;
+       void normalize(NormalStream &) const override;
+       // Don't need mathmlize or htmlize, as this is handled by
+       // InsetMathMatrix after being extracted in MathExtern.
+       // void mathmlize(MathStream &) const override;
+       // void htmlize(HtmlStream &) const override;
        ///
-       void validate(LaTeXFeatures & features) const;
-private:
-       virtual Inset * clone() const;
+       void validate(LaTeXFeatures & features) const override;
+       ///
+       InsetCode lyxCode() const override { return MATH_AMSARRAY_CODE; }
        ///
        char const * name_left() const;
        ///
        char const * name_right() const;
+       ///
+       int leftMargin() const override { return small() ? 3 : 6; }
+       ///
+       int rightMargin() const override { return small() ? 3: 6; }
+       ///
+       bool handlesMulticolumn() const override { return true; }
 
+private:
+       Inset * clone() const override;
+       ///
+       bool small() const { return name_ == "smallmatrix"; }
        ///
        docstring name_;
 };