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

Method AddSeparator

gui/menu.go:175–183  ·  view source on GitHub ↗

AddSeparator creates and adds a new separator to the menu

()

Source from the content-addressed store, hash-verified

173
174// AddSeparator creates and adds a new separator to the menu
175func (m *Menu) AddSeparator() *MenuItem {
176
177 mi := newMenuItem("", m.styles.Item)
178 m.Panel.Add(mi)
179 m.items = append(m.items, mi)
180 mi.menu = m
181 m.recalc()
182 return mi
183}
184
185// AddMenu creates and adds a new menu item to this menu with the
186// specified text and sub menu.

Callers 1

buildMenuFunction · 0.95

Calls 3

recalcMethod · 0.95
newMenuItemFunction · 0.85
AddMethod · 0.45

Tested by

no test coverage detected