/////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__
-#pragma implementation "frame.h"
+ #pragma implementation "frame.h"
#endif
#include "wx/frame.h"
if (m_frameToolBar) delete m_frameToolBar;
wxTopLevelWindows.DeleteObject( this );
-
+
if (wxTheApp->GetTopWindow() == this)
{
wxTheApp->SetTopWindow( (wxWindow*) NULL );
}
-
+
if (wxTopLevelWindows.Number() == 0)
- {
+ {
wxTheApp->ExitMainLoop();
}
}
return wxWindow::Show( show );
}
-void wxFrame::OnCloseWindow( wxCloseEvent &event )
-{
- if (GetEventHandler()->OnClose() || event.GetForce()) this->Destroy();
-}
-
bool wxFrame::Destroy()
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );
DoMenuUpdates();
}
+void wxFrame::OnCloseWindow( wxCloseEvent& event )
+{
+ // close the window if it wasn't vetoed by the application
+// if ( !event.GetVeto() ) // No, this isn't the interpretation of GetVeto.
+ Destroy();
+}
+
void wxFrame::OnSize( wxSizeEvent &WXUNUSED(event) )
{
wxASSERT_MSG( (m_widget != NULL), "invalid frame" );