- explicit CursorSlice(InsetBase *);
-
- /// set the paragraph that contains this cursor
- void idx(idx_type idx);
- /// return the paragraph this cursor is in
- idx_type idx() const;
- /// set the paragraph that contains this cursor
- void par(par_type par);
- /// return the paragraph this cursor is in
- par_type par() const;
- /// set the position within the paragraph
- void pos(pos_type pos);
+ explicit CursorSlice(InsetBase &);
+
+ /// the current inset
+ InsetBase & inset() const { return *inset_; }
+ /// return the cell this cursor is in
+ idx_type idx() const { return idx_; }
+ /// return the cell this cursor is in
+ idx_type & idx() { return idx_; }
+ /// return the last cell in this inset
+ idx_type lastidx() const { return nargs() - 1; }
+ /// return the offset of the paragraph this cursor is in
+ pit_type pit() const { return pit_; }
+ /// set the offset of the paragraph this cursor is in
+ pit_type & pit() { return pit_; }
+ /// increments the paragraph this cursor is in
+ void incrementPar();
+ /// increments the paragraph this cursor is in
+ void decrementPar();
+ /// return the position within the paragraph
+ pos_type pos() const { return pos_; }