MCPcopy Create free account
hub / github.com/NV404/gova / SetMenu

Method SetMenu

dock.go:76–83  ·  view source on GitHub ↗

SetMenu replaces the dock right-click menu. Pass nil to clear.

(items []DockMenuItem)

Source from the content-addressed store, hash-verified

74
75// SetMenu replaces the dock right-click menu. Pass nil to clear.
76func (d *Dock) SetMenu(items []DockMenuItem) {
77 d.mu.Lock()
78 defer d.mu.Unlock()
79 // Defensive copy so later caller mutations do not affect us.
80 cpy := make([]DockMenuItem, len(items))
81 copy(cpy, items)
82 d.impl.SetMenu(cpy)
83}
84
85// setImpl swaps the underlying platform impl. Exposed for tests in this
86// package only; never exported.

Callers 2

Calls 1

SetMenuMethod · 0.65

Tested by 2