wxFrame::~wxFrame()
{
- m_isBeingDeleted = true;
+ SendDestroyEvent();
+
DeleteAllBars();
}
int w, h;
toolbar->GetSize(&w, &h);
- if ( toolbar->GetWindowStyleFlag() & wxTB_VERTICAL )
+ if ( toolbar->HasFlag(wxTB_LEFT) )
{
pt.x += w;
}
- else
+ else if ( HasFlag(wxTB_TOP) )
{
#if !wxOSX_USE_NATIVE_TOOLBAR
pt.y += h;
wxSysColourChangedEvent event2;
event2.SetEventObject( m_frameStatusBar );
- m_frameStatusBar->ProcessEvent(event2);
+ m_frameStatusBar->GetEventHandler()->ProcessEvent(event2);
}
#endif // wxUSE_STATUSBAR
#if wxUSE_MENUS
void wxFrame::DetachMenuBar()
{
- if ( m_frameMenuBar )
- m_frameMenuBar->UnsetInvokingWindow();
-
wxFrameBase::DetachMenuBar();
}
if (m_frameMenuBar)
{
- m_frameMenuBar->SetInvokingWindow( this );
if (makeCurrent)
m_frameMenuBar->MacInstallMenuBar();
}
if ( m_frameToolBar == toolbar )
return ;
+#ifndef __WXOSX_IPHONE__
#if wxOSX_USE_NATIVE_TOOLBAR
if ( m_frameToolBar )
m_frameToolBar->MacInstallNativeToolbar( false ) ;
#endif
-
+#endif
m_frameToolBar = toolbar ;
+#ifndef __WXOSX_IPHONE__
#if wxOSX_USE_NATIVE_TOOLBAR
if ( toolbar )
toolbar->MacInstallNativeToolbar( true ) ;
#endif
+#endif
}
wxToolBar* wxFrame::CreateToolBar(long style, wxWindowID id, const wxString& name)
int cw, ch;
GetSize( &cw , &ch ) ;
-
+
int statusX = 0 ;
int statusY = 0 ;
}
#endif
+#ifdef __WXOSX_IPHONE__
+ // TODO integrate this in a better way, on iphone the status bar is not a child of the content view
+ // but the toolbar is
+ ch -= 20;
+#endif
+
if (GetToolBar())
{
int tx, ty, tw, th;