+public:
+
+ /// additional per-cell information
+ struct CellInfo {
+ ///
+ CellInfo();
+ /// a dummy cell before a multicolumn cell
+ int dummy_;
+ /// special multi colums alignment
+ string align_;
+ /// these should be a per-cell property, but ok to have it here
+ /// for single-column grids like paragraphs
+ mutable int glue_;
+ ///
+ mutable pos_type begin_;
+ ///
+ mutable pos_type end_;
+ };
+
/// constructor from columns description, creates one row
MathGridInset(char valign, string const & halign);
/// Note: columns first!
MathGridInset(col_type m, row_type n);
///
MathGridInset(col_type m, row_type n, char valign, string const & halign);
/// constructor from columns description, creates one row
MathGridInset(char valign, string const & halign);
/// Note: columns first!
MathGridInset(col_type m, row_type n);
///
MathGridInset(col_type m, row_type n, char valign, string const & halign);
+ /// Ensures that the dialog is closed.
+ ~MathGridInset();
+ ///
+ InsetBase * clone() const;
+ ///
+ void metrics(MetricsInfo & mi) const;
+ ///
+ void metrics(MetricsInfo & mi, Dimension &) const;
const RowInfo & rowinfo(row_type row) const;
/// returns topmost row if passed (-1)
RowInfo & rowinfo(row_type row);
const RowInfo & rowinfo(row_type row) const;
/// returns topmost row if passed (-1)
RowInfo & rowinfo(row_type row);
+ ///
+ const CellInfo & cellinfo(idx_type idx) const { return cellinfo_[idx]; }
+ ///
+ CellInfo & cellinfo(idx_type idx) { return cellinfo_[idx]; }
+ /// identifies GridInset
+ MathGridInset * asGridInset() { return this; }
- virtual MathGridInset * asGridInset() { return this; }
+ MathGridInset const * asGridInset() const { return this; }
+ /// local dispatcher
+ dispatch_result dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);
- bool idxLast(idx_type &, pos_type &) const;
+ bool idxDelete(idx_type & idx);
+ /// pulls cell after pressing erase
+ void idxGlue(idx_type idx);
+
+ ///
+ virtual int colsep() const;
+ ///
+ virtual int rowsep() const;
+ ///
+ virtual int hlinesep() const;
+ ///
+ virtual int vlinesep() const;
+ ///
+ virtual int border() const;
+
/// extract number of columns from alignment string
col_type guessColumns(string const & halign) const;
/// extract number of columns from alignment string
col_type guessColumns(string const & halign) const;