-//-----------------------------------------------------------------------------
-// "size_allocate"
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxMDIChildFrame *win )
-{
- if ((win->m_x == alloc->x) &&
- (win->m_y == alloc->y) &&
- (win->m_width == alloc->width) &&
- (win->m_height == alloc->height) &&
- (win->m_sizeSet))
- {
- return;
- }
-
- win->SetSize( alloc->x, alloc->y, alloc->width, alloc->height );
-}
-}
-
-//-----------------------------------------------------------------------------
-// InsertChild callback for wxMDIClientWindow
-//-----------------------------------------------------------------------------
-
-static void wxInsertChildInMDI(wxWindow* parent, wxWindow* child)
-{
- wxMDIChildFrame* child_frame = wx_static_cast(wxMDIChildFrame*, child);
- wxString s = child_frame->GetTitle();
- if (s.IsNull()) s = _("MDI child");
-
- GtkWidget *label_widget = gtk_label_new( s.mbc_str() );
- gtk_misc_set_alignment( GTK_MISC(label_widget), 0.0, 0.5 );
-
- g_signal_connect (child->m_widget, "size_allocate",
- G_CALLBACK (gtk_page_size_callback), child);
-
- GtkNotebook *notebook = GTK_NOTEBOOK(parent->m_widget);
-
- gtk_notebook_append_page( notebook, child->m_widget, label_widget );
-
- child_frame->m_page = (GtkNotebookPage*) (g_list_last(notebook->children)->data);
-
- wxMDIParentFrame *parent_frame = wx_static_cast(wxMDIParentFrame*, parent->GetParent());
- parent_frame->m_justInserted = true;
-}
-