static void gtk_page_size_callback( GtkWidget *WXUNUSED(widget), GtkAllocation* alloc, wxWindow *win )
{
if (g_isIdle) wxapp_install_idle_handler();
-
+
if ((win->m_x == alloc->x) &&
(win->m_y == alloc->y) &&
(win->m_width == alloc->width) &&
if (g_blockEventsOnDrag) return FALSE;
- if (!notebook->HasVMT()) return FALSE;
+ if (!notebook->m_hasVMT) return FALSE;
/* this code makes jumping down from the handles of the notebooks
to the actual items in the visible notebook page possible with
GTK_SIGNAL_FUNC(gtk_notebook_page_change_callback),
(gpointer)this );
- m_parent->AddChild( this );
-
- (m_parent->m_insertCallback)( m_parent, this );
+ m_parent->DoAddChild( this );
gtk_signal_connect( GTK_OBJECT(m_widget), "key_press_event",
GTK_SIGNAL_FUNC(gtk_notebook_key_press_callback), (gpointer)this );
wxFAIL_MSG( _T("wxNotebook::SetPadding not implemented") );
}
-void wxNotebook::SetTabSize(const wxSize& sz)
+void wxNotebook::SetTabSize(const wxSize& WXUNUSED(sz))
{
wxFAIL_MSG( _T("wxNotebook::SetTabSize not implemented") );
}
m_pages.DeleteObject( nb_page );
+ /* adjust the notebook page numbers so that
+ m_id reflects the current position, Daniel Paull */
+ int count = 0;
+ wxNode *node = m_pages.First();
+ wxNotebookPage *pagePtr = (wxNotebookPage *) NULL;
+ while (node)
+ {
+ pagePtr = (wxNotebookPage*)node->Data();
+ pagePtr->m_id = count++;
+ node = node->Next();
+ }
+
return TRUE;
}
gtk_widget_set_style( m_widget, m_widgetStyle );
}
+bool wxNotebook::IsOwnGtkWindow( GdkWindow *window )
+{
+ return ((m_widget->window == window) ||
+ (GTK_NOTEBOOK(m_widget)->panel == window));
+}
+
//-----------------------------------------------------------------------------
// wxNotebookEvent
//-----------------------------------------------------------------------------