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
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
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

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

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

Link copied to clipboard
external fun destroy()

Destroys the tray icon immediately.

Link copied to clipboard
external fun displayBalloon(options: DisplayBalloonOptions)

Displays a tray balloon.

Link copied to clipboard
external fun emit(type: EventType, vararg args: Any?): Boolean
Link copied to clipboard
Link copied to clipboard
external 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
external fun getBounds(): Rectangle

The bounds of this tray icon as Object.

Link copied to clipboard
external fun getGUID(): String?

The GUID used to uniquely identify the tray icon and allow it to retain its position between relaunches, or null if none is set.

Link copied to clipboard

Whether double click events will be ignored.

Link copied to clipboard
external fun getMaxListeners(): Double
Link copied to clipboard
external fun getTitle(): String

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

Link copied to clipboard
external fun isDestroyed(): Boolean

Whether the tray icon is destroyed.

Link copied to clipboard
external fun listenerCount(type: EventType, listener: EventListener): Double
Link copied to clipboard
Link copied to clipboard
external fun off(type: EventType, listener: EventListener)
Link copied to clipboard
external fun on(type: EventType, listener: EventListener)
Link copied to clipboard
external fun once(type: EventType, listener: EventListener)
Link copied to clipboard
external 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
external fun prependListener(type: EventType, listener: EventListener)
Link copied to clipboard
external fun prependOnceListener(type: EventType, listener: EventListener)
Link copied to clipboard
Link copied to clipboard
external fun removeAllListeners(type: EventType)
Link copied to clipboard
external fun removeBalloon()

Removes a tray balloon.

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

Sets the context menu for this icon.

Link copied to clipboard
external fun setIgnoreDoubleClickEvents(ignore: Boolean)

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
external fun setImage(image: NativeImage)
external fun setImage(image: String)

Sets the image associated with this tray icon.

Link copied to clipboard
external fun setMaxListeners(n: Number)
Link copied to clipboard
external fun setPressedImage(image: NativeImage)
external fun setPressedImage(image: String)

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

Link copied to clipboard
external 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
external fun setToolTip(toolTip: String)

Sets the hover text for this tray icon. Setting the text to an empty string will remove the tooltip.