Gives the engine event (a tap, a drag, a mode change, an edit...): it changes the state and the shapes as the event asks, and records the undo steps.