dispatchAll dispatch the specified event for this menu item and all its parents
(evname string, ev interface{})
| 753 | // dispatchAll dispatch the specified event for this menu item |
| 754 | // and all its parents |
| 755 | func (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 |
| 769 | func (mi *MenuItem) update() { |