Skip to main content

render_root

Function render_root 

Source
pub fn render_root<H, I>(
    ui: &mut UiTree<H>,
    app: &mut H,
    services: &mut dyn UiServices,
    window: AppWindowId,
    bounds: Rect,
    root_name: &str,
    render: impl FnOnce(&mut ElementContext<'_, H>) -> I,
) -> NodeId
where H: UiHost + 'static, I: IntoIterator<Item = AnyElement>,
Expand description

Render a declarative element tree into an existing UiTree root.

Call this once per frame before layout_all/paint_all, for the relevant window.