+ win->m_isIconized = FALSE;
+}
+
+//-----------------------------------------------------------------------------
+// "unmap_event" from m_widget
+//-----------------------------------------------------------------------------
+
+static void
+gtk_frame_unmap_callback( GtkWidget * WXUNUSED(widget),
+ GdkEvent * WXUNUSED(event),
+ wxFrame *win )
+{
+ win->m_isIconized = TRUE;
+}
+
+//-----------------------------------------------------------------------------
+// "expose_event" of m_client
+//-----------------------------------------------------------------------------
+
+static int gtk_window_expose_callback( GtkWidget *widget, GdkEventExpose *gdk_event, wxWindow *win )
+{
+ GtkPizza *pizza = GTK_PIZZA(widget);
+
+ gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE, &gdk_event->area, win->m_widget, "base", 0, 0, -1, -1);
+
+ return TRUE;
+}
+
+//-----------------------------------------------------------------------------
+// "draw" of m_client
+//-----------------------------------------------------------------------------
+
+
+static void gtk_window_draw_callback( GtkWidget *widget, GdkRectangle *rect, wxWindow *win )
+{
+ GtkPizza *pizza = GTK_PIZZA(widget);
+
+ gtk_paint_flat_box (win->m_widget->style, pizza->bin_window, GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE, rect, win->m_widget, "base", 0, 0, -1, -1);
+}
+
+// ----------------------------------------------------------------------------
+// wxFrame itself
+// ----------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+// InsertChild for wxFrame
+//-----------------------------------------------------------------------------
+
+/* Callback for wxFrame. This very strange beast has to be used because
+ * C++ has no virtual methods in a constructor. We have to emulate a
+ * virtual function here as wxWindows requires different ways to insert
+ * a child in container classes. */
+
+static void wxInsertChildInFrame( wxFrame* parent, wxWindow* child )
+{
+ wxASSERT( GTK_IS_WIDGET(child->m_widget) );
+
+ if (!parent->m_insertInClientArea)
+ {
+ /* these are outside the client area */
+ wxFrame* frame = (wxFrame*) parent;
+ gtk_pizza_put( GTK_PIZZA(frame->m_mainWidget),
+ GTK_WIDGET(child->m_widget),
+ child->m_x,
+ child->m_y,
+ child->m_width,
+ child->m_height );
+
+#if wxUSE_TOOLBAR_NATIVE
+ /* we connect to these events for recalculating the client area
+ space when the toolbar is floating */
+ if (wxIS_KIND_OF(child,wxToolBar))
+ {
+ wxToolBar *toolBar = (wxToolBar*) child;
+ if (toolBar->GetWindowStyle() & wxTB_DOCKABLE)
+ {
+ gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_attached",
+ GTK_SIGNAL_FUNC(gtk_toolbar_attached_callback), (gpointer)parent );
+
+ gtk_signal_connect( GTK_OBJECT(toolBar->m_widget), "child_detached",
+ GTK_SIGNAL_FUNC(gtk_toolbar_detached_callback), (gpointer)parent );
+ }
+ }
+#endif // wxUSE_TOOLBAR
+ }
+ else
+ {
+ /* these are inside the client area */
+ gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
+ GTK_WIDGET(child->m_widget),
+ child->m_x,
+ child->m_y,
+ child->m_width,
+ child->m_height );
+ }
+
+ /* resize on OnInternalIdle */
+ parent->GtkUpdateSize();