26#include <wx/tokenzr.h>
34wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>
38 return wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>( adapter );
44 aParent->GetViewerSettingsBase()->m_LibTree ),
53 std::vector<wxString> libNames =
m_libs->GetLibraryNames();
55 for(
const wxString& libName : libNames )
57 if( !
m_libs->HasLibrary( libName,
true ) )
63 std::vector<FOOTPRINT*> footprints =
m_libs->GetFootprints( libName,
true );
64 std::vector<LIB_TREE_ITEM*> treeItems;
65 treeItems.reserve( footprints.size() );
68 treeItems.push_back( fp );
70 DoAddLibrary( libName, *
m_libs->GetLibraryDescription( libName ), treeItems, pinned,
true );
The base frame for deriving all KiCad main window classes.
wxString GenerateInfo(LIB_ID const &aLibId, int aUnit) override
FOOTPRINT_LIBRARY_ADAPTER * m_libs
FP_TREE_MODEL_ADAPTER(PCB_BASE_FRAME *aParent, FOOTPRINT_LIBRARY_ADAPTER *aLibs)
Constructor; takes a set of libraries to be included in the search.
void AddLibraries(EDA_BASE_FRAME *aParent)
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > Create(PCB_BASE_FRAME *aParent, FOOTPRINT_LIBRARY_ADAPTER *aLibs)
Factory function: create a model adapter in a reference-counting container.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
A logical library item identifier and consists of various portions much like a URI.
LIB_TREE_MODEL_ADAPTER(EDA_BASE_FRAME *aParent, const wxString &aPinnedKey, APP_SETTINGS_BASE::LIB_TREE &aSettingsStruct)
Create the adapter.
LIB_TREE_NODE_ROOT m_tree
std::vector< wxString > m_shownColumns
LIB_TREE_NODE_LIBRARY & DoAddLibrary(const wxString &aNodeName, const wxString &aDesc, const std::vector< LIB_TREE_ITEM * > &aItemList, bool pinned, bool presorted)
Add the given list of symbols by alias.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
virtual COMMON_SETTINGS * GetCommonSettings() const
The backing store for a PROJECT, in JSON format.
virtual PROJECT_FILE & GetProjectFile() const
bool contains(const _Container &__container, _Value __value)
Returns true if the container contains the given value.
PGM_BASE & Pgm()
The global program "get" accessor.
std::vector< wxString > pinned_fp_libs