Tray

Tray item displayed in system notification area.

Modulerequire("yue.gui")
TypeClass

Platform limitations:

Class methods

createwithimage(icon)

Create a tray item with icon.

Parameters

Return

Tray

createwithtitle(title) macOS

Create a tray item with only title.

Parameters

Return

Tray

Methods

remove()

Remove the tray item.

getbounds() macOS Windows

Return the position and size of the tray item.

Return

RectF

settitle(title) macOS Linux

Set title to be displayed aside item's icon.

Parameters

setimage(icon)

Set the icon of tray item.

Parameters

setpressedimage(image) macOS

Set the image to show when tray item is pressed.

Parameters

setmenu(menu)

Set the menu attached with the tray item.

On most platforms the menu will show when clicking on the icon, while on Windows the menu will only show when when right-clicking on the icon.

Parameters

getmenu()

Return the menu attached.

Return

Menu

Events

onclick(self) macOS Windows

Emitted when the tray item is clicked.

Parameters

Preventable

No.