void* wxListBox::DoGetItemClientData(unsigned int n) const { wxTreeEntry* entry = GTKGetEntry(n); wxCHECK_MSG(entry, NULL, wxT("could not get entry")); return wx_tree_entry_get_userdata(entry); }
void wxListBox::DoSetItemClientData(unsigned int n, void* clientData) { wxTreeEntry* entry = GTKGetEntry(n); wxCHECK_RET(entry, wxT("could not get entry")); wx_tree_entry_set_userdata(entry, clientData); }
void wxListBox::DoSetItemClientData(unsigned int n, void* clientData) { wxGtkObject<GtkTreeEntry> entry(GTKGetEntry(n)); wxCHECK_RET(entry, wxT("could not get entry")); gtk_tree_entry_set_userdata( entry, clientData ); }
void* wxListBox::DoGetItemClientData(unsigned int n) const { wxGtkObject<GtkTreeEntry> entry(GTKGetEntry(n)); wxCHECK_MSG(entry, NULL, wxT("could not get entry")); return gtk_tree_entry_get_userdata( entry ); }
wxString wxListBox::GetString(unsigned int n) const { wxCHECK_MSG( m_treeview != NULL, wxEmptyString, wxT("invalid listbox") ); wxTreeEntry* entry = GTKGetEntry(n); wxCHECK_MSG( entry, wxEmptyString, wxT("wrong listbox index") ); return wxGTK_CONV_BACK(wx_tree_entry_get_label(entry)); }
void wxListBox::DoSetItemClientData(unsigned int n, void* clientData) { wxCHECK_RET( IsValid(n), wxT("Invalid index passed to SetItemClientData") ); GtkTreeEntry* entry = GTKGetEntry(n); wxCHECK_RET(entry, wxT("could not get entry")); gtk_tree_entry_set_userdata( entry, clientData ); g_object_unref (entry); }
void* wxListBox::DoGetItemClientData(unsigned int n) const { wxCHECK_MSG( IsValid(n), NULL, wxT("Invalid index passed to GetItemClientData") ); GtkTreeEntry* entry = GTKGetEntry(n); wxCHECK_MSG(entry, NULL, wxT("could not get entry")); void* userdata = gtk_tree_entry_get_userdata( entry ); g_object_unref (entry); return userdata; }
void wxListBox::SetString(unsigned int n, const wxString& label) { wxCHECK_RET( IsValid(n), wxT("invalid index in wxListBox::SetString") ); wxCHECK_RET( m_treeview != NULL, wxT("invalid listbox") ); GtkTreeEntry* entry = GTKGetEntry(n); wxCHECK_RET( entry, wxT("wrong listbox index") ); // update the item itself gtk_tree_entry_set_label(entry, wxGTK_CONV(label)); // and update the model which will refresh the tree too GtkTreeIter iter; wxCHECK_RET( GTKGetIteratorFor(n, &iter), wxT("failed to get iterator") ); // FIXME: this resets the checked status of a wxCheckListBox item GTKSetItem(iter, entry); }