]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_cursor.h
Replace LString.h with support/std_string.h,
[features.git] / src / mathed / math_cursor.h
index 6e33ddf5bfba7c2c06fc00a865fa22b0fce3ef36..4df0b822d8eec69a7a87ab539c53ad663990070e 100644 (file)
@@ -1,17 +1,13 @@
 // -*- C++ -*-
 /**
- *  File:        math_cursor.h
- *  Purpose:     Declaration of interaction classes for mathed
- *  Author:      Alejandro Aguilar Sierra <asierra@servidor.unam.mx>
- *  Created:     January 1996
- *  Description: MathCursor control all user interaction
+ * \file math_cursor.h
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- *  Dependencies: Xlib, XForms
+ * \author Alejandro Aguilar Sierra
+ * \author André Pönitz
  *
- *  Copyright: 1996, Alejandro Aguilar Sierra
- *
- *   You are free to use and modify this code under the terms of
- *   the GNU General Public Licence version 2 or later.
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef MATH_CURSOR
@@ -20,7 +16,7 @@
 
 #include "math_inset.h"
 #include "math_iterator.h"
-#include "LString.h"
+#include "support/std_string.h"
 
 class InsetFormulaBase;
 class BufferView;
@@ -32,7 +28,7 @@ class MathUnknownInset;
 [Have a look at math_inset.h first]
 
 The MathCursor is different from the kind of cursor used in the Outer
-World. It contains a stack of MathCursorPos, each of which is made
+World. It contains a stack of CursorPos, each of which is made
 up of a inset pointer, an index and a position offset, marking a path from
 this formula's MathHullInset to the current position.
 
@@ -63,6 +59,8 @@ public:
        ///
        void insert(MathArray const &);
        ///
+       void insert2(string const &);
+       ///
        void paste(string const & data);
        /// return false for empty math insets
        bool erase();
@@ -104,7 +102,7 @@ public:
        /// in pixels from left of screen
        int targetX() const;
        /// current inset
-       MathInset * par() const;
+       MathInset * inset() const;
        /// return the next enclosing grid inset and the cursor's index in it
        MathGridInset * enclosingGrid(idx_type & idx) const;
        /// go up to enclosing grid
@@ -149,8 +147,8 @@ public:
        void selCut();
        ///
        void selDel();
-       ///
-       void selPaste();
+       /// pastes n-th element of cut buffer
+       void selPaste(size_t n);
        ///
        void selHandle(bool);
        ///
@@ -206,14 +204,14 @@ public:
        MathAtom & nextAtom();
 
        /// returns the selection
-       void getSelection(MathCursorPos &, MathCursorPos &) const;
+       void getSelection(CursorPos &, CursorPos &) const;
        /// returns the normalized anchor of the selection
-       MathCursorPos normalAnchor() const;
+       CursorPos normalAnchor() const;
 
        /// reference to the last item of the path, i.e. "The Cursor"
-       MathCursorPos & cursor();
+       CursorPos & cursor();
        /// reference to the last item of the path, i.e. "The Cursor"
-       MathCursorPos const & cursor() const;
+       CursorPos const & cursor() const;
        /// how deep are we nested?
        unsigned depth() const;