+ wxCHECK_MSG( m_widget != NULL, NULL, wxT("invalid combobox") );
+
+ wxNode *node = m_clientDataList.Nth( n );
+ if (!node) return NULL;
+
+ return node->Data();
+}
+
+void wxComboBox::SetClientObject( int n, wxClientData* clientData )
+{
+ wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
+
+ wxNode *node = m_clientObjectList.Nth( n );
+ if (!node) return;
+
+ wxClientData *cd = (wxClientData*) node->Data();
+ if (cd) delete cd;
+
+ node->SetData( (wxObject*) clientData );
+}
+
+wxClientData* wxComboBox::GetClientObject( int n )
+{
+ wxCHECK_MSG( m_widget != NULL, (wxClientData*)NULL, wxT("invalid combobox") );
+
+ wxNode *node = m_clientDataList.Nth( n );
+ if (!node) return (wxClientData*) NULL;
+
+ return (wxClientData*) node->Data();
+}
+
+void wxComboBox::Clear()
+{
+ wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
+
+ GtkWidget *list = GTK_COMBO(m_widget)->list;
+ gtk_list_clear_items( GTK_LIST(list), 0, Number() );
+
+ wxNode *node = m_clientObjectList.First();
+ while (node)
+ {
+ wxClientData *cd = (wxClientData*)node->Data();
+ if (cd) delete cd;
+ node = node->Next();
+ }
+ m_clientObjectList.Clear();
+
+ m_clientDataList.Clear();
+}
+
+void wxComboBox::Delete( int n )
+{
+ wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
+
+ GtkList *listbox = GTK_LIST( GTK_COMBO(m_widget)->list );
+
+ GList *child = g_list_nth( listbox->children, n );
+
+ if (!child)
+ {
+ wxFAIL_MSG(wxT("wrong index"));
+ return;
+ }
+
+ GList *list = g_list_append( (GList*) NULL, child->data );
+ gtk_list_remove_items( listbox, list );
+ g_list_free( list );
+
+ wxNode *node = m_clientObjectList.Nth( n );
+ if (node)
+ {
+ wxClientData *cd = (wxClientData*)node->Data();
+ if (cd) delete cd;
+ m_clientObjectList.DeleteNode( node );
+ }
+
+ node = m_clientDataList.Nth( n );
+ if (node)
+ {
+ m_clientDataList.DeleteNode( node );
+ }
+}