]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_cursor.h
prepare infrastructure for multicell selection
[lyx.git] / src / mathed / math_cursor.h
index 7981662233cad60d96543b4d95d6e77575a9cc44..da2a4ecf769ae7d709e3fb4fdc7770d60d87e52f 100644 (file)
@@ -56,6 +56,8 @@ public:
        /// Put the cursor in the last position
        void last();
        ///
+       bool plainLeft();
+       ///
        bool plainRight();
        ///
        void Delete();
@@ -124,7 +126,7 @@ public:
        ///
        MathTextCodes getLastCode() const;
        ///
-       int idx() const { return idx_; }
+       int idx() const { return cursor_.idx_; }
        ///
        void idxNext();
        ///
@@ -151,16 +153,9 @@ public:
        bool macro_mode;
        
        // Selection stuff
-       ///
+       /// do we currently select
        bool selection;
-       ///
-       int anchor_;
-       ///
-       int cursor_;
-       ///
-       int idx_;
-       ///
-       MathInset       * par_;
+
        ///
        InsetFormulaBase * const formula_;
        ///
@@ -184,14 +179,25 @@ public:
 private:
        /// Description of a position 
        struct MathIter {
+               /// inset
                MathInset * par_;
+               /// cell inset
                int idx_;
-               int cursor_;
+               ///
+               int pos_;
        };
 
-       /// MathPath
+       /// path of positions the cursor had to go if it were leving each inset
        std::vector<MathIter> path_;
 
+       /// reference to the last item of the path
+       MathIter anchor_;
+       ///
+       MathIter cursor_;
+       ///
+       int path_idx_;
+
+
        ///  
        int last() const;
        ///