+void wxFileCtrl::OnListDeleteAllItems( wxListEvent &WXUNUSED(event) )
+{
+ wxListItem item;
+ item.m_mask = wxLIST_MASK_DATA;
+
+ item.m_itemId = GetNextItem( -1, wxLIST_NEXT_ALL );
+ while ( item.m_itemId != -1 )
+ {
+ GetItem( item );
+ wxFileData *fd = (wxFileData*)item.m_data;
+ delete fd;
+ item.m_data = 0;
+ SetItem( item );
+ item.m_itemId = GetNextItem( item.m_itemId, wxLIST_NEXT_ALL );
+ }
+}
+