9.1
Tray Icons
| (require (file "../wv-tray.rkt")) | package: base |
The (file "../wv-tray.rkt") module provides the wv-tray% class. A tray object represents a native system tray icon backed by the webview runtime.
Creates a native tray icon.
Initialization fields
icon — mandatory
tooltip — default ""
menu — default #f
If a menu is provided, it is installed during initialization.
Events
These methods can be overridden.
Called when the tray icon is activated. The reason is derived from the native event.Called when a tray message is clicked.Called when a menu item is chosen without a registered callback.Called for unhandled native events.Commands
Shows the tray icon and returns the tray object.Hides the tray icon and returns the tray object.Closes the tray icon and returns the tray object.
method
icon-file : path-string? Changes the tray icon and returns the tray object.Changes the tooltip and returns the tray object.
method
(send a-wv-tray show-message title message) → (is-a?/c wv-tray%)
title : string? message : string? Shows a native tray message and returns the tray object.Installs a tray menu and returns the tray object.
method
(send a-wv-tray connect-menu! id callback) → (is-a?/c wv-tray%)
id : symbol? callback : procedure? Registers a callback for a menu item and returns the tray object.Removes a menu callback and returns the tray object.Returns the native tray handle.