4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
9 * Full author contact details are available in file CREDITS.
15 #include "textcursor.h"
16 #include "cursor_slice.h"
18 #include "support/types.h"
32 * The cursor class describes the position of a cursor within a document.
38 /// create 'empty' cursor
39 explicit LCursor(BufferView * bv);
40 /// dispatch from innermost inset upwards
41 DispatchResult dispatch(FuncRequest const & cmd);
43 void push(UpdatableInset * inset);
44 /// restrict cursor nesting to given size
46 /// pop one level off the cursor
48 /// set the cell the cursor is in
50 /// return the cell this cursor is in
53 UpdatableInset * innerInset() const;
55 UpdatableInset * innerInsetOfType(int code) const;
57 InsetTabular * innerInsetTabular() const;
59 LyXText * innerText() const;
60 /// returns x,y position
61 void getPos(int & x, int & y) const;
62 /// returns cursor dimension
63 void getDim(int & asc, int & desc) const;
64 /// cache the absolute coordinate from the top inset
67 friend std::ostream & operator<<(std::ostream &, LCursor const &);
69 /// mainly used as stack, but wee need random access
70 std::vector<CursorSlice> data_;