Window class

Implemented types
Available extensions

Constructors

Window.borrowed(int nativeHandle)
Wraps a handle owned elsewhere; releasing it stays the owner's job.
Window.fromHandle(int nativeHandle)
Adopts a handle returned by the C API and releases it when this object becomes unreachable.

Properties

aspectRatio ↔ double
getter/setter pair
backgroundColor ↔ Color
getter/setter pair
bounds ↔ Rectangle
getter/setter pair
contentBounds ↔ Rectangle
getter/setter pair
contentInset → Offset

Available on Window, provided by the NativeWindowGeometry extension

Offset from the window's outer frame to its content area (title bar and left border), in logical pixels.
no setter
contentSize ↔ Size
getter/setter pair
contentView → View?
no setter
cornerPreference → WindowCornerPreference
no setter
customShadow → WindowShadow?
no setter
dockSide → WindowDockSide
no setter
hashCode → int
The hash code for this object.
no setterinherited
hasShadow ↔ bool
getter/setter pair
id → int
no setter
isAlwaysOnBottom ↔ bool
getter/setter pair
isAlwaysOnTop ↔ bool
getter/setter pair
isClosable ↔ bool
getter/setter pair
isContentProtected → bool
no setter
isContentUnderTitleBar → bool
no setter
isFocusable ↔ bool
getter/setter pair
isFocused → bool
no setter
isFrameless → bool
no setter
isFullScreen ↔ bool
getter/setter pair
isFullScreenable ↔ bool
getter/setter pair
isIgnoreMouseEvents → bool
no setter
isInputShaped → bool
no setter
isKeyboardGrabbed → bool
no setter
isMaximizable ↔ bool
getter/setter pair
isMaximized → bool
no setter
isMaximizedVertically → bool
no setter
isMinimizable ↔ bool
getter/setter pair
isMinimized → bool
no setter
isMouseMoveForwardingEnabled → bool
no setter
isMovable ↔ bool
getter/setter pair
isNonActivating ↔ bool
getter/setter pair
isResizable ↔ bool
getter/setter pair
isShaped → bool
no setter
isVisible → bool
no setter
isVisibleInTaskbar ↔ bool
getter/setter pair
isVisibleOnAllWorkspaces ↔ bool
getter/setter pair
isVisibleOnFullScreen → bool
no setter
isWindowControlButtonsVisible ↔ bool
getter/setter pair
maximizeButtonBounds → Rectangle
no setter
maximumSize ↔ Size
getter/setter pair
minimumSize ↔ Size
getter/setter pair
nativeHandle → int
The underlying handle-table entry.
final
nativeNumber → int
no setter
nativeObject → Pointer<Void>
Platform-specific native object behind this handle.
no setter
occlusionState → WindowOcclusionState
no setter
opacity ↔ double
getter/setter pair
parentWindow → Window?
no setter
position ↔ Point
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → Size
no setter
title ↔ String?
getter/setter pair
titleBarStyle ↔ TitleBarStyle
getter/setter pair
visualEffect → VisualEffect
no setter

Methods

addListener(FutureOr<void> callback(WindowEvent)) → ListenerId
Registers callback for every WindowEvent this Window emits.
animateBounds(Rectangle bounds) → bool
blur() → void
center() → void
close() → bool
dispose() → void
Releases the handle now instead of at collection.
dock(WindowDockSide side, double width) → bool
focus() → void
grabKeyboard() → bool
hide() → void
maximize() → void
minimize() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performTitleBarDoubleClick() → bool
removeListener(ListenerId listenerId) → bool
Unregisters a listener. Returns false if unknown.
resetTitleBarColors() → bool
restore() → void
setContentProtection(bool isContentProtected) → bool
setContentUnderTitleBar(bool isContentUnderTitleBar) → bool
setCornerPreference(WindowCornerPreference preference) → bool
setCustomShadow(WindowShadow? shadow) → bool
setFrameless(bool isFrameless) → bool
setIgnoreMouseEvents(bool isIgnoreMouseEvents, bool forward) → bool
setInputShape(WindowShape? shape) → bool
setMaximizeButtonBounds(Rectangle bounds) → bool
setMaximizedVertically(bool isMaximizedVertically) → bool
setParentWindow(Window? parent) → bool
setShape(WindowShape? shape) → bool
setSize(Size size, bool animate) → void
setTitleBarColors(Color background, Color foreground) → bool
setVisibleOnFullScreen(bool isVisibleOnFullScreen) → bool
setVisualEffect(VisualEffect effect) → bool
show() → void
showInactive() → void
showSystemMenu(Point position) → bool
startDragging() → void
startResizing(ResizeEdge edge) → void
toString() → String
A string representation of this object.
inherited
undock() → bool
ungrabKeyboard() → bool
unmaximize() → void

Operators

operator ==(Object other) → bool
The equality operator.
inherited