类型 StatusItemConfig

API 文档由 Go 源码生成,内容为英文。

type StatusItemConfig struct {
	// Tooltip is shown while the pointer rests on the icon.
	Tooltip string
	Icon    StatusIcon
	// OnClick runs on the native event-loop thread for every press of the
	// item, whatever the button. Opening a window from it is allowed. With a
	// Menu it runs only for a press the system does not turn into the menu:
	// Windows and Linux send primary activation here and open the menu on a
	// secondary press. macOS opens the menu for both buttons and does not call
	// OnClick while Menu is set.
	OnClick func(StatusClick)
	// Menu supplies the system's own context menu. On Windows a primary press
	// also opens it when OnClick is nil. It runs on the event-loop thread each
	// time the menu is about to open, so the menu shows the application's state
	// at that moment, and nothing changes it while it is open.
	Menu func() []MenuItem
}

StatusItemConfig describes a status item.