public override void Execute(Window b) { b.PlaceCursorKeepVisible(Evaluate(b, b.Model.Value.GetCursorIter()).CursorRange.End); }
public abstract void Execute(Window b);
public abstract Movement Evaluate(Window b, CharIter start);
public override void Execute(Window b) { for (uint i = 0; i < _count; ++i) { _cmd.Execute(b); } }
public override void Execute(Window b) { _range.Execute(b, _move); }
public abstract void Execute(Window b, Range r);
public void Execute(Window b, MoveCommand move) { var movement = move.Evaluate(b, b.Model.Value.GetCursorIter()); Execute(b, movement.ActionRange); }
public override Movement Evaluate(Window b, CharIter start) { if (count == 0) { return new Movement() { CursorRange = new Range(start, start), ActionRange = new Range(start, start) }; } Movement firstMovement = cmd.Evaluate(b, start); Movement lastMovement = firstMovement; for (uint i = 1; i < count; ++i) { lastMovement = cmd.Evaluate(b, lastMovement.CursorRange.End); } return new Movement() { CursorRange = new Range(firstMovement.CursorRange.Start, lastMovement.CursorRange.End), ActionRange = new Range(firstMovement.ActionRange.Start, lastMovement.ActionRange.End) }; }