return true;
#endif // wxUSE_TOOLBAR
+ wxUnusedVar(win);
+
return false;
}
}
}
- GetEventHandler()->ProcessEvent(commandEvent);
- return true;
+ return HandleWindowEvent(commandEvent);
#else // !wxUSE_MENUS
+ wxUnusedVar(id);
+
return false;
#endif // wxUSE_MENUS/!wxUSE_MENUS
}
wxString helpString;
if ( menuId != wxID_SEPARATOR && menuId != -3 /* wxID_TITLE */ )
{
- wxMenuBar *menuBar = GetMenuBar();
- if ( menuBar )
- {
- // it's ok if we don't find the item because it might belong
- // to the popup menu
- wxMenuItem *item = menuBar->FindItem(menuId);
- if ( item )
- helpString = item->GetHelp();
- }
+ const wxMenuItem * const item = FindItemInMenuBar(menuId);
+ if ( item )
+ helpString = item->GetHelp();
+
+ // notice that it's ok if we don't find the item because it might
+ // belong to the popup menu, so don't assert here
}
DoGiveHelp(helpString, true);
statbar->SetStatusText(text, m_statusBarPane);
#else
- wxUnusedVar(text);
+ wxUnusedVar(help);
wxUnusedVar(show);
#endif // wxUSE_STATUSBAR
}
this->AttachMenuBar(menubar);
}
+const wxMenuItem *wxFrameBase::FindItemInMenuBar(int menuId) const
+{
+ const wxMenuBar * const menuBar = GetMenuBar();
+
+ return menuBar ? menuBar->FindItem(menuId) : NULL;
+}
+
#endif // wxUSE_MENUS