Expand description
Where a scroll region is, and where an application is asking it to go.
Two halves of one gap. A scroll offset lives in the Runtime,
written by the finger, the fling and the spring; until this module there was no way
for an application to read one and no way to move one. So a “back to top” button, a
chat that opens at its newest message, a bar that fades in as the page goes down and
a list that loads more when its end comes into view were all inexpressible.
Neither half is a controller. The reference hands the application an object that
owns the offset and is asked for it; here the offset belongs to the runtime, a view
is rebuilt from state every frame, and an application speaks in messages. So the
reading half is a notification — Widget::on_scroll,
a message when the offset changes — and the commanding half is a request —
ScrollTo, carried by a command and named by the same key a focus request uses.
Structs§
- Scroll
Position - Where a scroll region is, and how much room it has, at the moment it is reported.
- Scroll
To - A request to move a scroll region, addressed to one axis or both.
Enums§
- Scroll
Target - One axis of a
ScrollTo: an offset, or an end named rather than measured.