wxUniv compilation fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10935 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -321,6 +321,13 @@ bool wxFrameBase::SendIconizeEvent(bool iconized)
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) )
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
DoMenuUpdates();
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// status bar stuff
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -449,16 +456,9 @@ wxToolBar* wxFrameBase::OnCreateToolBar(long style,
|
||||
#endif // wxUSE_TOOLBAR
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Menu UI updating
|
||||
// menus
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
void wxFrameBase::OnIdle(wxIdleEvent& WXUNUSED(event) )
|
||||
{
|
||||
#if wxUSE_MENUS
|
||||
DoMenuUpdates();
|
||||
#endif // wxUSE_MENUS
|
||||
}
|
||||
|
||||
#if wxUSE_MENUS
|
||||
|
||||
// update all menus
|
||||
@@ -510,4 +510,35 @@ void wxFrameBase::DoMenuUpdates(wxMenu* menu, wxWindow* focusWin)
|
||||
}
|
||||
}
|
||||
|
||||
void wxFrameBase::DetachMenuBar()
|
||||
{
|
||||
if ( m_frameMenuBar )
|
||||
{
|
||||
m_frameMenuBar->Detach();
|
||||
m_frameMenuBar = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void wxFrameBase::AttachMenuBar(wxMenuBar *menubar)
|
||||
{
|
||||
if ( menubar )
|
||||
{
|
||||
m_frameMenuBar = menubar;
|
||||
menubar->Attach((wxFrame *)this);
|
||||
}
|
||||
}
|
||||
|
||||
void wxFrameBase::SetMenuBar(wxMenuBar *menubar)
|
||||
{
|
||||
if ( menubar == GetMenuBar() )
|
||||
{
|
||||
// nothing to do
|
||||
return;
|
||||
}
|
||||
|
||||
DetachMenuBar();
|
||||
|
||||
AttachMenuBar(menubar);
|
||||
}
|
||||
|
||||
#endif // wxUSE_MENUS
|
||||
|
Reference in New Issue
Block a user