]> git.lyx.org Git - lyx.git/blobdiff - src/textcursor.h
ws changes only
[lyx.git] / src / textcursor.h
index 26091d5a4b68dc9cdd639e1abc65cb567a0c7d4c..3081551df5920b5c6dcaf2f5b6f8ba34eaef0118 100644 (file)
@@ -1,23 +1,27 @@
 // -*- C++ -*-
 /**
- * \file cursor.h
+ * \file textcursor.h
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
  * \author unknown
  * \author Lars Gullik Bjønnes
  * \author John Levon
+ * \author André Pönitz
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
-#include "lyxcursor.h"
-
 #ifndef TEXTCURSOR_H
 #define TEXTCURSOR_H
 
+#include "lyxcursor.h"
+
+// Do not even think of forward declaring LyXText/BufferView etc here!
+// If you need Paragraph proper, go to text_func.h
+
 /** The cursor.
-       Later this variable has to be removed. There should be now internal
+       Later this variable has to be removed. There should be no internal
        cursor in a text (and thus not in a buffer). By keeping this it is
        (I think) impossible to have several views with the same buffer, but
        the cursor placed at different places.
@@ -25,7 +29,8 @@
        Since the LyXText now has been moved from Buffer to BufferView
        it should not be absolutely needed to move the cursor...
        [even later]
-       It should neverthe less to keep classes and intedependencies small 
+       Nevertheless, it should still be moved, in order to keep classes
+       and interdependencies small.
        */
 
 // The structure that keeps track of the selections set.
@@ -56,12 +61,10 @@ private:
 };
 
 struct TextCursor {
-       /// returns true if selection was set previously
-       bool setSelection();
        ///
-       void clearSelection();
+       void setSelection();
        ///
-       string const selectionAsString(Buffer const * buffer, bool label) const;
+       void clearSelection();
 
        // actual cursor position
        LyXCursor cursor;
@@ -69,13 +72,6 @@ struct TextCursor {
        Selection selection;
        // this is used to handle XSelection events in the right manner
        Selection xsel_cache;
-
-       /// needed for the toggling (cursor position on last selection made)
-       LyXCursor last_sel_cursor;
-       /// needed for toggling the selection in screen.C
-       LyXCursor toggle_cursor;
-       /// needed for toggling the selection in screen.C
-       LyXCursor toggle_end_cursor;
 };
 
 #endif