Window class

Represents a Win32 window and provides methods for creating and managing it.

Constructors

Window(int hwnd)
Creates an instance of the Window with the given window handle hwnd.
const
Window.create({required String windowCaption, required String className, required Pointer<NativeFunction<WNDPROC>> windowProc, int? hInstance, Rectangle<int>? dimensions, String? iconPath})
Creates a new Window with the specified parameters.
factory

Properties

dimensions Rectangle<int>
The dimensions of the current window.
no setter
hashCode int
The hash code for this object.
no setterinherited
hwnd int
The handle to the window.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

move(Rectangle<int> newDimensions, {bool repaintWindow = true}) → void
Moves and resizes the current window to the specified newDimensions.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runMessageLoop() → void
Runs the Windows message loop for this window.
setFocus() → void
Sets the keyboard focus to the current window.
setParent(Window parent) → void
Changes the parent window of the current window to the specified parent.
toString() String
A string representation of this object.
inherited
updateTheme() → void
Updates the theme of the current window.

Operators

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

Static Methods

scale(int source, double scaleFactor) int
Converts logical scalar values to physical using the provided scaleFactor.
scaleFactorForOrigin(Rectangle<int> dimensions) double
Calculates the DPI scale factor for the specified window dimensions.