mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
Getting rid of LTR bias --- part 4/4
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
This commit is contained in:
parent
ddd82f7aa4
commit
cd95a4bae8
@ -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
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
///
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
///
|
||||
|
@ -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 {
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user