]> git.lyx.org Git - features.git/commitdiff
Getting rid of LTR bias --- part 4/4
authorDov Feldstern <dov@lyx.org>
Mon, 5 Nov 2007 19:44:03 +0000 (19:44 +0000)
committerDov Feldstern <dov@lyx.org>
Mon, 5 Nov 2007 19:44:03 +0000 (19:44 +0000)
This is the final patch (at least for now). This one deals with the idxFoo
methods in the math insets. The previous patches in the series are r21128,
r21244 and r21448.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21449 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/Inset.h
src/mathed/InsetMathFrac.cpp
src/mathed/InsetMathFrac.h
src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathGrid.h
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathNest.h
src/mathed/InsetMathScript.cpp
src/mathed/InsetMathScript.h

index e432a6406b80528e8b3c3bfe6e731c4fb5e481b3..c0dfb170c540d7536e2c79d34c4553020939dff0 100644 (file)
@@ -170,14 +170,14 @@ public:
        virtual bool isActive() const { return nargs() > 0; }
        /// Where should we go when we press the up or down cursor key?
        virtual bool idxUpDown(Cursor & cur, bool up) const;
-       /// Move one cell to the left
-       virtual bool idxLeft(Cursor &) const { return false; }
-       /// Move one cell to the right
-       virtual bool idxRight(Cursor &) const { return false; }
+       /// Move one cell backwards
+       virtual bool idxBackward(Cursor &) const { return false; }
+       /// Move one cell forward
+       virtual bool idxForward(Cursor &) const { return false; }
 
-       /// Move one physical cell up
+       /// Move to the next cell
        virtual bool idxNext(Cursor &) const { return false; }
-       /// Move one physical cell down
+       /// Move to the previous cell
        virtual bool idxPrev(Cursor &) const { return false; }
 
        /// Target pos when we enter the inset while moving forward
index 50bfbb4ade3b75a342981c5675273c471ba3e07f..aef7818e5ddc7bf86e86f12a3859e52e72064602 100644 (file)
@@ -79,7 +79,7 @@ InsetMathFrac const * InsetMathFrac::asFracInset() const
 }
 
 
-bool InsetMathFrac::idxRight(Cursor & cur) const
+bool InsetMathFrac::idxForward(Cursor & cur) const
 {
        InsetMath::idx_type target = 0;
        if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
@@ -97,7 +97,7 @@ bool InsetMathFrac::idxRight(Cursor & cur) const
 }
 
 
-bool InsetMathFrac::idxLeft(Cursor & cur) const
+bool InsetMathFrac::idxBackward(Cursor & cur) const
 {
        InsetMath::idx_type target = 0;
        if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
index 0788747d39d4022696e98e9c7ed7486608abc477..ffcab063530cf09a9b9db27a5f16f3e5820a8b26 100644 (file)
@@ -26,9 +26,9 @@ public:
        ///
        bool idxUpDown(Cursor &, bool up) const;
        ///
-       bool idxLeft(Cursor &) const { return false; }
+       bool idxBackward(Cursor &) const { return false; }
        ///
-       bool idxRight(Cursor &) const { return false; }
+       bool idxForward(Cursor &) const { return false; }
 };
 
 
@@ -49,9 +49,9 @@ public:
        ///
        explicit InsetMathFrac(Kind kind = FRAC, idx_type ncells = 2);
        ///
-       bool idxRight(Cursor &) const;
+       bool idxForward(Cursor &) const;
        ///
-       bool idxLeft(Cursor &) const;
+       bool idxBackward(Cursor &) const;
        ///
        void metrics(MetricsInfo & mi, Dimension & dim) const;
        ///
index da27366a7c3a74d99336b72bb38f37d1a58f3c82..dbc79f5902323f6aaf7da1eac84665a2e8e55ba0 100644 (file)
@@ -830,9 +830,9 @@ bool InsetMathGrid::idxUpDown(Cursor & cur, bool up) const
 }
 
 
-bool InsetMathGrid::idxLeft(Cursor & cur) const
+bool InsetMathGrid::idxBackward(Cursor & cur) const
 {
-       // leave matrix if on the left hand edge
+       // leave matrix if at the front edge
        if (cur.col() == 0)
                return false;
        --cur.idx();
@@ -841,9 +841,9 @@ bool InsetMathGrid::idxLeft(Cursor & cur) const
 }
 
 
-bool InsetMathGrid::idxRight(Cursor & cur) const
+bool InsetMathGrid::idxForward(Cursor & cur) const
 {
-       // leave matrix if on the right hand edge
+       // leave matrix if at the back edge
        if (cur.col() + 1 == ncols())
                return false;
        ++cur.idx();
index d01085089417c2b5b5aa72c4f0d2fa5f698efd5c..e49aa500fe24d13f1e954968dec07d216f778853 100644 (file)
@@ -155,9 +155,9 @@ public:
        ///
        bool idxUpDown(Cursor &, bool up) const;
        ///
-       bool idxLeft(Cursor &) const;
+       bool idxBackward(Cursor &) const;
        ///
-       bool idxRight(Cursor &) const;
+       bool idxForward(Cursor &) const;
        ///
        bool idxFirst(Cursor &) const;
        ///
index 810dfaa2753ad5af7bd600cb18ffe0bb83aaa2b2..f2f55151ddad08c29f9c57bcbc1e2032901176c8 100644 (file)
@@ -164,7 +164,7 @@ bool InsetMathNest::idxNext(Cursor & cur) const
 }
 
 
-bool InsetMathNest::idxRight(Cursor & cur) const
+bool InsetMathNest::idxForward(Cursor & cur) const
 {
        return idxNext(cur);
 }
@@ -181,7 +181,7 @@ bool InsetMathNest::idxPrev(Cursor & cur) const
 }
 
 
-bool InsetMathNest::idxLeft(Cursor & cur) const
+bool InsetMathNest::idxBackward(Cursor & cur) const
 {
        return idxPrev(cur);
 }
@@ -509,7 +509,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                if (cur.pos() != cur.lastpos() && cur.openable(cur.nextAtom())) {
                        cur.pushBackward(*cur.nextAtom().nucleus());
                        cur.inset().idxFirst(cur);
-               } else if (cur.posForward() || idxRight(cur)
+               } else if (cur.posForward() || idxForward(cur)
                        || cur.popForward() || cur.selection())
                        ;
                else {
@@ -529,7 +529,7 @@ void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
                        cur.posBackward();
                        cur.push(*cur.nextAtom().nucleus());
                        cur.inset().idxLast(cur);
-               } else if (cur.posBackward() || idxLeft(cur)
+               } else if (cur.posBackward() || idxBackward(cur)
                        || cur.popBackward() || cur.selection())
                        ;
                else {
index 3b54b3a8af1bba9ae72036798aec0785698ef298..4f12d7d7bf8934aad436312b15395aa04b02dfa9 100644 (file)
@@ -52,14 +52,14 @@ public:
        ///
        Inset * editXY(Cursor & cur, int x, int y);
 
-       /// order of movement through the cells when pressing the left key
-       bool idxLeft(Cursor &) const;
-       /// order of movement through the cells when pressing the right key
-       bool idxRight(Cursor &) const;
+       /// order of movement through the cells when moving backwards
+       bool idxBackward(Cursor &) const;
+       /// order of movement through the cells when moving forward
+       bool idxForward(Cursor &) const;
 
-       /// move one physical cell up
+       /// move to next cell
        bool idxNext(Cursor &) const;
-       /// move one physical cell down
+       /// move to previous cell
        bool idxPrev(Cursor &) const;
 
        /// target pos when we enter the inset while moving forward
index 71061b18b43b2dcbfdf58480ba7a873a1074d155..b91fbf64019d24008d1bd05a53db1cae32c67c8f 100644 (file)
@@ -468,13 +468,13 @@ Inset::idx_type InsetMathScript::idxOfScript(bool up) const
 }
 
 
-bool InsetMathScript::idxRight(Cursor &) const
+bool InsetMathScript::idxForward(Cursor &) const
 {
        return false;
 }
 
 
-bool InsetMathScript::idxLeft(Cursor &) const
+bool InsetMathScript::idxBackward(Cursor &) const
 {
        return false;
 }
index ad6b1f5c5e540b7e5d62f51aaad80299750dca60..e26e73824a1c3b82c2c3a60606baccc0dcc127d0 100644 (file)
@@ -41,10 +41,10 @@ public:
        ///
        void drawT(TextPainter & pi, int x, int y) const;
 
-       /// move cursor left
-       bool idxLeft(Cursor & cur) const;
-       /// move cursor right
-       bool idxRight(Cursor & cur) const;
+       /// move cursor backwards
+       bool idxBackward(Cursor & cur) const;
+       /// move cursor forward
+       bool idxForward(Cursor & cur) const;
        /// move cursor up or down
        bool idxUpDown(Cursor & cur, bool up) const;
        /// Target pos when we enter the inset while moving forward