- // exclude top level and managed windows (status bar isn't
- // currently in the children list except under wxMac anyhow, but
- // it makes no harm to test for it)
- if ( !win->IsTopLevel() /*&& !IsOneOfBars(win)*/ )
- {
- if ( child )
- {
- return; // it's our second subwindow - nothing to do
- }
-
- child = win;
- }
- }
-
- // do we have any children at all?
- if ( child )
- {
- // exactly one child - set it's size to fill the whole frame
- int clientW, clientH;
- DoGetClientSize(&clientW, &clientH);
-
- // for whatever reasons, wxGTK wants to have a small offset - it
- // probably looks better with it?
-#ifdef __WXGTK__
- static const int ofs = 1;
-#else
- static const int ofs = 0;
-#endif
-
- child->SetSize(ofs, ofs, clientW - 2*ofs, clientH - 2*ofs);
- }
- }
-}
-
-/*** Copied from top level..! ***/
-// The default implementation for the close window event.
-void wxGenericMDIChildFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
-{
- Destroy();
-}
-
-void wxGenericMDIChildFrame::SetMDIParentFrame(wxGenericMDIParentFrame* parentFrame)
-{
- m_pMDIParentFrame = parentFrame;
-}
-
-wxGenericMDIParentFrame* wxGenericMDIChildFrame::GetMDIParentFrame() const
-{
- return m_pMDIParentFrame;
-}
-
-void wxGenericMDIChildFrame::Init()
-{
- m_pMDIParentFrame = (wxGenericMDIParentFrame *) NULL;
-#if wxUSE_MENUS
- m_pMenuBar = (wxMenuBar *) NULL;
-#endif // wxUSE_MENUS
-}
-
-void wxGenericMDIChildFrame::DoMoveWindow(int x, int y, int width, int height)
-{
- m_MDIRect = wxRect(x, y, width, height);
-}
-
-void wxGenericMDIChildFrame::ApplyMDIChildFrameRect()
-{
- wxPanel::DoMoveWindow(m_MDIRect.x, m_MDIRect.y, m_MDIRect.width, m_MDIRect.height);