See https://lists.sr.ht/~eliasnaur/gio/<20190819014755.GA59901%40larrymbp14.local> for context.
A layout manager that a) lays out children left-to-right, top-to-bottom, and b) returns the dimensions / locations of each child, seems like it would do the trick. Then you could add clickable regions after layout, or take other actions that are predicated on knowing the exact dimensions & locations of the children.
For the somewhat special-case of laying out text (which wraps — unlike, say, a bunch of buttons or images), perhaps there could be a different layout function, or an option that says
allow breaking the widget in two at arbitrary spots.
Although ... breaking a text line at arbitrary pixels would kind of suck. So it'd probably need to be more sophisticated than that.