Documentation
¶
Index ¶
- func AppBar() menu.Bar
- func Install()
- func NewItem(title string, handler event.Handler) menu.Item
- func NewItemWithKey(title string, keyCode int, handler event.Handler) menu.Item
- func NewItemWithKeyAndModifiers(title string, keyCode int, modifiers keys.Modifiers, handler event.Handler) menu.Item
- func NewMenu(title string) menu.Menu
- func NewSeparator() menu.Item
- func SetHelpMenu(menu menu.Menu)
- func SetServicesMenu(menu menu.Menu)
- func SetWindowMenu(menu menu.Menu)
- type Bar
- func (bar *Bar) AppendMenu(subMenu menu.Menu)
- func (bar *Bar) Count() int
- func (bar *Bar) InsertMenu(subMenu menu.Menu, index int)
- func (bar *Bar) Menu(index int) menu.Menu
- func (bar *Bar) ProcessKeyDown(evt *event.KeyDown)
- func (bar *Bar) Remove(index int)
- func (bar *Bar) SetupSpecialMenu(which menu.SpecialMenuType, mnu menu.Menu)
- func (bar *Bar) SpecialMenu(which menu.SpecialMenuType) menu.Menu
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewItemWithKey ¶
NewItemWithKey creates a new item with a key accelerator using the platform-default modifiers.
func NewItemWithKeyAndModifiers ¶
func NewItemWithKeyAndModifiers(title string, keyCode int, modifiers keys.Modifiers, handler event.Handler) menu.Item
NewItemWithKeyAndModifiers creates a new item.
func SetHelpMenu ¶
SetHelpMenu designates which menu is the help menu.
func SetServicesMenu ¶
SetServicesMenu designates which menu is the services menu.
func SetWindowMenu ¶
SetWindowMenu designates which menu is the window menu.
Types ¶
type Bar ¶
type Bar struct {
// contains filtered or unexported fields
}
Bar represents a set of menus.
func (*Bar) AppendMenu ¶
AppendMenu appends a menu at the end of this bar.
func (*Bar) InsertMenu ¶
InsertMenu inserts an item with a sub-menu at the specified item index within this menu. Pass in a negative index to append to the end.
func (*Bar) ProcessKeyDown ¶
ProcessKeyDown is called to process KeyDown events prior to anything else receiving them.
func (*Bar) Remove ¶
Remove the item at the specified index from this menu. This does not dispose of the menu item.
func (*Bar) SetupSpecialMenu ¶
func (bar *Bar) SetupSpecialMenu(which menu.SpecialMenuType, mnu menu.Menu)
SetupSpecialMenu sets up the specified special menu, which must have already been installed into the menu bar.
func (*Bar) SpecialMenu ¶
func (bar *Bar) SpecialMenu(which menu.SpecialMenuType) menu.Menu
SpecialMenu returns the specified special menu, or nil if it has not been setup.