MCPcopy Create free account
hub / github.com/KLayout/klayout / remove_menu_items

Method remove_menu_items

src/laybasic/laybasic/layPlugin.cc:280–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

278}
279
280void
281PluginDeclaration::remove_menu_items (Dispatcher *dispatcher)
282{
283 lay::AbstractMenu *menu = dispatcher->menu ();
284 menu->delete_items (mp_editable_mode_action.get ());
285 menu->delete_items (mp_mouse_mode_action.get ());
286
287 std::vector<lay::Action *> actions;
288 for (tl::weak_collection <lay::Action>::iterator a = m_menu_actions.begin (); a != m_menu_actions.end (); ++a) {
289 if (a.operator-> ()) {
290 actions.push_back (a.operator-> ());
291 }
292 }
293 for (std::vector<lay::Action *>::const_iterator a = actions.begin (); a != actions.end (); ++a) {
294 menu->delete_items (*a);
295 }
296 m_menu_actions.clear ();
297}
298
299void
300PluginDeclaration::set_editable_enabled (bool f)

Callers 1

plugin_removedMethod · 0.80

Calls 8

menuMethod · 0.80
delete_itemsMethod · 0.80
getMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
operator->Method · 0.45
push_backMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected