Skip to main content

Window

Function Window 

Source
pub fn Window(on_close_request: impl FnMut() + 'static) -> WindowScope
Expand description

A platform window, a child of the root, whose children are the window’s content. Compose Desktop’s Window. The application has to be launched with LaunchBuilder::windows.

on_close_request is called when the user asks to close the window. It does not close it: the window closes when the application stops composing this Window, which is where a dialog that asks about unsaved work goes.

ⓘ
Window(move || open.set(false)).title("Notes").size(900.0, 600.0).content(|| {
    Text("Hello");
});