Expand description
Window, tray, single-instance, and autostart lifecycle helpers.
Structs§
- Lifecycle
State - Quit and activation requests shared between the tray, window, and single-instance handler.
Enums§
- Close
Decision - What closing the main window does.
- Lifecycle
Error - Why a window, tray, or autostart change failed. Displays as a user-facing message.
Constants§
- MAIN_
WINDOW_ LABEL - Window label of the main app window.
- POPOUT_
WINDOW_ PREFIX - Window label prefix for a widget shown in its own window:
popout-<widget id>. - TRAY_ID
- ID of the system tray or menu bar icon.
- TRAY_
OPEN_ 🔒ID - Tray menu item that shows the main window.
- TRAY_
QUIT_ 🔒ID - Tray menu item that quits the app.
Functions§
- activate_
or_ defer - Restores the main window, or remembers the request until the window exists.
- apply_
pending_ activation - Restores the main window if a second launch asked for it earlier.
- decide_
close - Hides to the tray only when background mode is on, the tray exists, and the user didn’t choose Quit.
- handle_
close_ request - Applies the close decision to the main window. If hiding fails, the window is shown again and an error is returned instead of leaving it invisible.
- install_
tray - Adds the tray icon with Open and Quit items. Does nothing when the icon already exists.
- is_
app_ window - Whether a window shows Toolblox’s own interface: the main window or a widget popout.
- popout_
widget_ id - The widget ID a popout window label names, or
Nonefor other windows. - restore_
main_ window - Shows, unminimizes, and focuses the main window and restores its taskbar button.