MCPcopy
hub / github.com/g3n/engine / dispatchAll

Method dispatchAll

gui/menu.go:755–766  ·  view source on GitHub ↗

dispatchAll dispatch the specified event for this menu item and all its parents

(evname string, ev interface{})

Source from the content-addressed store, hash-verified

753// dispatchAll dispatch the specified event for this menu item
754// and all its parents
755func (mi *MenuItem) dispatchAll(evname string, ev interface{}) {
756
757 mi.Dispatch(evname, ev)
758 pmenu := mi.menu
759 for {
760 pmenu.Dispatch(evname, ev)
761 if pmenu.mitem == nil {
762 break
763 }
764 pmenu = pmenu.mitem.menu
765 }
766}
767
768// update updates the menu item visual state
769func (mi *MenuItem) update() {

Callers 1

activateMethod · 0.95

Calls 1

DispatchMethod · 0.65

Tested by

no test coverage detected