- m_pMDIParentFrame->OnMenuHighlight(event);
- }
-#endif // wxUSE_STATUSBAR
-}
-
-void wxGenericMDIChildFrame::OnActivate(wxActivateEvent& event)
-{
- // Do mothing.
-}
-
-/*** Copied from top level..! ***/
-// default resizing behaviour - if only ONE subwindow, resize to fill the
-// whole client area
-void wxGenericMDIChildFrame::OnSize(wxSizeEvent& WXUNUSED(event))
-{
- // if we're using constraints or sizers - do use them
- if ( GetAutoLayout() )
- {
- Layout();
- }
- else
- {
- // do we have _exactly_ one child?
- wxWindow *child = (wxWindow *)NULL;
- for ( wxWindowList::Node *node = GetChildren().GetFirst();
- node;
- node = node->GetNext() )
- {
- wxWindow *win = node->GetData();
-
- // 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);
- }