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"
22 // Do not even think of forward declaring LyXText/BufferView etc here!
23 // If you need Paragraph proper, go to text_func.h
26 Later this variable has to be removed. There should be no internal
27 cursor in a text (and thus not in a buffer). By keeping this it is
28 (I think) impossible to have several views with the same buffer, but
29 the cursor placed at different places.
31 Since the LyXText now has been moved from Buffer to BufferView
32 it should not be absolutely needed to move the cursor...
34 Nevertheless, it should still be moved, in order to keep classes
35 and interdependencies small.
38 // The structure that keeps track of the selections set.
41 : set_(false), mark_(false)
55 LyXCursor cursor; // temporary cursor to hold a cursor position
56 // until setSelection is called!
57 LyXCursor start; // start of a REAL selection
58 LyXCursor end; // end of a REAL selection
60 bool set_; // former selection
61 bool mark_; // former mark_set
69 void clearSelection();
71 std::string const selectionAsString(Buffer const & buffer, bool label) const;
73 // actual cursor position
77 // this is used to handle XSelection events in the right manner