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

Method insert_separator

src/laybasic/laybasic/layAbstractMenu.cc:1646–1666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1644}
1645
1646void
1647AbstractMenu::insert_separator (const std::string &p, const std::string &name)
1648{
1649 typedef std::vector<std::pair<AbstractMenuItem *, std::list<AbstractMenuItem>::iterator > > path_type;
1650 tl::Extractor extr (p.c_str ());
1651 path_type path = find_item (extr);
1652 if (! path.empty ()) {
1653
1654 AbstractMenuItem *parent = path.back ().first;
1655 std::list<AbstractMenuItem>::iterator iter = path.back ().second;
1656
1657 parent->children.insert (iter, AbstractMenuItem (mp_dispatcher));
1658 --iter;
1659 Action *action = new Action ();
1660 action->set_separator (true);
1661 iter->setup_item (parent->name (), name, action, true);
1662
1663 }
1664
1665 emit_changed ();
1666}
1667
1668void
1669AbstractMenu::insert_menu (const std::string &p, const std::string &name, Action *action)

Callers 7

test_1Method · 0.80
initializeMethod · 0.80
test_flatten.rbFile · 0.80
screenshots.rbFile · 0.80
browser.rbFile · 0.80
do_update_mru_menusMethod · 0.80
init_menuMethod · 0.80

Calls 7

set_separatorMethod · 0.80
setup_itemMethod · 0.80
c_strMethod · 0.45
emptyMethod · 0.45
backMethod · 0.45
insertMethod · 0.45
nameMethod · 0.45

Tested by 1

test_1Method · 0.64