void FOOTPRINTS_LISTBOX::OnLeftDClick( wxListEvent& event ) { wxString footprintName = GetSelectedFootprint(); GetParent()->SetNewPkg( footprintName ); }
void CVPCB_MAINFRAME::DisplayStatus() { wxString msg; COMPONENT* component; if( wxWindow::FindFocus() == m_compListBox || wxWindow::FindFocus() == m_libListBox ) { msg.Printf( _( "Components: %d, unassigned: %d" ), (int) m_netlist.GetCount(), m_undefinedComponentCnt ); SetStatusText( msg, 0 ); msg.Empty(); component = GetSelectedComponent(); if( component ) { for( unsigned ii = 0; ii < component->GetFootprintFilters().GetCount(); ii++ ) { if( msg.IsEmpty() ) msg += component->GetFootprintFilters()[ii]; else msg += wxT( ", " ) + component->GetFootprintFilters()[ii]; } msg = _( "Filter list: " ) + msg; } SetStatusText( msg, 1 ); } else { wxString footprintName = GetSelectedFootprint(); FOOTPRINT_INFO* module = m_FootprintsList.GetModuleInfo( footprintName ); if( module ) // can be NULL if no netlist loaded { msg = _( "Description: " ) + module->GetDoc(); SetStatusText( msg, 0 ); msg = _( "Key words: " ) + module->GetKeywords(); SetStatusText( msg, 1 ); } } msg.Empty(); wxString filters; if( m_footprintListBox ) { if( ( m_filteringOptions & FOOTPRINTS_LISTBOX::FILTERING_BY_COMPONENT_KEYWORD ) ) filters = _( "key words" ); if( ( m_filteringOptions & FOOTPRINTS_LISTBOX::FILTERING_BY_PIN_COUNT ) ) { if( !filters.IsEmpty() ) filters += wxT( "+" ); filters += _( "pin count" ); } if( ( m_filteringOptions & FOOTPRINTS_LISTBOX::FILTERING_BY_LIBRARY ) ) { if( !filters.IsEmpty() ) filters += wxT( "+" ); filters += _( "library" ); } if( ( m_filteringOptions & FOOTPRINTS_LISTBOX::FILTERING_BY_NAME ) ) { if( !filters.IsEmpty() ) filters += wxT( "+" ); filters += _( "name" ); } if( filters.IsEmpty() ) msg = _( "No filtering" ); else msg.Printf( _( "Filtered by %s" ), GetChars( filters ) ); msg << wxT( ": " ) << m_footprintListBox->GetCount(); SetStatusText( msg, 2 ); } }