void CustomVirtListCtrl<T,L>::ReverseOrder()
{
	SaveSelection();
	std::reverse( m_data.begin(), m_data.end() );
	RefreshVisibleItems();
	RestoreSelection();
}
void CustomVirtListCtrl<T,L>::Clear()
{
	m_data.clear();
	SetItemCount( 0 );
	ResetSelection();
	RefreshVisibleItems();
}
void PlaybackListCtrl<PlaybackType>::RemovePlayback( const int index )
{
    if ( index != -1 && index < long(m_data.size()) ) {
        m_data.erase( m_data.begin() + index );
        SetItemCount( m_data.size() );
        RefreshVisibleItems( );
        return;
    }
    wxLogError( _T("Didn't find the replay to remove.") );
}
void CustomVirtListCtrl<T,L>::SortList( bool force )
{
	if ( ( m_sort_timer.IsRunning() ||  !m_dirty_sort ) && !force ) {
		return;
	}

	{
		wxWindowUpdateLocker upd( this );
		SelectionSaver<ThisType>(*this);
		Sort();
		m_dirty_sort = false;
	}
	RefreshVisibleItems();//needs to be out of locker scope
}
Beispiel #5
0
void ChannelListctrl::FilterChannel( const wxString& partial )
{
    m_visible_idxs.clear();
    unsigned int idx = 0;
    for ( unsigned int i = 0; i < m_data.size() ; ++i ) {
        const ChannelInfo& data = m_data[i];
        if ( data.name.Find( partial ) != wxNOT_FOUND ) {
            m_visible_idxs[idx] = i;
            idx++;
        }
    }
    SelectNone();
    m_last_filter_value = partial;
    SetItemCount( m_visible_idxs.size() );
    RefreshVisibleItems( );
}