WindowPosition

sealed interface WindowPosition

Top-left position of a window or dialog on the screen, in raw pixels.

A position is either concrete coordinates (Absolute) or a request to place the window (PlatformDefault, CenteredOnScreen, CenteredOnOwner, CenteredOn). A request carries no coordinates of its own, and the placement it resolves to is written back into the driving state as an Absolute position.

Inheritors

Types

Link copied to clipboard
class Absolute(val x: Int, val y: Int) : WindowPosition

Absolute top-left position in pixels relative to the screen.

Link copied to clipboard
class CenteredOn(val window: Window) : WindowPosition

The window is centered on window, whatever the relation between the two. A window that is not on screen yet centers the window on that window's screen instead of on its bounds.

Link copied to clipboard

The window is centered on the window that owns it, or on the screen when it has no owner. An owner that is not on screen yet centers the window on the owner's screen instead of on the owner's bounds.

Link copied to clipboard

The window is centered on the screen, within the area the platform leaves usable by task bars and menu bars.

Link copied to clipboard

The window has not been placed yet, so the platform positions it.