menu

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 2 Imported by: 2

Documentation

Overview

Package menu provides the menu window widget.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(name string, a ...interface{})

Add menu items as label, acceleration key and callback function and the number of arguments `a' must be a multiple of three.

func Config

func Config(config func(*Menu) widget.Keymap)

Config the keymap function for a menu.

Types

type Menu struct {
	*widget.ListBox
	// contains filtered or unexported fields
}

Menu is a list box to execute for a acceleration key.

func New

func New(name string, filer widget.Widget) (*Menu, error)

New creates a new menu based on filer widget sizes.

func (w *Menu) Disconnect()

Disconnect implements widget.Widget.

func (w *Menu) Exec()

Exec executes a menu item on the cursor and exits the menu.

func (w *Menu) Exit()

Exit the menu mode.

func (w *Menu) Input(key string)

Input to the list box or execute a menu item with the acceleration key.

func (w *Menu) Next() widget.Widget

Next implements widget.Widget.

func (w *Menu) Resize(x, y, width, height int)

Resize the menu window.

Jump to

Keyboard shortcuts

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