- wxCHECK_RET( m_list != NULL, wxT("invalid listbox") );
-
- GtkWidget *list_item;
-
- wxString label(item);
-#if wxUSE_CHECKLISTBOX
- if (m_hasCheckBoxes)
- {
- label.Prepend(CHECKBOX_STRING);
- }
-#endif // wxUSE_CHECKLISTBOX
-
- list_item = gtk_list_item_new_with_label( label.mbc_str() );
-
- gtk_container_add( GTK_CONTAINER(m_list), list_item );
-
- gtk_signal_connect( GTK_OBJECT(list_item), "select",
- GTK_SIGNAL_FUNC(gtk_listitem_select_callback), (gpointer)this );
-
- if (HasFlag(wxLB_MULTIPLE))
- gtk_signal_connect( GTK_OBJECT(list_item), "deselect",
- GTK_SIGNAL_FUNC(gtk_listitem_deselect_callback), (gpointer)this );
-
- gtk_signal_connect( GTK_OBJECT(list_item),
- "button_press_event",
- (GtkSignalFunc)gtk_listbox_button_press_callback,
- (gpointer) this );