+public:
+ wxNotebookPage()
+ {
+ m_id = -1;
+ m_text = "";
+ m_image = -1;
+ m_page = NULL;
+ m_client = NULL;
+ m_parent = NULL;
+ };
+
+//private:
+ int m_id;
+ wxString m_text;
+ int m_image;
+ GtkNotebookPage *m_page;
+ GtkLabel *m_label;
+ wxWindow *m_client;
+ GtkNotebook *m_parent;
+};
+
+//-----------------------------------------------------------------------------
+// GTK callbacks
+//-----------------------------------------------------------------------------
+
+// page change callback
+static void gtk_notebook_page_change_callback(GtkNotebook *WXUNUSED(widget),
+ GtkNotebookPage *WXUNUSED(page),
+ gint nPage,
+ gpointer data)
+{
+ wxNotebook *notebook = (wxNotebook *)data;
+
+ int nOld = notebook->GetSelection();
+
+ // TODO: emulate PAGE_CHANGING event
+ wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED,
+ notebook->GetId(),
+ nPage,
+ nOld);
+ event.SetEventObject(notebook);
+ notebook->ProcessEvent(event);
+}
+
+static void gtk_notebook_client_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc,
+ wxNotebookPage *page )
+{
+ if (!page->m_client->HasVMT()) return;
+
+/*
+ printf( "OnResize from " );
+ if (page->m_client->GetClassInfo() && page->m_client->GetClassInfo()->GetClassName())
+ printf( page->m_client->GetClassInfo()->GetClassName() );
+ printf( ".\n" );
+
+ printf( " New: X: %d Y: %d ", alloc->x, alloc->y );
+ printf( " W: %d H: %d ", alloc->width, alloc->height );
+ printf( " .\n" );
+*/