示例#1
0
void BattleListCtrl::UpdateBattle( IBattle& battle )
{
    int index = GetIndexFromData( &battle );

    RefreshItem( index );
    MarkDirtySort();
}
bool CustomVirtListCtrl<T,L>::AddItem( const T& item )
{
	if ( GetIndexFromData( item ) != -1 )
		return false;

	m_data.push_back( item );
	SetItemCount( m_data.size() );
	RefreshItem( m_data.size() - 1 );
	MarkDirtySort();
	return true;
}
示例#3
0
void NickListCtrl::UserUpdated( const User& user )
{
	int index = GetIndexFromData( &user );
	if ( index != -1 ) {
		m_data[index] = &user;
		MarkDirtySort();
		RefreshItem( index );
	}
	else {
		wxLogWarning( _T( "NickListCtrl::UserUpdated error, index == -1 ." ) );
	}
}
示例#4
0
void TorrentListCtrl::UpdateTorrentInfo(const DataType& info)
{
	int index = GetIndexFromData(info);

	if( index < 0)
	{
		if(IsTorrentActive(info))
			AddTorrentInfo(info);
		return;
	}

	m_data[index] = info;
	RefreshItem( index );
	MarkDirtySort();
}
示例#5
0
void BattleroomListCtrl::UpdateUser( const int& index )
{
    wxWindowUpdateLocker lock( this );
    RefreshItem( index );
    MarkDirtySort();
}