- if (win->m_wxwindow)
- g_signal_handlers_disconnect_by_func (win->m_wxwindow,
- (gpointer) gtk_window_style_set_callback,
- win);
-}
-
-// Helper to suspend colour change event event processing while we change a widget's style
-class wxSuspendStyleEvents
-{
-public:
- wxSuspendStyleEvents(wxWindow* win)
- {
- m_win = win;
- if (win->IsTopLevel())
- wxDisconnectStyleSet(win);
- }
- ~wxSuspendStyleEvents()
- {
- if (m_win->IsTopLevel())
- wxConnectStyleSet(m_win);
- }
-
- wxWindow* m_win;
-};
-
-// ----------------------------------------------------------------------------
-// this wxWindowBase function is implemented here (in platform-specific file)
-// because it is static and so couldn't be made virtual
-// ----------------------------------------------------------------------------
-
-wxWindow *wxWindowBase::DoFindFocus()
-{
- // the cast is necessary when we compile in wxUniversal mode
- return (wxWindow *)g_focusWindow;
-}
-
-//-----------------------------------------------------------------------------
-// InsertChild for wxWindowGTK.
-//-----------------------------------------------------------------------------
-
-/* Callback for wxWindowGTK. 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 wxNotebook requires a different way to insert
- * a child in it. I had opted for creating a wxNotebookPage window class
- * which would have made this superfluous (such in the MDI window system),
- * but no-one was listening to me... */
-
-static void wxInsertChildInWindow( wxWindowGTK* parent, wxWindowGTK* child )
-{
- /* the window might have been scrolled already, do we
- have to adapt the position */
- wxPizza* pizza = WX_PIZZA(parent->m_wxwindow);
- child->m_x += pizza->m_scroll_x;
- child->m_y += pizza->m_scroll_y;
-
- gtk_widget_set_size_request(
- child->m_widget, child->m_width, child->m_height);
- gtk_fixed_put(
- GTK_FIXED(parent->m_wxwindow), child->m_widget, child->m_x, child->m_y);
+ wxASSERT_MSG(m_wxwindow, "Cannot add a child to a window without a client area");
+
+ // the window might have been scrolled already, we
+ // have to adapt the position
+ wxPizza* pizza = WX_PIZZA(m_wxwindow);
+ child->m_x += pizza->m_scroll_x;
+ child->m_y += pizza->m_scroll_y;
+
+ gtk_widget_set_size_request(
+ child->m_widget, child->m_width, child->m_height);
+ pizza->put(child->m_widget, child->m_x, child->m_y);