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; }
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 ." ) ); } }
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(); }
void BattleroomListCtrl::UpdateUser( const int& index ) { wxWindowUpdateLocker lock( this ); RefreshItem( index ); MarkDirtySort(); }