Lines Matching refs:menu

86  * update the displayed of a menu entry
104 sym = menu->sym;
105 prop = menu->prompt;
106 prompt = menu_get_prompt(menu);
114 if (sym && list->rootEntry == menu)
185 if (!menu)
188 sym_calc_value(menu->sym);
189 if (menu->flags & MENU_CHANGED) {
190 /* the menu entry changed, so update all list items */
191 menu->flags &= ~MENU_CHANGED;
192 for (i = (ConfigItem*)menu->data; i; i = i->nextItem)
200 * construct a menu entry
204 if (menu) {
206 nextItem = (ConfigItem*)menu->data;
207 menu->data = this;
211 sym_calc_value(menu->sym);
213 if (menu->sym) {
214 enum symbol_type type = menu->sym->type;
228 * destruct a menu entry
232 if (menu) {
233 ConfigItem** ip = (ConfigItem**)&menu->data;
255 if (!item || !item->menu || !menu_is_visible(item->menu))
277 if (!item || !item->menu)
280 sym = item->menu->sym;
338 bool ConfigList::menuSkip(struct menu *menu)
340 if (optMode == normalOpt && menu_is_visible(menu))
342 if (optMode == promptOpt && menu_has_prompt(menu))
381 ConfigItem* ConfigList::findConfigItem(struct menu *menu)
383 ConfigItem* item = (ConfigItem*)menu->data;
395 struct menu *menu;
405 menu = item->menu;
406 emit menuChanged(menu);
407 if (!menu)
409 type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
411 emit menuSelected(menu);
426 if (!item->menu)
428 item->testUpdateMenu(menu_is_visible(item->menu));
489 sym = item->menu ? item->menu->sym : 0;
501 if (oldval == no && item->menu->list)
511 struct menu* menu;
514 menu = item->menu;
515 if (!menu)
517 sym = menu->sym;
519 if (item->menu->list)
530 if (item->menu->list) {
544 void ConfigList::setRootMenu(struct menu *menu)
548 if (rootEntry == menu)
550 type = menu && menu->prompt ? menu->prompt->type : P_UNKNOWN;
554 rootEntry = menu;
565 struct menu *oldroot;
575 if (item->menu == oldroot) {
586 * update all the children of a menu entry
589 * parent: either the menu list widget or a menu entry widget
590 * menu: entry to be updated
592 void ConfigList::updateMenuList(ConfigItem *parent, struct menu* menu)
594 struct menu* child;
600 if (!menu) {
612 for (child = menu->list; child; child = child->next) {
633 if (!item || item->menu != child)
646 if (item && item->menu == child) {
657 void ConfigList::updateMenuList(struct menu *menu)
659 struct menu* child;
665 if (!menu) {
677 for (child = menu->list; child; child = child->next) {
698 if (!item || item->menu != child)
711 if (item && item->menu == child) {
726 struct menu *menu;
748 menu = item->menu;
749 if (!menu)
751 type = menu->prompt ? menu->prompt->type : P_UNKNOWN;
752 if (type == P_MENU && rootEntry != menu &&
755 emit menuSelected(menu);
757 emit itemSelected(menu);
790 struct menu *menu;
798 menu = item->menu;
810 } else if (!menu)
812 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
813 if (ptype == P_MENU && rootEntry != menu &&
816 emit menuSelected(menu);
843 struct menu *menu;
852 menu = item->menu;
853 if (!menu)
855 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
858 emit itemSelected(menu);
860 emit menuSelected(menu);
861 } else if (menu->sym)
871 struct menu *menu = NULL;
878 menu = item->menu;
880 emit gotFocus(menu);
974 void ConfigInfoView::setInfo(struct menu *m)
1172 struct menu *m = NULL;
1193 /* Seek for the menu which holds the symbol */
1197 m = prop->menu;
1202 /* Symbol is not visible as a menu */
1247 connect(list, SIGNAL(menuChanged(struct menu *)),
1248 info, SLOT(setInfo(struct menu *)));
1249 connect(list, SIGNAL(menuChanged(struct menu *)),
1250 parent, SLOT(setMenuLink(struct menu *)));
1301 lastItem = new ConfigItem(list, lastItem, prop->menu,
1302 menu_is_visible(prop->menu));
1349 menuList = new ConfigList(widget, "menu");
1445 // create file menu
1446 QMenu *menu = menuBar()->addMenu("&File");
1447 menu->addAction(loadAction);
1448 menu->addAction(saveAction);
1449 menu->addAction(saveAsAction);
1450 menu->addSeparator();
1451 menu->addAction(quitAction);
1453 // create edit menu
1454 menu = menuBar()->addMenu("&Edit");
1455 menu->addAction(searchAction);
1457 // create options menu
1458 menu = menuBar()->addMenu("&Option");
1459 menu->addAction(showNameAction);
1460 menu->addSeparator();
1461 menu->addActions(optGroup->actions());
1462 menu->addSeparator();
1463 menu->addAction(showDebugAction);
1465 // create help menu
1466 menu = menuBar()->addMenu("&Help");
1467 menu->addAction(showIntroAction);
1468 menu->addAction(showAboutAction);
1473 connect(configList, SIGNAL(menuChanged(struct menu *)),
1474 helpText, SLOT(setInfo(struct menu *)));
1475 connect(configList, SIGNAL(menuSelected(struct menu *)),
1476 SLOT(changeMenu(struct menu *)));
1477 connect(configList, SIGNAL(itemSelected(struct menu *)),
1478 SLOT(changeItens(struct menu *)));
1481 connect(menuList, SIGNAL(menuChanged(struct menu *)),
1482 helpText, SLOT(setInfo(struct menu *)));
1483 connect(menuList, SIGNAL(menuSelected(struct menu *)),
1484 SLOT(changeMenu(struct menu *)));
1486 connect(configList, SIGNAL(gotFocus(struct menu *)),
1487 helpText, SLOT(setInfo(struct menu *)));
1488 connect(menuList, SIGNAL(gotFocus(struct menu *)),
1489 helpText, SLOT(setInfo(struct menu *)));
1490 connect(menuList, SIGNAL(gotFocus(struct menu *)),
1492 connect(helpText, SIGNAL(menuSelected(struct menu *)),
1493 SLOT(setMenuLink(struct menu *)));
1575 void ConfigMainWindow::changeItens(struct menu *menu)
1577 configList->setRootMenu(menu);
1580 void ConfigMainWindow::changeMenu(struct menu *menu)
1582 menuList->setRootMenu(menu);
1585 void ConfigMainWindow::setMenuLink(struct menu *menu)
1587 struct menu *parent;
1591 if (configList->menuSkip(menu))
1597 parent = menu_get_parent_menu(menu);
1603 if (menu->flags & MENU_ROOT) {
1604 menuList->setRootMenu(menu);
1608 parent = menu_get_parent_menu(menu->parent);
1632 item = list->findConfigItem(menu);
1637 helpText->setInfo(menu);
1767 "under the Options menu. Enabling Show Debug Info will help you"
1772 "Toggling Show Debug Info under the Options menu will show the "
1824 void fixup_rootmenu(struct menu *menu)
1826 struct menu *child;
1829 menu->flags |= MENU_ROOT;
1830 for (child = menu->list; child; child = child->next) {