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