4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
8 * \author Lars Gullik Bjønnes
10 * \author André Pönitz
12 * Full author contact details are available in file CREDITS.
18 #include "lyxcursor.h"
24 // Do not even think of forward declaring LyXText/BufferView etc here!
25 // If you need Paragraph proper, go to text_func.h
28 Later this variable has to be removed. There should be no internal
29 cursor in a text (and thus not in a buffer). By keeping this it is
30 (I think) impossible to have several views with the same buffer, but
31 the cursor placed at different places.
33 Since the LyXText now has been moved from Buffer to BufferView
34 it should not be absolutely needed to move the cursor...
36 Nevertheless, it should still be moved, in order to keep classes
37 and interdependencies small.
40 // The structure that keeps track of the selections set.
43 : set_(false), mark_(false)
57 LyXCursor cursor; // temporary cursor to hold a cursor position
58 // until setSelection is called!
59 LyXCursor start; // start of a REAL selection
60 LyXCursor end; // end of a REAL selection
62 bool set_; // former selection
63 bool mark_; // former mark_set
71 void clearSelection();
73 std::string const selectionAsString(Buffer const & buffer, bool label) const;
75 // actual cursor position
79 // this is used to handle XSelection events in the right manner