Add footprint select dropdown to component chooser, serious refactoring

- DIALOG_CHOOSE_COMPONENT has footprint select widget
- FOOTPRINT_SELECT_WIDGET
- FOOTPRINT_CHOICE widget (customized wxComboCtrl)
- FOOTPRINT_FILTER class
- FOOTPRINT_INFO rework:
    - FOOTPRINT_ASYNC_LOADER to load without freezing UI
    - Rewrite loader threads as queue-driven thread pool
    - Make FOOTPRINT_INFO available via kiway
- FP_LIB_TABLE::PrefetchLib
- Access to global fp-lib-table via kiway
- SYNC_QUEUE threadsafe queue template
- Remove KICAD_FOOTPRINT_SELECTOR build option
This commit is contained in:
Chris Pavlina
2017-03-24 09:20:27 -04:00
parent cc7825d00b
commit 849b3c2a4b
46 changed files with 2635 additions and 668 deletions
+20
View File
@@ -34,6 +34,12 @@ bool EDA_PATTERN_MATCH_SUBSTR::SetPattern( const wxString& aPattern )
}
wxString const& EDA_PATTERN_MATCH_SUBSTR::GetPattern() const
{
return m_pattern;
}
int EDA_PATTERN_MATCH_SUBSTR::Find( const wxString& aCandidate ) const
{
int loc = aCandidate.Find( m_pattern );
@@ -75,6 +81,12 @@ bool EDA_PATTERN_MATCH_REGEX::SetPattern( const wxString& aPattern )
}
wxString const& EDA_PATTERN_MATCH_REGEX::GetPattern() const
{
return m_pattern;
}
int EDA_PATTERN_MATCH_REGEX::Find( const wxString& aCandidate ) const
{
if( m_regex.IsValid() )
@@ -100,6 +112,8 @@ int EDA_PATTERN_MATCH_REGEX::Find( const wxString& aCandidate ) const
bool EDA_PATTERN_MATCH_WILDCARD::SetPattern( const wxString& aPattern )
{
m_wildcard_pattern = aPattern;
// Compile the wildcard string to a regular expression
wxString regex;
regex.Alloc( 2 * aPattern.Length() ); // no need to keep resizing, we know the size roughly
@@ -132,6 +146,12 @@ bool EDA_PATTERN_MATCH_WILDCARD::SetPattern( const wxString& aPattern )
}
wxString const& EDA_PATTERN_MATCH_WILDCARD::GetPattern() const
{
return m_wildcard_pattern;
}
int EDA_PATTERN_MATCH_WILDCARD::Find( const wxString& aCandidate ) const
{
return EDA_PATTERN_MATCH_REGEX::Find( aCandidate );