* up/down jumps between macro parameters

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18774 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2007-06-14 20:57:56 +00:00
parent 98fb638d61
commit d0d7d0103a
2 changed files with 18 additions and 0 deletions

View File

@ -254,6 +254,22 @@ bool MathMacro::idxLast(Cursor & cur) const
}
bool MathMacro::idxUpDown(Cursor & cur, bool up) const
{
if (up) {
if (cur.idx() == 0)
return false;
--cur.idx();
} else {
if (cur.idx() + 1 >= nargs())
return false;
++cur.idx();
}
cur.pos() = cell(cur.idx()).x2pos(cur.x_target());
return true;
}
bool MathMacro::notifyCursorLeaves(Cursor & cur)
{
cur.updateFlags(Update::Force);

View File

@ -48,6 +48,8 @@ public:
/// target pos when we enter the inset from the right by pressing "Left"
bool idxLast(Cursor &) const;
///
bool idxUpDown(Cursor & cur, bool up) const;
///
virtual bool notifyCursorLeaves(Cursor &);
///
docstring name() const;