void CMainFrame::OnMenuCommand(int id) { // Are we Calculating? if (IsCalculating) { // Do nothing... return; } if (!( FileMenu(id) || TimestringMenu(id) || FitMenu(id) || FourierMenu(id) || LogMenu(id) || HelpMenu(id) )) { (void)wxMessageBox(MENU_NOTDEFINED,MENU_WARNING,wxOK|wxCENTRE); } // clean Status-message if (id != M_FILE_QUIT) { SetStatusText("",0); } }
void QVLCMenu::PopupMenuStaticEntries( QMenu *menu ) { QMenu *openmenu = new QMenu( qtr( "Open Media" ), menu ); addDPStaticEntry( openmenu, qtr( "&Open File..." ), ":/type/file-asym", SLOT( openFileDialog() ) ); addDPStaticEntry( openmenu, qtr( I_OPEN_FOLDER ), ":/type/folder-grey", SLOT( PLOpenDir() ) ); addDPStaticEntry( openmenu, qtr( "Open &Disc..." ), ":/type/disc", SLOT( openDiscDialog() ) ); addDPStaticEntry( openmenu, qtr( "Open &Network..." ), ":/type/network", SLOT( openNetDialog() ) ); addDPStaticEntry( openmenu, qtr( "Open &Capture Device..." ), ":/type/capture-card", SLOT( openCaptureDialog() ) ); menu->addMenu( openmenu ); menu->addSeparator(); #if 0 QMenu *helpmenu = HelpMenu( menu ); helpmenu->setTitle( qtr( "Help" ) ); menu->addMenu( helpmenu ); #endif addDPStaticEntry( menu, qtr( "Quit" ), ":/menu/quit", SLOT( quit() ), "Ctrl+Q" ); }
/** * Main Menu Bar Creation **/ void QVLCMenu::createMenuBar( MainInterface *mi, intf_thread_t *p_intf ) { /* QMainWindows->menuBar() gives the QProcess::destroyed timeout issue on Cleanlooks style with setDesktopAware set to false */ QMenuBar *bar = mi->menuBar(); BAR_ADD( FileMenu( p_intf, bar ), qtr( "&Media" ) ); /* Dynamic menus, rebuilt before being showed */ BAR_DADD( NavigMenu( p_intf, bar ), qtr( "P&layback" ), 3 ); BAR_DADD( AudioMenu( p_intf, bar ), qtr( "&Audio" ), 1 ); BAR_DADD( VideoMenu( p_intf, bar ), qtr( "&Video" ), 2 ); BAR_ADD( ToolsMenu( bar ), qtr( "&Tools" ) ); BAR_ADD( ViewMenu( p_intf, mi ), qtr( "V&iew" ) ); BAR_ADD( HelpMenu( bar ), qtr( "&Help" ) ); }
KVOID Kylin::ClGame::UiLoader() { MiniMapMenu* pMiniMap = KNEW MiniMapMenu(); pMiniMap->Initialize(); ShortcutMenu* pShortcut = KNEW ShortcutMenu(); pShortcut->Initialize(); MonsterInfoMenu* pMonsterInfo = KNEW MonsterInfoMenu(); pMonsterInfo->Initialize(); CharInfoMenu* pCharInfo = KNEW CharInfoMenu(); pCharInfo->Initialize(); KitbagMenu* pKitbag = KNEW KitbagMenu(); pKitbag->Initialize(); HelpMenu* pHelp = KNEW HelpMenu(); pHelp->Initialize(); OptionMenu* pOption = KNEW OptionMenu(); pOption->Initialize(); // 按键冲突处理 TaskTipsMenu* pTaskTip = KNEW TaskTipsMenu(); pTaskTip->Initialize(); ////////////////////////////////////////////////////////////////////////// OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pMiniMap); OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pShortcut); OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pMonsterInfo); OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pTaskTip); OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pCharInfo); OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pKitbag); OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pHelp); OgreRoot::GetSingletonPtr()->GetGuiManager()->RegisterGui(pOption); }