+void wxFrame::DoGetClientSize(int *width, int *height) const
+{
+ wxFrameBase::DoGetClientSize(width, height);
+
+#if wxUSE_MENUS
+ if ( m_frameMenuBar && height )
+ {
+ (*height) -= m_frameMenuBar->GetSize().y;
+ }
+#endif // wxUSE_MENUS
+
+#if wxUSE_STATUSBAR
+ if ( m_frameStatusBar && height )
+ {
+ (*height) -= m_frameStatusBar->GetSize().y;
+ }
+#endif // wxUSE_STATUSBAR
+
+#if wxUSE_TOOLBAR
+ if ( m_frameToolBar )
+ {
+ if ( width && (m_frameToolBar->GetWindowStyleFlag() & wxTB_VERTICAL) )
+ (*width) -= m_frameToolBar->GetSize().x;
+ else if ( height )
+ (*height) -= m_frameToolBar->GetSize().y;
+ }
+#endif // wxUSE_TOOLBAR
+}
+
+void wxFrame::DoSetClientSize(int width, int height)
+{
+#if wxUSE_MENUS
+ if ( m_frameMenuBar )
+ {
+ height += m_frameMenuBar->GetSize().y;
+ }
+#endif // wxUSE_MENUS
+
+#if wxUSE_STATUSBAR
+ if ( m_frameStatusBar )
+ {
+ height += m_frameStatusBar->GetSize().y;
+ }
+#endif // wxUSE_STATUSBAR
+
+#if wxUSE_TOOLBAR
+ if ( m_frameToolBar )
+ {
+#if wxUSE_STATUSBAR
+ height += m_frameStatusBar->GetSize().y;
+#endif // wxUSE_STATUSBAR
+
+ if ( m_frameToolBar->GetWindowStyleFlag() & wxTB_VERTICAL )
+ width += m_frameToolBar->GetSize().x;
+ else
+ height += m_frameToolBar->GetSize().y;
+ }
+#endif // wxUSE_TOOLBAR
+
+ wxFrameBase::DoSetClientSize(width, height);
+}
+
+wxSize wxFrame::GetMinSize() const
+{
+ wxSize size = wxFrameBase::GetMinSize();
+
+#if wxUSE_MENUS
+ if ( m_frameMenuBar )
+ {
+ const wxSize sizeMenu = m_frameMenuBar->GetBestSize();
+ if ( sizeMenu.x > size.x )
+ size.x = sizeMenu.x;
+ size.y += sizeMenu.y;
+ }
+#endif // wxUSE_MENUS
+
+#if wxUSE_TOOLBAR
+ if ( m_frameToolBar )
+ {
+ size.y += m_frameToolBar->GetSize().y;
+ }
+#endif // wxUSE_TOOLBAR
+
+#if wxUSE_STATUSBAR
+ if ( m_frameStatusBar )
+ {
+ size.y += m_frameStatusBar->GetSize().y;
+ }
+#endif // wxUSE_STATUSBAR
+
+ return size;
+}
+
+bool wxFrame::Enable(bool enable)
+{
+ if (!wxFrameBase::Enable(enable))
+ return false;
+#ifdef __WXMICROWIN__
+ if (m_frameMenuBar)
+ m_frameMenuBar->Enable(enable);
+#endif
+ return true;
+}