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
}
-bool InsetMathFrac::idxRight(Cursor & cur) const
+bool InsetMathFrac::idxForward(Cursor & cur) const
{
InsetMath::idx_type target = 0;
if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
}
-bool InsetMathFrac::idxLeft(Cursor & cur) const
+bool InsetMathFrac::idxBackward(Cursor & cur) const
{
InsetMath::idx_type target = 0;
if (kind_ == UNIT || (kind_ == UNITFRAC && nargs() == 3)) {
///
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; }
};
///
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;
///
}
-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();
}
-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();
///
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;
///
}
-bool InsetMathNest::idxRight(Cursor & cur) const
+bool InsetMathNest::idxForward(Cursor & cur) const
{
return idxNext(cur);
}
}
-bool InsetMathNest::idxLeft(Cursor & cur) const
+bool InsetMathNest::idxBackward(Cursor & cur) const
{
return idxPrev(cur);
}
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 {
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 {
///
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
}
-bool InsetMathScript::idxRight(Cursor &) const
+bool InsetMathScript::idxForward(Cursor &) const
{
return false;
}
-bool InsetMathScript::idxLeft(Cursor &) const
+bool InsetMathScript::idxBackward(Cursor &) const
{
return false;
}
///
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