Module remount
Expand description
Changing a widget’s own children in the retained layout tree, in place.
A structure change normally makes the host discard its whole Taffy tree,
build every widget’s layout again and solve it from scratch: every text is
measured again, though one row came into a list. A widget that only mounts
and unmounts children of its own, whose other widgets all stay alive,
reports StructureChange::Children
instead and carries it out in Widget::remount_children
through a Remount: the children it mounts are built into the retained
tree, the ones it lets go are removed from it, and every other node keeps
its identity and its cached layout. The host admits what was mounted and
solves the tree again, which lays out only the nodes the change dirtied.
Structs§
- Remount
- The retained layout tree a
Widget::remount_childrenchanges, and what the change mounted and unmounted, for the host to admit.