menu

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MenuBar struct {
	*view.Box
	MenuItems []*MenuItem
	// contains filtered or unexported fields
}

func NewMenuBar

func NewMenuBar() *MenuBar
func (menuBar *MenuBar) AddItem(item *MenuItem) *MenuBar
func (menuBar *MenuBar) AfterDraw() func(tcell.Screen)
func (menuBar *MenuBar) Draw(screen tcell.Screen)
func (menuBar *MenuBar) Focus(delegate func(p view.Primitive))
func (menuBar *MenuBar) InputHandler() func(event *tcell.EventKey, setFocus func(p view.Primitive))
func (p *MenuBar) MouseHandler() func(action view.MouseAction, event *tcell.EventMouse, setFocus func(p view.Primitive)) (consumed bool, capture view.Primitive)
type MenuItem struct {
	*view.Box
	Title    string
	SubItems []*MenuItem
	// contains filtered or unexported fields
}

func NewMenuItem

func NewMenuItem(title string) *MenuItem
func (menuItem *MenuItem) AddItem(item *MenuItem) *MenuItem
func (menuItem *MenuItem) Draw(screen tcell.Screen)
func (menuItem *MenuItem) SetOnClick(fn func(*MenuItem)) *MenuItem
type SubMenu struct {
	*view.Box
	Items []*MenuItem
	// contains filtered or unexported fields
}

func NewSubMenu

func NewSubMenu(parent *MenuBar, items []*MenuItem) *SubMenu
func (subMenu *SubMenu) Draw(screen tcell.Screen)
func (subMenu *SubMenu) MouseHandler() func(action view.MouseAction, event *tcell.EventMouse, setFocus func(p view.Primitive)) (consumed bool, capture view.Primitive)

Jump to

Keyboard shortcuts

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