// Implement internal behaviour (menu updating on some platforms) void wxFrameBase::OnInternalIdle() { wxTopLevelWindow::OnInternalIdle(); #if wxUSE_MENUS if ( ShouldUpdateMenuFromIdle() && wxUpdateUIEvent::CanUpdate(this) ) DoMenuUpdates(); #endif }
// Implement internal behaviour (menu updating on some platforms) void wxFrameBase::OnInternalIdle() { wxTopLevelWindow::OnInternalIdle(); #if wxUSE_MENUS && wxUSE_IDLEMENUUPDATES if (wxUpdateUIEvent::CanUpdate(this)) DoMenuUpdates(); #endif }
void wxFrameBase::OnMenuOpen(wxMenuEvent& event) { #if wxUSE_IDLEMENUUPDATES wxUnusedVar(event); #else // !wxUSE_IDLEMENUUPDATES // as we didn't update the menus from idle time, do it now DoMenuUpdates(event.GetMenu()); #endif // wxUSE_IDLEMENUUPDATES/!wxUSE_IDLEMENUUPDATES }
void wxFrameBase::OnMenuOpen(wxMenuEvent& event) { event.Skip(); if ( !ShouldUpdateMenuFromIdle() ) { // as we didn't update the menus from idle time, do it now DoMenuUpdates(event.GetMenu()); } }
// Do the UI update processing for this window. This is // provided for the application to call if it wants to // force a UI update, particularly for the menus and toolbar. void wxFrameBase::UpdateWindowUI(long flags) { wxWindowBase::UpdateWindowUI(flags); #if wxUSE_TOOLBAR if (GetToolBar()) GetToolBar()->UpdateWindowUI(flags); #endif #if wxUSE_MENUS if (GetMenuBar()) { // If coming from an idle event, we only want to update the menus if // we're in the wxUSE_IDLEMENUUPDATES configuration, otherwise they // will be update when the menu is opened later if ( !(flags & wxUPDATE_UI_FROMIDLE) || ShouldUpdateMenuFromIdle() ) DoMenuUpdates(); } #endif // wxUSE_MENUS }
// Do the UI update processing for this window. This is // provided for the application to call if it wants to // force a UI update, particularly for the menus and toolbar. void wxFrameBase::UpdateWindowUI(long flags) { wxWindowBase::UpdateWindowUI(flags); #if wxUSE_TOOLBAR if (GetToolBar()) GetToolBar()->UpdateWindowUI(flags); #endif #if wxUSE_MENUS if (GetMenuBar()) { if ((flags & wxUPDATE_UI_FROMIDLE) && !wxUSE_IDLEMENUUPDATES) { // If coming from an idle event, we only // want to update the menus if we're // in the wxUSE_IDLEMENUUPDATES configuration: // so if we're not, do nothing } else DoMenuUpdates(); } #endif // wxUSE_MENUS }