Skip to main content

within_window

Function within_window 

pub fn within_window<R>(
    window: NodeId,
    rect: Rect,
    place: impl FnOnce() -> R,
) -> R
Expand description

Place a window’s content (place runs its apply_layout) knowing which window it is: a host laying several windows out in one tree (the desktop’s strip) calls this so a dialog centres on its own window rather than the shared tree’s root.