-//-----------------------------------------------------------------------------
-// "child_detached" of menu bar
-//-----------------------------------------------------------------------------
-
-static void gtk_menu_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrameGTK *win )
-{
- if (!win->m_hasVMT) return;
-
- win->m_menuBarDetached = TRUE;
- win->GtkUpdateSize();
-}
-
-#endif // wxUSE_MENUS_NATIVE
-
-#if wxUSE_TOOLBAR
-//-----------------------------------------------------------------------------
-// "child_attached" of tool bar
-//-----------------------------------------------------------------------------
-
-static void gtk_toolbar_attached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrameGTK *win )
-{
- if (!win->m_hasVMT) return;
-
- win->m_toolBarDetached = FALSE;
-
- win->GtkUpdateSize();
-}
-
-//-----------------------------------------------------------------------------
-// "child_detached" of tool bar
-//-----------------------------------------------------------------------------
-
-static void gtk_toolbar_detached_callback( GtkWidget *WXUNUSED(widget), GtkWidget *WXUNUSED(child), wxFrameGTK *win )
-{
- if (g_isIdle)
- wxapp_install_idle_handler();
-
- if (!win->m_hasVMT) return;
-
- win->m_toolBarDetached = TRUE;
- win->GtkUpdateSize();
-}
-#endif // wxUSE_TOOLBAR
-
-
-// ----------------------------------------------------------------------------
-// wxFrameGTK itself
-// ----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// InsertChild for wxFrameGTK
-//-----------------------------------------------------------------------------
-
-/* Callback for wxFrameGTK. 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( wxFrameGTK* parent, wxWindow* child )
-{
- wxASSERT( GTK_IS_WIDGET(child->m_widget) );
-
- if (!parent->m_insertInClientArea)
- {
- /* these are outside the client area */
- wxFrameGTK* frame = (wxFrameGTK*) 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();
-}
-
-// ----------------------------------------------------------------------------
-// wxFrameGTK creation
-// ----------------------------------------------------------------------------
-
-void wxFrameGTK::Init()
-{
- m_menuBarDetached = FALSE;
- m_toolBarDetached = FALSE;
-}
-
-bool wxFrameGTK::Create( wxWindow *parent,