+ int yo(BufferView const & bv) const;
+ /// set x/y drawing position cache if available
+ virtual void setPosCache(PainterInfo const &, int, int) const {}
+ /// do we cover screen position x/y?
+ virtual bool covers(BufferView const & bv, int x, int y) const;
+ /// get the screen positions of the cursor (see note in cursor.C)
+ virtual void cursorPos(BufferView const & bv,
+ CursorSlice const & sl, bool boundary, int & x, int & y) const;
+
+ /// is this an inset that can be moved into?
+ virtual bool isActive() const { return nargs() > 0; }
+ /// Where should we go when we press the up or down cursor key?
+ virtual bool idxUpDown(LCursor & cur, bool up) const;
+ /// Move one cell to the left
+ virtual bool idxLeft(LCursor &) const { return false; }
+ /// Move one cell to the right
+ virtual bool idxRight(LCursor &) const { return false; }
+
+ /// Move one physical cell up
+ virtual bool idxNext(LCursor &) const { return false; }
+ /// Move one physical cell down
+ virtual bool idxPrev(LCursor &) const { return false; }
+
+ /// Target pos when we enter the inset from the left by pressing "Right"
+ virtual bool idxFirst(LCursor &) const { return false; }
+ /// Target pos when we enter the inset from the right by pressing "Left"
+ virtual bool idxLast(LCursor &) const { return false; }
+
+ /// Delete a cell and move cursor
+ virtual bool idxDelete(idx_type &) { return false; }
+ /// pulls cell after pressing erase
+ virtual void idxGlue(idx_type) {}
+ /// returns list of cell indices that are "between" from and to for
+ /// selection purposes
+ virtual bool idxBetween(idx_type idx, idx_type from, idx_type to) const;
+
+ /// to which column belongs a cell with a given index?
+ virtual col_type col(idx_type) const { return 0; }
+ /// to which row belongs a cell with a given index?
+ virtual row_type row(idx_type) const { return 0; }
+ /// cell idex corresponding to row and column;
+ virtual idx_type index(row_type row, col_type col) const;
+ /// any additional x-offset when drawing a cell?
+ virtual int cellXOffset(idx_type) const { return 0; }
+ /// any additional y-offset when drawing a cell?
+ virtual int cellYOffset(idx_type) const { return 0; }
+ /// number of embedded cells
+ virtual size_t nargs() const { return 0; }
+ /// number of rows in gridlike structures
+ virtual size_t nrows() const { return 0; }
+ /// number of columns in gridlike structures
+ virtual size_t ncols() const { return 0; }
+ /// is called when the cursor leaves this inset
+ // returns true if cursor is now invalid.
+ virtual bool notifyCursorLeaves(LCursor &) { return false; }
+ /// is called when the mouse enter or leave this inset
+ /// return true if this inset needs repaint
+ virtual bool setMouseHover(bool) { return false; }