The canvas surface came from ContainerProps, which the body paints into a slot
reserved when its content starts, after the canvas reserved its picture slot in
the paint step: the surface covered every picture shown with
RasterDisplay::picture. The surface is the canvas style's own, painted before
the slot, so the picture lies on the surface, under the canvas veil and every
canvas control of the body; the body's children see the same surface.
Every host runs in its canvas body, so the form that read a CanvasOutput after
the canvas goes: CanvasOutput no longer carries the pass, and run has no
measuring-run return (no measuring run publishes a pass).
PageBody carries the canvas's ToolPass, so the app runs its tool host inside
the page view's canvas body, after its controls and before the overlays that
show what the tool did.
The story body is the canvas body: it shows the canvas controls, runs the
tool through the StoryHost on the canvas's tool pass, then shows what reads
the tool's state, so the canvas shows a press and its moves in the same pass.
The run closure applies the tool's events and the story buttons' edits to the
document after the canvas. The body gets the document mutably, since some
tools edit it themselves.
Gallery mock panels, ui-bench, review story, doc examples and the test sites run
ToolHost::run on the ToolPass the canvas publishes, after the body's controls and
before the picture, which paints with .picture().
The canvas publishes its pass's tool input (ToolPass: id, rect, press, space,
view, snap) to its body; ToolHost::run reads it there, after the body's
controls and before its picture, so the picture shows this pass's press and
moves without a second pass. No ToolPass exists in a measuring run, so the
host never runs in one. The full-window canvas and ToolFixture run their host
this way, with the image in the canvas's picture slot. CanvasOutput still
converts for the callers not yet moved into their bodies.
cancel_press_of(ctx, owner) marks the arena holding the owner's open press; its next lifecycle run ends the press with
PressCancel::Host, which step 9 turns into a HostChanged cancel of the gesture. PartsCx reads the component's press
slot, so BezierOverlay declares its parts under the tool the press began with, as it handles them. The overlay lets go
of a press that is cancelled or that none of its parts carries, and a release with nothing held does nothing.