-#if WXWIN_COMPATIBILITY
-void wxFrame::OldOnSize(int x, int y)
-{
-#if WXWIN_COMPATIBILITY == 1
- wxSizeEvent event(wxSize(x, y), m_windowId);
- event.SetEventObject( this );
- if (GetEventHandler()->ProcessEvent(event))
- return;
-#endif
- // Search for a child which is a subwindow, not another frame.
- wxWindow *child = NULL;
- // Count the number of _subwindow_ children
- int noChildren = 0;
- for(wxNode *node = GetChildren()->First(); node; node = node->Next())
- {
- wxWindow *win = (wxWindow *)node->Data();
- if (!win->IsKindOf(CLASSINFO(wxFrame)) && !win->IsKindOf(CLASSINFO(wxDialog)) && (win != GetStatusBar()))
- {
- child = win;
- noChildren ++;
- }
- }
-
- // If not one child, call the Layout function if compiled in
- if (!child || (noChildren > 1)
-#if USE_CONSTRAINTS
- || GetAutoLayout()
-#endif
- )
- {
-#if USE_CONSTRAINTS
- if (GetAutoLayout())
- Layout();
-#endif
- return;
- }
-
- if (child)
- {
- int client_x, client_y;
-
-#if DEBUG > 1
- wxDebugMsg("wxFrame::OnSize: about to set the child's size.\n");
-#endif
-
- GetClientSize(&client_x, &client_y);
- child->SetSize(0, 0, client_x, client_y);
- }
-}
-
-// Default activation behaviour - set the focus for the first child
-// subwindow found.
-void wxFrame::OldOnActivate(bool flag)
-{
-#if WXWIN_COMPATIBILITY == 1
- wxActivateEvent event(wxEVT_ACTIVATE, flag, m_windowId);
- event.SetEventObject( this );
- if (GetEventHandler()->ProcessEvent(event))
- return;
-#endif
- for(wxNode *node = GetChildren()->First(); node; node = node->Next())
- {
- // Find a child that's a subwindow, but not a dialog box.
- wxWindow *child = (wxWindow *)node->Data();
- if (!child->IsKindOf(CLASSINFO(wxFrame)) &&
- !child->IsKindOf(CLASSINFO(wxDialog)))
- {
-#if DEBUG > 1
- wxDebugMsg("wxFrame::OnActivate: about to set the child's focus.\n");
-#endif
- child->SetFocus();
- return;
- }
- }
-}
-
-// Default menu selection behaviour - display a help string
-void wxFrame::OldOnMenuSelect(int id)
-{
-#if WXWIN_COMPATIBILITY == 1
- wxMenuEvent event(wxEVT_MENU_HIGHLIGHT, id);
- event.SetEventObject( this );
- if (GetEventHandler()->ProcessEvent(event))
- return;
-#endif
- if (GetStatusBar())
- {
- if (id == -1)
- SetStatusText("");
- else
- {
- wxMenuBar *menuBar = GetMenuBar();
- if (menuBar)
- {
- wxString helpString(menuBar->GetHelpString(id));
- if (helpString != "")
- SetStatusText(helpString);
- }
- }
- }
-}
-#endif
-
-wxMenuBar *wxFrame::GetMenuBar(void) const