]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mgl/toplevel.cpp
allocate HFONT on demand instead of doing every time a font property is modified
[wxWidgets.git] / src / mgl / toplevel.cpp
index 69bbdf584a5b2233d68e6ce4fceef088ab6c8808..a4f10c308cf355f18ea62c531e7277c9f0cc9378 100644 (file)
@@ -7,6 +7,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
 // ============================================================================
 // declarations
 // ============================================================================
 // headers
 // ----------------------------------------------------------------------------
 
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
+#include "wx/toplevel.h"
 
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+#endif // WX_PRECOMP
 
-#include "wx/defs.h"
-#include "wx/toplevel.h"
-#include "wx/app.h"
 #include "wx/mgl/private.h"
 
 // ----------------------------------------------------------------------------
@@ -106,22 +109,6 @@ bool wxTopLevelWindowMGL::Create(wxWindow *parent,
     return true;
 }
 
-wxTopLevelWindowMGL::~wxTopLevelWindowMGL()
-{
-    m_isBeingDeleted = true;
-
-    wxTopLevelWindows.DeleteObject(this);
-
-    if (wxTheApp->GetTopWindow() == this)
-        wxTheApp->SetTopWindow(NULL);
-
-    if ((wxTopLevelWindows.Number() == 0) &&
-        (wxTheApp->GetExitOnFrameDelete()))
-    {
-        wxTheApp->ExitMainLoop();
-    }
-}
-
 bool wxTopLevelWindowMGL::ShowFullScreen(bool show, long style)
 {
     if (show == m_fsIsShowing) return false; // return what?