+#include <gdk/gdk.h>
+#include <gtk/gtk.h>
+
+//-----------------------------------------------------------------------------
+// "toggled"
+//-----------------------------------------------------------------------------
+extern "C" {
+static void gtk_checklist_toggled(GtkCellRendererToggle * WXUNUSED(renderer),
+ gchar *stringpath,
+ wxCheckListBox *listbox)
+{
+ wxCHECK_RET( listbox->m_treeview != NULL, wxT("invalid listbox") );
+
+ GtkTreePath* path = gtk_tree_path_new_from_string(stringpath);
+ wxCommandEvent new_event( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED,
+ listbox->GetId() );
+ new_event.SetEventObject( listbox );
+ new_event.SetInt( gtk_tree_path_get_indices(path)[0] );
+ new_event.SetString( listbox->GetString( new_event.GetInt() ));
+ gtk_tree_path_free(path);
+ listbox->Check( new_event.GetInt(), !listbox->IsChecked(new_event.GetInt()));
+ listbox->HandleWindowEvent( new_event );
+}
+}