Turns a shell's pointer, touch, wheel and keyboard events into scrolls, zooms and page turns of a ProgressiveZoom: a drag scrolls and flings with inertia, two fingers pinch about their centre, a double-tap toggles between fit-width and a zoom anchored at the tap, paged modes snap to spreads, Ctrl or Cmd with the wheel zooms about the pointer, and the keys page, jump and zoom.
public sealed class InputModel
Spec #33 viewer capability 14. Framework-neutral: a shell translates its platform's events (the DOM's pointer, wheel and keyboard events in the Blazor shell) into these calls one for one, with coordinates in device-independent pixels relative to the viewport's top-left corner, and calls RunFrame(TimeSpan) once per display frame, then draws GetFrame(Span<FramePart>).
Single-threaded and deterministic: no timers, tasks or threads (so it runs on the browser's one thread); every time it needs comes from TimeProvider, so a manual clock replays a gesture exactly. Events and frames allocate nothing.
kind:method, kind:property, kind:ctor. Press Esc to clear.InputModel(ProgressiveZoom, InputModelOptions?)Initializes a new instance of the InputModel class over a progressive zoom.LineScrollThe device-independent pixels an arrow key or one wheel line scrolls.ActualSizeGets the zoom at which one point of a page is one point on the screen: PixelRatio times 96 / 72.CurrentPageGets the page a viewer reports as current (GetCurrentPage(in Viewport)), or -1 without pages.IsAnimatingGets a value indicating whether a fling, a page turn, a snap or an animated zoom is running: keep calling RunFrame(TimeSpan).PixelRatioGets or sets the device pixels per device-independent pixel (the DOM's devicePixelRatio): event coordinates are multiplied by it to reach the viewport's device pixels. When it changes, the shell also calls Resize(Double, Double).ZoomGets the progressive zoom the model drives.GoToPage(Int32)Goes to a page (animated): in a paged mode its spread centred, otherwise its spread's leading edge at the viewport's (ScrollTo(in Viewport, Int32)).KeyDown(InputKey, InputModifiers)A key went down (or repeated): arrows scroll a line, Page Up/Down and Space page, Home/End jump, plus, minus and zero zoom.NextPage()Goes to the first page of the next spread (from where a running page animation is heading).PointerCancel(Int64)The platform cancelled a pointer (it left the window or the system took the gesture): a pinch ends where it is, a drag snaps without inertia.PointerDown(Int64, PointerKind, Double, Double)A pointer went down: the first starts a drag or a tap, a second finger or pen starts a pinch; a third is ignored.PointerMove(Int64, Double, Double)A pointer that is down moved: drags scroll with it, a pinch zooms by the change of the fingers' distance about their centre and pans with the centre.PointerUp(Int64, Double, Double)A pointer went up: a drag flings on (a finger or pen) or snaps (paged modes), a quick touch is a tap and two taps close together toggle the zoom; ending a pinch snaps to fit-width or fit-page when the zoom is within 5 % of it, and the other finger drags on.PreviousPage()Goes to the first page of the previous spread (from where a running page animation is heading).Resize(Double, Double)The viewport's size changed: keeps the scroll position (kept inside the content) at the new size.RunFrame(TimeSpan)Does one display frame's work: advances a fling or an animation to the clock's time, then the zoom's frame (RunFrame(TimeSpan)), which settles zoom steps and draws tiles within budget.Stop()Stops a running fling or animation where it is (an animated zoom settles at its current zoom).Wheel(Double, Double, WheelDeltaMode, InputModifiers, Double, Double)A wheel turned: it scrolls (Shift turns a vertical wheel sideways; in a paged mode at a spread's edge it turns the spread, once per burst of wheel events), and with Ctrl or Cmd held it zooms about the pointer, as trackpad pinches arrive in browsers.ZoomTo(ZoomMode)Zooms (animated, about the viewport's centre) to actual size or to fit the current page's spread; fit-page also brings the page into view.