]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_scriptinset.h
revert Buffer LyxText->InsetText commit
[lyx.git] / src / mathed / math_scriptinset.h
index c948751f86ed66b037044a3c974f111c2eecda4b..5d6c17f1323ed60e67be4955596fe5b0ff5c45c3 100644 (file)
@@ -25,7 +25,7 @@ public:
        /// create inset with single script and given nucleus
        MathScriptInset(MathAtom const & at, bool up);
        ///
-       virtual std::auto_ptr<InsetBase> clone() const;
+       std::auto_ptr<InsetBase> clone() const;
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
@@ -35,6 +35,19 @@ public:
        ///
        void drawT(TextPainter & pi, int x, int y) const;
 
+       /// move cursor left
+       bool idxLeft(LCursor & cur) const;
+       /// move cursor right
+       bool idxRight(LCursor & cur) const;
+       /// move cursor up or down
+       bool idxUpDown(LCursor & cur, bool up) const;
+       /// Target pos when we enter the inset from the left by pressing "Right"
+       bool idxFirst(LCursor & cur) const;
+       /// Target pos when we enter the inset from the right by pressing "Left"
+       bool idxLast(LCursor & cur) const;
+       /// can we enter this cell?
+       bool validCell(idx_type i) const { return i == 2 || script_[i]; }
+
        /// write LaTeX and Lyx code
        void write(WriteStream & os) const;
        /// write normalized content
@@ -47,18 +60,6 @@ public:
        void mathmlize(MathMLStream &) const;
        /// write content as something readable by Octave
        void octave(OctaveStream &) const;
-       /// move cursor left
-       bool idxLeft(LCursor &) const;
-       /// move cursor right
-       bool idxRight(LCursor &) const;
-       /// move cursor up or down
-       bool idxUpDown(LCursor &, bool up, int targetx) const;
-       /// Target pos when we enter the inset from the left by pressing "Right"
-       bool idxFirst(LCursor &) const;
-       /// Target pos when we enter the inset from the right by pressing "Left"
-       bool idxLast(LCursor &) const;
-       /// can we enter this cell?
-       bool validCell(idx_type i) const { return i == 2 || script_[i]; }
 
        /// identifies scriptinsets
        MathScriptInset const * asScriptInset() const;
@@ -97,9 +98,7 @@ public:
        void infoize2(std::ostream & os) const;
 protected:
        ///
-       virtual
-       DispatchResult
-       priv_dispatch(BufferView & bv, FuncRequest const & cmd);
+       void priv_dispatch(LCursor & cur, FuncRequest const & cmd);
 private:
        /// returns x offset for main part
        int dxx() const;