-// The default implementation for the close window event.
-void wxFrame::OnCloseWindow(wxCloseEvent& event)
-{
- Destroy();
-}
-
-// Destroy the window (delayed, if a managed window)
-bool wxFrame::Destroy()
-{
- if (!wxPendingDelete.Member(this))
- wxPendingDelete.Append(this);
- return TRUE;
-}
-
-// Default menu selection behaviour - display a help string
-void wxFrame::OnMenuHighlight(wxMenuEvent& event)
-{
- if (GetStatusBar())
- {
- wxString help;
- int menuId = event.GetMenuId();
- if ( menuId != -1 )
- {
- wxMenuBar *menuBar = GetMenuBar();
-// Fix this in wxMenuBar
-/*
- if (menuBar && menuBar->FindItem(menuId))
- {
- help = menuBar->GetHelpString(menuId);
- }
-*/
- }
-
- // set status text even if the string is empty - this will at
- // least remove the string from the item which was previously
- // selected
- SetStatusText(help);
- }
-}
-
-wxMenuBar *wxFrame::GetMenuBar() const
-{
- return m_frameMenuBar;
-}
-
-bool wxFrame::ProcessCommand(int id)
-{
- wxMenuBar *bar = GetMenuBar() ;
- if ( !bar )
- return FALSE;
-
- wxMenuItem *item = bar->FindItemForId(id);
-
- if ( item && item->IsCheckable() )
- {
- bar->Check(id, !bar->IsChecked(id)) ;
- }
-
- wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, id);
- commandEvent.SetInt( id );
- commandEvent.SetEventObject( this );
-
- return GetEventHandler()->ProcessEvent(commandEvent);
-}
+// ----------------------------------------------------------------------------
+// wxFrame size management: we exclude the areas taken by menu/status/toolbars
+// from the client area, so the client area is what's really available for the
+// frame contents
+// ----------------------------------------------------------------------------