WindowScope

@Stable
class WindowScope

The receiver of the content of a Window and of a Dialog: the window that content fills.

What a window carries besides its content is declared on this scope, so such a declaration is only available where there is a window to carry it. MenuBar and GlassPane are such declarations: each reaches the window whose content it is composed in, and a call to either anywhere else does not compile.

A scope is received, never made: every value of this type is one a window handed its content, so a declaration made on it reaches the window that content is in and no other.

Functions

Link copied to clipboard
@Composable
fun WindowScope.GlassPane(content: @Composable () -> Unit)

Declares the glass pane of the window whose content this is composed in.

Link copied to clipboard
@Composable
fun WindowScope.MenuBar(content: @Composable () -> Unit)

Declares the menu bar of the window whose content this is composed in.