DVWindowManager class

The window manager.

DV.Platform.window and its DV.Window alias resolve here. The current-window members it already had — setTitle, persistState, restoreState — remain, now as sugar over current.

Constructors

DVWindowManager(DVPlatform _platform)
const

Properties

all → ValueListenable<List<DVWindow>>
Every window, virtual ones included.
no setter
bounds → Rect
no setter
capability → DVWindowingCapability
no setter
current → DVWindow?
The window this code is running in.
no setter
displays → ValueListenable<List<DVDisplay>>
Every display the application knows of.
no setter
handover → DVWindowHandover
The best a move between two windows can do on this target.
no setter
hashCode → int
The hash code for this object.
no setterinherited
main → ValueListenable<DVWindow?>
The main window: the first principal window opened, and the anchor for restore and for deep links with no target.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
shouldExit → ValueListenable<bool>
Whether the last window close means the process should end.
no setter

Methods

drainExternalOpens(DVInstanceLock lock) → Future<int>
Opens whatever a second launch asked for, and clears the queue.
hide() → Future<void>
Takes the main window off screen without closing it: the process, its state and its tray icon stay. What "Show" in a tray menu undoes.
kioskOwnerOf(String displayId) → DVWindow?
The kiosk window owning displayId, if any.
maximize() → Future<void>
minimize() → Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
open(DVRouteTarget route, {DVWindowOptions options = const DVWindowOptions()}) → Future<DVWindow>
Opens route in a window, or presents it the way this target can.
persistState(String key) → Future<void>
Remembers this window's size under key.
persistWorkspace(String name, {List<DVTabWorkspaceController> workspaces = const <DVTabWorkspaceController>[]}) → Future<void>
Saves the current window and tab layout under name.
publishLiveWindows(String path, {required String app}) → void Function()
Writes what is open to path now and on every change, with app and the time, for dartvel inspect windows to read while it is fresh. Returns what stops it.
refreshDisplays() → Future<List<DVDisplay>>
Re-reads the display list and publishes it to displays.
restore() → Future<void>
restoreState(String key) → Future<void>
Puts back what persistState recorded.
restoreWorkspace(String name) → Future<List<DVTabWorkspaceController>>
Restores what persistWorkspace saved, or an empty list when nothing is stored — a first launch is not a failure.
setTitle(String title) → Future<void>
show() → Future<void>
Puts the main window back on screen and in front, from hidden, minimised or behind other windows, and brings the application forward.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

browserWindowOpener ↔ DVBrowserWindowOpener
How a browser window is opened, on the web.
getter/setter pair
capabilityOverride ← DVWindowingCapability?
no getter
closeHidesWindow → bool
Whether the user closing the main window hides it rather than closing it. The desktop bindings ask this from their close hook -- GTK's delete-event, WM_CLOSE, windowShouldClose: -- so a tray-resident application (exitPolicy: explicit) keeps running with its window hidden, and DVWindowManager.show brings it back.
no setter
displayProfile ↔ Map<String, int>
A device profile's displays: map: a name against the position it names.
getter/setter pair
exitPolicy ↔ DVWindowExitPolicy
When a window close ends the process.
getter/setter pair
knownRoutes ↔ Set<String>
The routes this application actually has, for validating a restored workspace.
getter/setter pair
performance ↔ DVWindowPerformance
What the windowing layer measures. See DVWindowPerformance.
getter/setter pair
shared → DVWindowSharedStore
Cross-window view state. One API on every platform; what varies is whether the OS delivers the notification or a shared isolate does.
no setter
spaceBackend → DVWindowSpaceBackend?
The registered space backend, or null.
no setter

Static Methods

forget(DVWindow window) → void
kioskTargetHere() → DVKioskTarget
The kiosk target this process is: what the enforcement matrix is resolved against for a kiosk window.
ownedBy(DVWindow owner) → List<DVWindow>
The windows owner owns, in the order they were opened.
registerSpaceBackend(DVWindowSpaceBackend backend) → void
Registers what presents volumes and immersive spaces in space. A package that brings a spatial runtime calls this once at startup.
reset() → void
Clears every window and any override. Tests use this so one test cannot see another's windows.
resetWindowingDeclaration() → void
Test-only: forgets any declaration.
unregisterSpaceBackend() → void
Removes the registered space backend, if any.
useSharedStore(DVWindowSharedStore store) → void
Replaces the store, for tests and for targets that register a preference-backed backend.
useWindowingDeclaration(DVWindowingDeclaration declaration) → void
What the project declared under dartvel.windowing, from the generated runtime.