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
11 * Full author contact details are available in file CREDITS
14 #include "lyxcursor.h"
19 // Do not even think of forward declaring LyXText/BufferView etc here!
20 // If you need Paragraph proper, go to text_func.h
23 Later this variable has to be removed. There should be now internal
24 cursor in a text (and thus not in a buffer). By keeping this it is
25 (I think) impossible to have several views with the same buffer, but
26 the cursor placed at different places.
28 Since the LyXText now has been moved from Buffer to BufferView
29 it should not be absolutely needed to move the cursor...
31 It should neverthe less to keep classes and intedependencies small
34 // The structure that keeps track of the selections set.
37 : set_(false), mark_(false)
51 LyXCursor cursor; // temporary cursor to hold a cursor position
52 // until setSelection is called!
53 LyXCursor start; // start of a REAL selection
54 LyXCursor end; // end of a REAL selection
56 bool set_; // former selection
57 bool mark_; // former mark_set
62 /// returns true if selection was set previously
65 void clearSelection();
67 string const selectionAsString(Buffer const * buffer, bool label) const;
69 // actual cursor position
73 // this is used to handle XSelection events in the right manner
76 /// needed for the toggling (cursor position on last selection made)
77 LyXCursor last_sel_cursor;