+ // we've created the notebook page in AddChild(). Now we just have to set
+ // the caption for the page and set the others parameters.
+
+ wxNotebookPage *page = (wxNotebookPage *) NULL;
+
+ wxNode *node = m_pages.First();
+ while (node)
+ {
+ page = (wxNotebookPage*)node->Data();
+ if ( page->m_client == win ) break;
+ node = node->Next();
+ }
+
+ wxCHECK_MSG( page != NULL, FALSE, "Can't add a page whose parent is not the notebook!" );
+
+ if (imageId != -1)
+ {
+ wxASSERT( m_imageList != NULL );
+
+ wxBitmap *bmp = m_imageList->GetBitmap(imageId);
+ GdkPixmap *pixmap = bmp->GetPixmap();
+ GdkBitmap *mask = (GdkBitmap*) NULL;
+ if (bmp->GetMask()) mask = bmp->GetMask()->GetBitmap();
+ GtkWidget *pixmapwid = gtk_pixmap_new (pixmap, mask );
+
+ gtk_box_pack_start(GTK_BOX(page->m_box), pixmapwid, FALSE, FALSE, 3);
+
+ gtk_widget_show(pixmapwid);
+ }
+
+ // then set the attributes