/// Special alignment.
/// This does also contain align_ and lines_ if it is nonempty.
/// It needs to be in sync with align_ and lines_ because some
/// code only uses align_ and lines_.
/// Special alignment.
/// This does also contain align_ and lines_ if it is nonempty.
/// It needs to be in sync with align_ and lines_ because some
/// code only uses align_ and lines_.
- /// sets nrows and ncols to 1, vertical alingment to 'c'
- InsetMathGrid(Buffer * buf);
+ /// sets nrows and ncols to 1, vertical alignment to 'c'
+ explicit InsetMathGrid(Buffer * buf);
/// Note: columns first!
InsetMathGrid(Buffer * buf, col_type m, row_type n);
///
InsetMathGrid(Buffer * buf, col_type m, row_type n, char valign,
docstring const & halign);
///
/// Note: columns first!
InsetMathGrid(Buffer * buf, col_type m, row_type n);
///
InsetMathGrid(Buffer * buf, col_type m, row_type n, char valign,
docstring const & halign);
///
- void updateBuffer(ParIterator const &, UpdateType);
+ void drawT(TextPainter & pi, int x, int y) const override;
+ ///
+ void updateBuffer(ParIterator const &, UpdateType, bool const deleted = false) override;
/// extract number of columns from alignment string
static col_type guessColumns(docstring const & halign);
/// accepts some LaTeX column codes: p,m,!,@,M,<,>
/// extract number of columns from alignment string
static col_type guessColumns(docstring const & halign);
/// accepts some LaTeX column codes: p,m,!,@,M,<,>
- bool idxFirst(Cursor &) const;
- ///
- bool idxLast(Cursor &) const;
+ bool idxForward(Cursor &) const override;
+ //
+ idx_type firstIdx() const override;
+ //
+ idx_type lastIdx() const override;
/// add a row, one row down
virtual void addRow(row_type r);
/// add a row, one row down
virtual void addRow(row_type r);
///
void write(WriteStream & os,
row_type beg_row, col_type beg_col,
row_type end_row, col_type end_col) const;
///
///
void write(WriteStream & os,
row_type beg_row, col_type beg_col,
row_type end_row, col_type end_col) const;
///
/// returns x offset of cell compared to inset
int cellXOffset(BufferView const &, idx_type idx) const;
/// returns y offset of cell compared to inset
/// returns x offset of cell compared to inset
int cellXOffset(BufferView const &, idx_type idx) const;
/// returns y offset of cell compared to inset
/// Width of cell, taking combined columns into account
int cellWidth(idx_type idx) const;
///
/// Width of cell, taking combined columns into account
int cellWidth(idx_type idx) const;
///
- /// 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).
+ char colAlign(HullType type, col_type col) const;
/// The value of a fixed col spacing for a certain hull type
static int colSpace(HullType type, col_type col);
/// positions of vertical and horizontal lines
int vLineHOffset(col_type col, unsigned int line) const;
/// The value of a fixed col spacing for a certain hull type
static int colSpace(HullType type, col_type col);
/// positions of vertical and horizontal lines
int vLineHOffset(col_type col, unsigned int line) const;
- int hLineVOffset(row_type row, unsigned int line) const;
+ int hLineVOffset(BufferView const &, row_type row, unsigned int line) const;
+
+ ///
+ InsetCode lyxCode() const override { return MATH_GRID_CODE; }