Module cursor
Expand description
Which pointer shape a laid-out surface shows at a point: one rule for
every host (the native App, the harness the browser page drives, the
installed shell’s chrome), so a window edge, a text field or a link
reads the same everywhere.
Each widget names the shape it wants (Widget::cursor_shape). Among
the widgets that do:
- one carrying a gesture (
Widget::wants_pointer_capture) keeps its shape wherever the pointer goes, so a resize shows its cursor for the whole drag, even off the edge it started on; - else a resize shape wins over what lies under it: a window edge is grabbed before the content beneath it is reached, so the cursor says what a press there does;
- else the smallest widget under the pointer, so a nested child beats its enclosing container.
Structs§
- Cursor
Pick - The shapes offered at one point, folded to the one shown.
Functions§
- in_tree
- The shape
root’s shown tree asks for atpoint.