]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/window.cpp
A bit more Unicode compilation.
[wxWidgets.git] / src / gtk / window.cpp
index 93cb0f3c647acc87ddcae2cea7eff61b9d076b24..d12fcf4e69322147d9481d7785b95598c6925287 100644 (file)
@@ -1625,7 +1625,7 @@ void wxWindow::Init()
     m_scrollGC = (GdkGC*) NULL;
     m_widgetStyle = (GtkStyle*) NULL;
 
-    m_insertCallback = wxInsertChildInWindow;
+    m_insertCallback = (wxInsertChildFunction) NULL;
 
     m_isStaticBox = FALSE;
     m_acceptsFocus = FALSE;
@@ -1651,6 +1651,8 @@ bool wxWindow::Create( wxWindow *parent, wxWindowID id,
 {
     PreCreation( parent, id, pos, size, style, name );
 
+    m_insertCallback = wxInsertChildInWindow;
+
     m_widget = gtk_scrolled_window_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
     GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
 
@@ -2366,6 +2368,21 @@ bool wxWindow::Reparent( wxWindow *newParent )
     return TRUE;
 }
 
+void wxWindow::DoAddChild(wxWindow *child) 
+{
+    wxASSERT_MSG( (m_widget != NULL), _T("invalid window") );
+
+    wxASSERT_MSG( (child != NULL), _T("invalid child window") );
+
+    wxASSERT_MSG( (m_insertCallback != NULL), _T("invalid child insertion function") );
+    
+    /* add to list */
+    AddChild( child );
+    
+    /* insert GTK representation */
+    (*m_insertCallback)(this, child);
+}
+
 void wxWindow::Raise()
 {
     wxCHECK_RET( (m_widget != NULL), _T("invalid window") );