MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / aboutToOpenMenu

Method aboutToOpenMenu

radiant/eventmanager/EventManager.cpp:381–390  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379}
380
381void EventManager::aboutToOpenMenu(wxMenu& menu)
382{
383 // Grey out any menu items which cannot currently be run
384 for (wxMenuItem* item: menu.GetMenuItems()) {
385 // Not everything in the menu may have a command ID (e.g. separators)
386 if (auto i = _commandsByMenuID.find(item->GetId()); i != _commandsByMenuID.end()) {
387 item->Enable(GlobalCommandSystem().canExecute(i->second));
388 }
389 }
390}
391
392Accelerator& EventManager::connectAccelerator(int keyCode, unsigned int modifierFlags, const std::string& command)
393{

Callers

nothing calls this directly

Calls 3

findMethod · 0.45
endMethod · 0.45
canExecuteMethod · 0.45

Tested by

no test coverage detected