menu

package
v0.0.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2025 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const Version = "0.0.15"

Variables

View Source
var DefaultIconData []byte

Functions

This section is empty.

Types

type Menu struct {
	Title   string
	Tooltip string

	Clicked chan *MenuItem // caller <- menu when items clicked
	Exited  chan struct{}  // caller <- menu when menu has exited
	// contains filtered or unexported fields
}

func NewMenu

func NewMenu(title, tooltip string, iconData []byte, clicked chan *MenuItem, exited chan struct{}) *Menu
func (m *Menu) AddCheckboxItem(title, tooltip string, checked bool) *MenuItem
func (m *Menu) AddItem(title, tooltip string) *MenuItem
func (m *Menu) AddQuitItem(title, tooltip string) *MenuItem
func (m *Menu) AddSeparator()
func (m *Menu) Run() error
func (m *Menu) Start() error
func (m *Menu) Stop() error
func (m *Menu) Wait() error
type MenuItem struct {
	Id      int
	Type    MenuItemType
	Title   string
	Tooltip string
	// contains filtered or unexported fields
}
func (i *MenuItem) AddCheckboxItem(title, tooltip string, checked bool) *MenuItem
func (i *MenuItem) AddItem(title, tooltip string) *MenuItem
func (i *MenuItem) AddQuitItem(title, tooltip string) *MenuItem
func (i *MenuItem) AddSeparator()
type MenuItemType int
const (
	MenuItemClickable MenuItemType = iota
	MenuItemCheckbox
	MenuItemSeparator
	MenuItemQuit
)

type SystrayMenuItem

type SystrayMenuItem struct {
	// contains filtered or unexported fields
}

func NewSystrayMenuItem

func NewSystrayMenuItem(item *systray.MenuItem) *SystrayMenuItem

func (*SystrayMenuItem) AddSubMenuItem

func (s *SystrayMenuItem) AddSubMenuItem(title, tooltip string) *SystrayMenuItem

func (*SystrayMenuItem) AddSubMenuItemCheckbox

func (s *SystrayMenuItem) AddSubMenuItemCheckbox(title, tooltip string, checked bool) *SystrayMenuItem

func (*SystrayMenuItem) Clicked

func (s *SystrayMenuItem) Clicked() chan struct{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL