Fyne API "fyne.MainMenu"


import "fyne.io/fyne/v2"


type MainMenu

type MainMenu struct {
	Items []*Menu

MainMenu defines the data required to show a menu bar (desktop) or other appropriate top level menu.

func NewMainMenu

func NewMainMenu(items ...*Menu) *MainMenu

NewMainMenu creates a top level menu structure used by fyne.Window for displaying a menubar (or appropriate equivalent).

func (*MainMenu) Refresh

func (m *MainMenu) Refresh()

Refresh will instruct any rendered menus using this struct to update their display.

Since: 2.2