]> git.lyx.org Git - features.git/blobdiff - src/mathed/InsetMathGrid.h
Introduce a return value for mathmlize(). We will need this to be able
[features.git] / src / mathed / InsetMathGrid.h
index 15aa437d8a9fd409f5dd1f2a41efc52a0eb1c438..aaef2aaa21c844a42da4e456d6b667e00a491490 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.
  */
@@ -49,7 +49,7 @@ public:
                ///
                RowInfo();
                ///
-               int skipPixels() const;
+               int skipPixels(MetricsInfo const & mi) const;
                /// cached descent
                mutable int descent_;
                /// cached ascent
@@ -92,11 +92,12 @@ public:
 
 public:
        /// sets nrows and ncols to 1, vertical alingment to 'c'
-       InsetMathGrid();
+       InsetMathGrid(Buffer * buf);
        /// Note: columns first!
-       InsetMathGrid(col_type m, row_type n);
+       InsetMathGrid(Buffer * buf, col_type m, row_type n);
        ///
-       InsetMathGrid(col_type m, row_type n, char valign, docstring const & halign);
+       InsetMathGrid(Buffer * buf, col_type m, row_type n, char valign,
+               docstring const & halign);
        ///
        void metrics(MetricsInfo & mi, Dimension &) const;
        ///
@@ -210,11 +211,15 @@ public:
        ///
        void write(WriteStream & os) const;
        ///
+       void write(WriteStream & os,
+                  row_type beg_row, col_type beg_col,
+                  row_type end_row, col_type end_col) const;
+       ///
        void normalize(NormalStream &) const;
        ///
        //void maple(MapleStream &) const;
        ///
-       void mathmlize(MathStream &) const;
+       docstring mathmlize(MathStream &) const;
        ///
        //void octave(OctaveStream &) const;
 
@@ -229,8 +234,7 @@ protected:
        /// returns y offset of cell compared to inset
        int cellYOffset(idx_type idx) const;
        /// returns proper 'end of line' code for LaTeX
-       virtual docstring eolString(row_type row, bool emptyline,
-                                     bool fragile) const;
+       virtual docstring eolString(row_type row, bool fragile) const;
        /// returns proper 'end of column' code for LaTeX
        virtual docstring eocString(col_type col, col_type lastcol) const;
        /// splits cells and shifts right part to the next cell
@@ -244,6 +248,9 @@ protected:
        std::vector<ColInfo> colinfo_;
        /// cell info
        std::vector<CellInfo> cellinfo_;
+       ///
+       InsetCode lyxCode() const { return MATH_GRID_CODE; }
+
 private:
        ///
        char v_align_; // add approp. type