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
49 UpdatableInset * innerInset() const;
51 UpdatableInset * innerInsetOfType(int code) const;
53 InsetTabular * innerInsetTabular() const;
55 LyXText * innerText() const;
56 /// returns x,y position
57 void getPos(int & x, int & y) const;
58 /// returns cursor dimension
59 void getDim(int & asc, int & desc) const;
60 /// cache the absolute coordinate from the top inset
63 friend std::ostream & operator<<(std::ostream &, LCursor const &);
65 /// mainly used as stack, but wee need random access
66 std::vector<CursorSlice> data_;