(e events.Event)
| 169 | } |
| 170 | |
| 171 | func (wb *WidgetBase) ShowContextMenu(e events.Event) { |
| 172 | e.SetHandled() // always |
| 173 | wi := wb.This.(Widget) |
| 174 | nm := NewMenu(wi.AsWidget().applyContextMenus, wi, wi.ContextMenuPos(e)) |
| 175 | if nm == nil { // no items |
| 176 | return |
| 177 | } |
| 178 | nm.Run() |
| 179 | } |
| 180 | |
| 181 | // NewMenuFromStrings constructs a new menu from given list of strings, |
| 182 | // calling the given function with the index of the selected string. |
nothing calls this directly
no test coverage detected