20 #include <wx/tokenzr.h> 27 #include <wx/settings.h> 31 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>
35 return wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>( adapter );
60 std::vector<LIB_TREE_ITEM*> libList;
64 std::unique_ptr<FOOTPRINT_INFO>
dummy = std::make_unique<FOOTPRINT_INFO_IMPL>( aLibName, wxEmptyString );
67 auto libBounds = std::equal_range( fullListStart, fullListEnd,
dummy,
68 [](
const std::unique_ptr<FOOTPRINT_INFO>& a,
69 const std::unique_ptr<FOOTPRINT_INFO>& b )
71 return StrNumCmp( a->GetLibNickname(), b->GetLibNickname(), false ) < 0;
74 for(
auto i = libBounds.first; i != libBounds.second; ++i )
75 libList.push_back( i->get() );
Hold a record identifying a library accessed by the appropriate footprint library PLUGIN object in th...
FP_TREE_MODEL_ADAPTER(EDA_BASE_FRAME *aParent, LIB_TABLE *aLibs)
Constructor; takes a set of libraries to be included in the search.
wxString GenerateInfo(LIB_ID const &aLibId, int aUnit) override
A logical library item identifier and consists of various portions much like a URI.
Abstract pattern-matching tool and implementations.
static LIB_SYMBOL * dummy()
Used to draw a dummy shape when a LIB_SYMBOL is not found in library.
std::vector< LIB_TREE_ITEM * > getFootprints(const wxString &aLibName)
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > Create(EDA_BASE_FRAME *aParent, LIB_TABLE *aLibs)
Factory function: create a model adapter in a reference-counting container.
void DoAddLibrary(const wxString &aNodeName, const wxString &aDesc, const std::vector< LIB_TREE_ITEM * > &aItemList, bool presorted)
Add the given list of symbols by alias.
void AssignIntrinsicRanks(bool presorted=false)
Store intrinsic ranks on all children of this node.
const FP_LIB_TABLE_ROW * FindRow(const wxString &aNickName, bool aCheckIfEnabled=false)
Return an FP_LIB_TABLE_ROW if aNickName is found in this table or in any chained fall back table frag...
The base frame for deriving all KiCad main window classes.
int StrNumCmp(const wxString &aString1, const wxString &aString2, bool aIgnoreCase)
Compare two strings with alphanumerical content.
LIB_TREE_NODE_ROOT m_tree
std::vector< wxString > GetLogicalLibs()
Return the logical library names, all of them that are pertinent to a look up done on this LIB_TABLE.
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.