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