]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/frame.cpp
Added wxThread::GetMainId().
[wxWidgets.git] / src / gtk1 / frame.cpp
index 2e602ab9dc4d440f075b9a28864a2e657d274f82..94e99c07a5e50fa3a9c0e2522ceaa37d50e9f71b 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        frame.cpp
+// Name:        src/gtk1/frame.cpp
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
@@ -7,6 +7,9 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 // ============================================================================
 // declarations
 // ============================================================================
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "frame.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#include "wx/defs.h"
-
 #include "wx/frame.h"
-#include "wx/dialog.h"
-#include "wx/control.h"
-#include "wx/app.h"
-#include "wx/menu.h"
-#if wxUSE_TOOLBAR
+
+#ifndef WX_PRECOMP
+    #include "wx/app.h"
+    #include "wx/dcclient.h"
+    #include "wx/menu.h"
+    #include "wx/dialog.h"
+    #include "wx/control.h"
     #include "wx/toolbar.h"
-#endif
-#if wxUSE_STATUSBAR
     #include "wx/statusbr.h"
-#endif
-#include "wx/dcclient.h"
+#endif // WX_PRECOMP
 
 #include <glib.h>
-#include "wx/gtk/private.h"
+#include "wx/gtk1/private.h"
 
 #include <gdk/gdkkeysyms.h>
 #include <gdk/gdkx.h>
 
-#include "wx/gtk/win_gtk.h"
+#include "wx/gtk1/win_gtk.h"
 
 // ----------------------------------------------------------------------------
 // constants
@@ -236,7 +229,8 @@ bool wxFrame::Create( wxWindow *parent,
 
 wxFrame::~wxFrame()
 {
-    m_isBeingDeleted = true;
+    SendDestroyEvent();
+
     DeleteAllBars();
 }
 
@@ -392,7 +386,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
         geom.max_width = maxWidth;
         geom.max_height = maxHeight;
         gtk_window_set_geometry_hints( GTK_WINDOW(m_widget),
-                                       (GtkWidget*) NULL,
+                                       NULL,
                                        &geom,
                                        (GdkWindowHints) flag );
 
@@ -493,7 +487,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
         gtk_pizza_set_size( GTK_PIZZA(m_wxwindow),
                             m_frameStatusBar->m_widget,
                             xx, yy, ww, hh );
-        gtk_widget_draw( m_frameStatusBar->m_widget, (GdkRectangle*) NULL );
+        gtk_widget_draw( m_frameStatusBar->m_widget, NULL );
     }
 #endif // wxUSE_STATUSBAR
 
@@ -502,7 +496,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
     // send size event to frame
     wxSizeEvent event( wxSize(m_width,m_height), GetId() );
     event.SetEventObject( this );
-    GetEventHandler()->ProcessEvent( event );
+    HandleWindowEvent( event );
 
 #if wxUSE_STATUSBAR
     // send size event to status bar
@@ -510,7 +504,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y),
     {
         wxSizeEvent event2( wxSize(m_frameStatusBar->m_width,m_frameStatusBar->m_height), m_frameStatusBar->GetId() );
         event2.SetEventObject( m_frameStatusBar );
-        m_frameStatusBar->GetEventHandler()->ProcessEvent( event2 );
+        m_frameStatusBar->HandleWindowEvent( event2 );
     }
 #endif // wxUSE_STATUSBAR
 
@@ -622,12 +616,12 @@ void wxFrame::UpdateMenuBarSize()
 
     // this is called after Remove with a NULL m_frameMenuBar
     if ( m_frameMenuBar )
-    (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_frameMenuBar->m_widget) )->size_request )
-        (m_frameMenuBar->m_widget, &req );
+        (* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(m_frameMenuBar->m_widget) )->size_request )
+            (m_frameMenuBar->m_widget, &req );
 
     m_menuBarHeight = req.height;
 
-        // resize window in OnInternalIdle
+    // resize window in OnInternalIdle
 
     GtkUpdateSize();
 }
@@ -714,4 +708,3 @@ void wxFrame::PositionStatusBar()
     GtkUpdateSize();
 }
 #endif // wxUSE_STATUSBAR
-