initialize

fun initialize(iconPath: String, tooltip: String, onLeftClick: () -> Unit?, menuContent: TrayMenuBuilder.() -> Unit?)

Initializes the system tray with the specified parameters.

Parameters

iconPath

Path to the tray icon.

tooltip

Tooltip text for the icon.

onLeftClick

Action to execute on left-click on the icon.

menuContent

Content of the tray menu.

Throws

IllegalStateException

If the system does not support the tray.