+ gint* pIntPath = gtk_tree_path_get_indices(path);
+
+ wxCHECK_MSG( pIntPath, wxNOT_FOUND, wxT("failed to get iterator path") );
+
+ int idx = pIntPath[0];
+
+ gtk_tree_path_free( path );
+
+ return idx;
+}
+
+// get GtkTreeEntry from position (note: you need to g_unref it if valid)
+GtkTreeEntry *wxListBox::GTKGetEntry(unsigned n) const
+{
+ GtkTreeIter iter;
+ if ( !GTKGetIteratorFor(n, &iter) )
+ return NULL;
+
+ return GetEntry(m_liststore, &iter, this);
+}
+
+void wxListBox::GTKSetItem(GtkTreeIter& iter, const GtkTreeEntry *entry)
+{
+#if wxUSE_CHECKLISTBOX
+ if ( m_hasCheckBoxes )
+ {
+ gtk_list_store_set(m_liststore, &iter,
+ 0, FALSE, // FALSE == not toggled
+ 1, entry,
+ -1);
+ }
+ else
+#endif // wxUSE_CHECKLISTBOX
+ {
+ gtk_list_store_set(m_liststore, &iter, 0, entry, -1);
+ }