BOOL CLibraryView::SelClear(BOOL bNotify) { if ( m_pSelection->IsEmpty() ) return FALSE; m_pSelection->RemoveAll(); if ( bNotify ) { CLibraryFrame* pFrame = (CLibraryFrame*)GetOwner(); pFrame->OnViewSelection(); } return TRUE; }
BOOL CLibraryView::SelAdd(CLibraryListItem oObject, BOOL bNotify) { if ( m_pSelection->Find( oObject ) ) return FALSE; m_pSelection->AddTail( oObject ); if ( bNotify ) { CLibraryFrame* pFrame = (CLibraryFrame*)GetOwner(); pFrame->OnViewSelection(); } return TRUE; }
BOOL CLibraryView::SelRemove(CLibraryListItem oObject, BOOL bNotify) { POSITION pos = m_pSelection->Find( oObject ); if ( pos == NULL ) return FALSE; m_pSelection->RemoveAt( pos ); if ( bNotify ) { CLibraryFrame* pFrame = (CLibraryFrame*)GetOwner(); pFrame->OnViewSelection(); } return TRUE; }