Tray

open external class Tray : EventEmitter(source)

Inheritors

Constructors

Link copied to clipboard
constructor(image: NativeImage, guid: String = definedExternally)

Tray

constructor(image: String, guid: String = definedExternally)

Tray

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun addListener(type: EventType, listener: EventListener)
Link copied to clipboard

Closes an open context menu, as set by tray.setContextMenu().

Link copied to clipboard
fun destroy()

Destroys the tray icon immediately.

Link copied to clipboard

Displays a tray balloon.

Link copied to clipboard
fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
fun focus()

Returns focus to the taskbar notification area. Notification area icons should use this message when they have completed their UI operation. For example, if the icon displays a shortcut menu, but the user presses ESC to cancel it, use tray.focus() to return focus to the notification area.

Link copied to clipboard

The bounds of this tray icon as Object.

Link copied to clipboard

Whether double click events will be ignored.

Link copied to clipboard
Link copied to clipboard

the title displayed next to the tray icon in the status bar

Link copied to clipboard

Whether the tray icon is destroyed.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun off(type: EventType, listener: EventListener)
Link copied to clipboard
fun on(type: EventType, listener: EventListener)
Link copied to clipboard
fun once(type: EventType, listener: EventListener)
Link copied to clipboard
fun popUpContextMenu(menu: Menu = definedExternally, position: Point = definedExternally)

Pops up the context menu of the tray icon. When menu is passed, the menu will be shown instead of the tray icon's context menu.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Removes a tray balloon.

Link copied to clipboard
fun removeListener(type: EventType, listener: EventListener)
Link copied to clipboard
fun setContextMenu(menu: Menu?)

Sets the context menu for this icon.

Link copied to clipboard

Sets the option to ignore double click events. Ignoring these events allows you to detect every individual click of the tray icon.

Link copied to clipboard
fun setImage(image: NativeImage)
fun setImage(image: String)

Sets the image associated with this tray icon.

Link copied to clipboard
Link copied to clipboard

Sets the image associated with this tray icon when pressed on macOS.

Link copied to clipboard
fun setTitle(title: String, options: TitleOptions = definedExternally)

Sets the title displayed next to the tray icon in the status bar (Support ANSI colors).

Link copied to clipboard
fun setToolTip(toolTip: String)

Sets the hover text for this tray icon.