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

Method activate

gui/menu.go:732–741  ·  view source on GitHub ↗

activate activates this menu item dispatching OnClick events

()

Source from the content-addressed store, hash-verified

730
731// activate activates this menu item dispatching OnClick events
732func (mi *MenuItem) activate() {
733
734 rm := mi.rootMenu()
735 if rm.bar {
736 rm.autoOpen = false
737 }
738 rm.setSelectedPos(-1)
739 Manager().SetKeyFocus(rm)
740 mi.dispatchAll(OnClick, mi)
741}
742
743// rootMenu returns the root menu for this menu item
744func (mi *MenuItem) rootMenu() *Menu {

Callers 2

onMouseMethod · 0.95
onKeyMethod · 0.80

Calls 5

rootMenuMethod · 0.95
dispatchAllMethod · 0.95
ManagerFunction · 0.85
setSelectedPosMethod · 0.80
SetKeyFocusMethod · 0.80

Tested by

no test coverage detected