ChildWindow class

A Win32 Child Window.

Inheritance
Implementers

Constructors

ChildWindow({int? id, required WindowClass windowClass, String? windowName, int windowStyles = 0, int? x, int? y, int? width, int? height, int? bgColor, required bool defaultRepaint, required Window? parent})

Properties

bgColor ↔ int?
The background color of this Window (if applicable).
getter/setter pairinherited
children → List<Window>
no setterinherited
created → bool
Returns true if this Window was created.
no setterinherited
createId → int
The create ID.
no setterinherited
defaultRepaint ↔ bool
If true will perform a default repaint and will NOT call the custom repaint method.
getter/setter pairinherited
dimension → Pointer<RECT>
This Window dimension (with the last fetch value).
finalinherited
dimensionHeight → int
This dimension height.
no setterinherited
dimensionWidth → int
This dimension width.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
height ↔ int?
The height of this Window when created.
getter/setter pairinherited
hMenu → int?
The hMenu parameter passed to CreateWindowEx.
finalinherited
hwnd → HWND
The window handler ID (if created).
no setterinherited
hwndIfCreated → HWND?
Returns the window handler ID if created or null.
no setterinherited
id → int
Returns the ID of this child window.
no setter
isDestroyed → bool
Returns true if the window was destroyed and the WM_NCDESTROY was processed.
no setterinherited
isMaximized → bool
Returns if this Window is maximized.
no setterinherited
isMinimized → bool
Returns if this Window is minimized.
no setterinherited
onClose → Stream<Window>
On close event (after WM_CLOSE message).
no setterinherited
onDestroyed → Stream<Window>
On destroy event (after WM_DESTROY -> WM_NCDESTROY messages).
no setterinherited
parent → Window?
The parent Window of this instance.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
width ↔ int?
The width of this Window when created.
getter/setter pairinherited
windowClass → WindowClass
The WindowClass of this Window.
finalinherited
windowName → String?
The name of this Window. If it's a frame this is the Window title.
finalinherited
windowNameNative → PCWSTR?
The windowName as a native string, or null if windowName is null.
no setterinherited
windowStyles → int
The style flags of this Window to pass to CreateWindowEx.
finalinherited
x ↔ int?
The x coordinate of this Window when created.
getter/setter pairinherited
y ↔ int?
The y coordinate of this Window when created.
getter/setter pairinherited

Methods

attachNativeFinalizer(Pointer<NativeType> pointer, int size) → void
Attaches a NativeFinalizer to this instance that releases pointer (allocated with calloc) when this instance is garbage collected.
inherited
build(HWND hwnd, HDC hdc) → void
Window build procedure.
inherited
callBuild({HDC? hdc}) → bool
Calls build resolving necessary parameters.
inherited
callRepaint({HDC? hdc}) → bool
Calls repaint resolving necessary parameters.
inherited
close() → bool?
Closes this Window.
inherited
create({bool createChildren = true}) → Future<HWND>
Creates this Window.
inherited
createWindowImpl(Pointer<Uint32> createIdPtr) → Win32Result<HWND>
Window creation implementation.
inherited
destroy() → bool
Destroys this Window.
inherited
doDestroy() → void
Perform final destroy operations for this instance.
inherited
drawBG(HDC hdc, {int? bgColor}) → void
Paint operation: draws this Window background.
inherited
drawImage(HDC hdc, HBITMAP hBitmap, int x, int y, int width, int height) → void
Paint operation: draws hBitmap at coordinates x, y.
inherited
drawText(HDC hdc, String text, int x, int y) → void
Paint operation: draws text at coordinates x, y.
inherited
ensureLoaded() → Future<void>
Ensures that load was called.
inherited
fetchDimension() → void
Fetches this Window dimension.
inherited
fillRect(HDC hdc, int color, {Rectangle<num>? rect, Pointer<RECT>? pRect}) → void
Paint operation: fills a rectangle with color.
inherited
getWindowLongPtr(int nIndex) → int
inherited
getWindowText({int? length}) → String
Returns this Window text.
inherited
getWindowTextLength() → int
Returns this Window text length.
inherited
invalidateRect({Rectangle<num>? rect, Pointer<RECT>? pRect, bool eraseBg = true}) → bool
Invalidates Window region.
inherited
load() → Future<void>
Loads asynchronous resources.
inherited
maximize() → bool
Maximized this Window.
inherited
minimize() → bool
Minimizes this Window.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyClose() → void
Should be called while processing a WM_CLOSE message.
inherited
notifyDestroyed() → void
Should be called while processing a WM_NCDESTROY message.
inherited
processClose() → bool?
Processes a WM_CLOSE message or a close call.
inherited
processCommand(HWND hwnd, HDC hdc, int wParam, int lParam) → void
Processes a WM_COMMAND message. Also calls processCommand for children Windows.
inherited
processDestroy() → void
Processes a WM_DESTROY message.
inherited
processMessage(HWND hwnd, int uMsg, int wParam, int lParam) → int?
Processes a message.
inherited
redrawWindow({Rectangle<num>? rect, Pointer<RECT>? pRect, int? flags}) → bool
Redraws this Window.
inherited
repaint(HWND hwnd, HDC hdc) → void
Window custom repaint procedure.
inherited
requestRepaint() → bool
Request a WM_PAINT event of the entire Window client area.
inherited
restore() → bool
Restores this Window.
inherited
sendMessage(int message, int wParam, int lParam) → int
Sends a message to this Window.
inherited
setIcon(String iconPath, {bool small = true, bool big = true, bool cached = true, bool force = false}) → void
Sets this Window icon from iconPath.
inherited
setupDarkMode() → void
Setup a dark mode.
inherited
setupTitleColor(int? titleColor) → void
Setup the title color.
inherited
setWindowRoundedCorners({bool rounded = true, bool small = false}) → void
Sets this Window rounded corners attributes.
inherited
setWindowText(String text) → bool
Sets this Window text.
inherited
show() → void
Shows this Window.
inherited
showConfirmationDialog(String title, String text, {int flags = MB_ICONQUESTION, bool okCancel = false, bool yesNo = true, bool cancel = false, bool modal = false}) → bool
Shows a confirmation dialog.
inherited
showDialog(String title, String text, {int flags = 0, bool modal = false}) → int
Shows a dialog.
inherited
showMessage(String title, String text, {int flags = 0, bool iconWarning = false, bool iconInformation = true, bool modal = false}) → int
Shows a message dialog.
inherited
toString() → String
A string representation of this object.
inherited
updateWindow() → bool
Updates this Window.
inherited
waitDestroyed({Duration? timeout}) → Future<bool>
Waits for this window to be destroyed.
inherited

Operators

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

Static Properties

idCount ↔ int
getter/setter pair

Static Methods

newID() → int
Creates a new id of a ChildWindow. Called by ChildWindow constructor.