-// ----------------------------------------------------------------------------
-// GTK callbacks
-// ----------------------------------------------------------------------------
-
-#if wxUSE_MENUS_NATIVE
-
-//-----------------------------------------------------------------------------
-// "child_attached" of menu bar
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static void gtk_menu_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
-{
- if (!win->m_hasVMT) return;
-
- win->m_menuBarDetached = false;
- win->GtkUpdateSize();
-}
-}
-
-//-----------------------------------------------------------------------------
-// "child_detached" of menu bar
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
-{
- if (g_isIdle)
- wxapp_install_idle_handler();
-
- if (!win->m_hasVMT) return;
-
- // Raise the client area area
- gdk_window_raise( win->m_wxwindow->window );
-
- win->m_menuBarDetached = true;
- win->GtkUpdateSize();
-}
-}
-
-#endif // wxUSE_MENUS_NATIVE
-
-#if wxUSE_TOOLBAR
-//-----------------------------------------------------------------------------
-// "child_attached" of tool bar
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
-{
- if (!win->m_hasVMT) return;
-
- win->m_toolBarDetached = false;
- win->GtkUpdateSize();
-}
-}
-
-//-----------------------------------------------------------------------------
-// "child_detached" of tool bar
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static void gtk_toolbar_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrame *win )
-{
- if (g_isIdle)
- wxapp_install_idle_handler();
-
- if (!win->m_hasVMT) return;
-
- // Raise the client area area
- gdk_window_raise( win->m_wxwindow->window );
-
- win->m_toolBarDetached = true;
- win->GtkUpdateSize();
-}
-}
-#endif // wxUSE_TOOLBAR
-
-
-// ----------------------------------------------------------------------------
-// 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 wxWidgets 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)
- {
- g_signal_connect (toolBar->m_widget, "child_attached",
- G_CALLBACK (gtk_toolbar_attached_callback),
- parent);
- g_signal_connect (toolBar->m_widget, "child_detached",
- G_CALLBACK (gtk_toolbar_detached_callback),
- 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();
-}
-