MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / NewContextMenuWithShortcuts

Function NewContextMenuWithShortcuts

internal/ui/components/context_menu.go:29–36  ·  view source on GitHub ↗

NewContextMenuWithShortcuts creates a new context menu component with custom shortcuts.

(title string, actions []string, shortcuts []rune, onAction func(index int, action string))

Source from the content-addressed store, hash-verified

27
28// NewContextMenuWithShortcuts creates a new context menu component with custom shortcuts.
29func NewContextMenuWithShortcuts(title string, actions []string, shortcuts []rune, onAction func(index int, action string)) *ContextMenu {
30 return &ContextMenu{
31 menuItems: actions,
32 shortcuts: shortcuts,
33 title: title,
34 onAction: onAction,
35 }
36}
37
38// SetApp sets the parent app reference.
39func (cm *ContextMenu) SetApp(app *App) {

Callers 6

showStorageMenuMethod · 0.85
ShowNodeContextMenuMethod · 0.85
ShowVMContextMenuMethod · 0.85
ShowGlobalContextMenuMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected