]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathGrid.h
de.po
[lyx.git] / src / mathed / InsetMathGrid.h
index 61e7e235c8a7cbe3b1294bbbe5cfa58fdf732b7f..f93dc822148da2ae367b762b851bfcd1fa0a8a50 100644 (file)
@@ -18,6 +18,8 @@
 
 namespace lyx {
 
+class BufferParams;
+
 
 /** Gridded math inset base class.
  *  This is the base to all grid-like editable math objects
@@ -100,12 +102,11 @@ public:
        InsetMathGrid(Buffer * buf, col_type m, row_type n, char valign,
                docstring const & halign);
        ///
+       marker_type marker(BufferView const *) const { return MARKER2; };
+       ///
        void metrics(MetricsInfo & mi, Dimension &) const;
        ///
        void draw(PainterInfo & pi, int x, int y) const;
-       /// draw decorations.
-       void drawDecoration(PainterInfo & pi, int x, int y) const
-       { drawMarkers2(pi, x, y); }
        ///
        void metricsT(TextMetricsInfo const & mi, Dimension & dim) const;
        ///
@@ -163,10 +164,10 @@ public:
        bool idxBackward(Cursor &) const;
        ///
        bool idxForward(Cursor &) const;
-       ///
-       bool idxFirst(Cursor &) const;
-       ///
-       bool idxLast(Cursor &) const;
+       //
+       idx_type firstIdx() const;
+       //
+       idx_type lastIdx() const;
        ///
        bool idxDelete(idx_type & idx);
        /// pulls cell after pressing erase
@@ -211,6 +212,8 @@ public:
        virtual int vlinesep() const;
        ///
        virtual int border() const;
+       ///
+       virtual bool handlesMulticolumn() const { return false; }
 
        ///
        void write(WriteStream & os) const;
@@ -224,7 +227,7 @@ public:
        //void maple(MapleStream &) const;
        ///
        void mathmlize(MathStream &) const;
-       /// 
+       ///
        void htmlize(HtmlStream &) const;
        ///
        void htmlize(HtmlStream &, std::string attrib) const;
@@ -246,9 +249,9 @@ protected:
        /// Width of cell, taking combined columns into account
        int cellWidth(idx_type idx) const;
        ///
-       virtual int leftMargin() const { return 1; }
+       virtual int leftMargin() const { return 0; }
        ///
-       virtual int rightMargin() const { return 1; }
+       virtual int rightMargin() const { return 0; }
 
        /// returns proper 'end of line' code for LaTeX
        virtual docstring eolString(row_type row, bool fragile, bool latex,
@@ -266,8 +269,9 @@ protected:
 
        // The following two functions are used in InsetMathHull and
        // InsetMathSplit.
-       /// The value of a fixed col align for a certain hull type 
-       static char colAlign(HullType type, col_type col);
+       /// The value of a fixed col align for a certain hull type (can
+       /// depend on the "indent math" setting).
+       static char colAlign(HullType type, col_type col,  BufferParams const &);
        /// The value of a fixed col spacing for a certain hull type
        static int colSpace(HullType type, col_type col);