Files

43 lines
1004 B
Go
Raw Permalink Normal View History

2020-12-22 18:08:38 +11:00
package menu
2021-01-12 15:55:28 +11:00
// TrayMenu are the options
type TrayMenu struct {
2020-12-24 10:05:55 +11:00
// Label is the text we wish to display in the tray
2020-12-22 18:08:38 +11:00
Label string
2020-12-23 06:55:45 +11:00
// Image is the name of the tray icon we wish to display.
2020-12-23 06:55:45 +11:00
// These are read up during build from <projectdir>/trayicons and
// the filenames are used as IDs, minus the extension
// EG: <projectdir>/trayicons/main.png can be referenced here with "main"
// If the image is not a filename, it will be treated as base64 image data
Image string
// MacTemplateImage indicates that on a Mac, this image is a template image
MacTemplateImage bool
2020-12-23 06:55:45 +11:00
2021-03-17 23:30:08 +11:00
// Text Colour
RGBA string
// Font
FontSize int
FontName string
// Tooltip
Tooltip string
// Callback function when menu clicked
2023-11-12 12:30:49 +11:00
// Click Callback `json:"-"`
// Disabled makes the item unselectable
Disabled bool
2020-12-23 06:55:45 +11:00
// Menu is the initial menu we wish to use for the tray
Menu *Menu
2021-03-06 00:25:34 +11:00
// OnOpen is called when the Menu is opened
OnOpen func()
// OnClose is called when the Menu is closed
OnClose func()
2020-12-22 18:08:38 +11:00
}