180 m_deleteFilterButton->Bind( wxEVT_BUTTON,
181 [&]( wxCommandEvent& aEvent )
183 wxCommandEvent cmdEvent( EDA_EVT_LISTBOX_DELETE );
184 m_fpFilterTricks->ProcessEvent( cmdEvent );
188 m_FootprintFilterListBox->Bind( EDA_EVT_LISTBOX_CHANGED,
189 [&]( wxCommandEvent& aEvent )
193 for(
unsigned ii = 0; ii < m_FootprintFilterListBox->GetCount(); ++ii )
195 wxString
filter = m_FootprintFilterListBox->GetString( ii );
200 updateMatchingFootprints();
205 m_FootprintFilterListBox->Bind( wxEVT_COMMAND_LISTBOX_SELECTED,
206 [
this]( wxCommandEvent& aEvent )
208 updateMatchingFootprints();
217 m_matchingFootprints->AppendColumn( wxEmptyString, wxLIST_FORMAT_LEFT, 200 );
219 m_matchingFootprints->Bind( wxEVT_SIZE,
220 [
this]( wxSizeEvent& aEvent )
222 int width = m_matchingFootprints->GetClientSize().GetWidth() - 2;
223 m_matchingFootprints->SetColumnWidth( 0, std::max( width, 20 ) );
361 for(
const wxString& footprint :
result.m_MatchingNames )
367 labelText =
_(
"Failed to query matching footprints." );
371 wxString countFormat =
372 result.m_IsLimited ?
_(
"Matching footprints (%zu+):" ) :
_(
"Matching footprints (%zu):" );
373 labelText = wxString::Format( countFormat,
result.m_MatchingNames.size() );
493 if( fpName.IsEmpty() )
498 OPEN_IN_FOOTPRINT_EDITOR = 1,
499 ASSIGN_TO_FOOTPRINT_FIELD,
505 menu.Append( OPEN_IN_FOOTPRINT_EDITOR,
_(
"Open in Footprint Editor" ) );
510 menu.Append( ASSIGN_TO_FOOTPRINT_FIELD,
_(
"Assign to Footprint Field" ) );
512 menu.Append( COPY_FOOTPRINT_NAME,
_(
"Copy Footprint Name" ) +
"\tCtrl+C" );
514 switch( GetPopupMenuSelectionFromUser( menu ) )
516 case OPEN_IN_FOOTPRINT_EDITOR:
519 case ASSIGN_TO_FOOTPRINT_FIELD:
524 case COPY_FOOTPRINT_NAME:
A KICAD version of wxTextEntryDialog which supports the various improvements/work-arounds from DIALOG...
wxString GetValue() const
wxString result
Test unit parsing edge cases and error handling.