NavWindow

@Composable
fun NavWindow(onCloseRequest: () -> Unit, state: WindowState = rememberWindowState(), visible: Boolean = true, title: String = "Untitled", icon: Painter? = null, undecorated: Boolean = false, transparent: Boolean = false, resizable: Boolean = true, enabled: Boolean = true, focusable: Boolean = true, alwaysOnTop: Boolean = false, onPreviewKeyEvent: (KeyEvent) -> Boolean = { false }, onKeyEvent: (KeyEvent) -> Boolean = { false }, content: @Composable FrameWindowScope.() -> Unit)

A composable window with various customizable properties and everything necessary for a basic precompose desktop app.

Parameters

onCloseRequest

A lambda function to be called when the window is requested to close.

state

The state of the window, default is a remembered window state.

visible

A boolean indicating if the window is visible, default is true.

title

The title of the window, default is "Untitled".

icon

An optional painter for the window icon, default is null.

undecorated

A boolean indicating if the window is undecorated, default is false.

transparent

A boolean indicating if the window is transparent, default is false.

resizable

A boolean indicating if the window is resizable, default is true.

enabled

A boolean indicating if the window is enabled, default is true.

focusable

A boolean indicating if the window is focusable, default is true.

alwaysOnTop

A boolean indicating if the window is always on top, default is false.

onPreviewKeyEvent

A lambda function to handle preview key events, default returns false.

onKeyEvent

A lambda function to handle key events, default returns false.

content

A composable lambda function to define the content of the window.