KiCad PCB EDA Suite
selpart.cpp File Reference
#include <fctsys.h>
#include <gr_basic.h>
#include <confirm.h>
#include <pgm_base.h>
#include <sch_base_frame.h>
#include <general.h>
#include <class_library.h>
#include <dialog_helpers.h>

Go to the source code of this file.

Functions

static void DisplayCmpDocAndKeywords (wxString &aName, void *aData)
 

Function Documentation

static void DisplayCmpDocAndKeywords ( wxString &  aName,
void *  aData 
)
static

Definition at line 41 of file selpart.cpp.

References PART_LIBS::FindLibraryAlias(), LIB_ALIAS::GetDescription(), and LIB_ALIAS::GetKeyWords().

Referenced by SCH_BASE_FRAME::DisplayListComponentsInLib().

42 {
43  PART_LIBS* libs = (PART_LIBS*) aData;
44 
45  wxASSERT( libs );
46 
47  LIB_ID id( wxEmptyString, aName );
48  LIB_ALIAS* part = libs->FindLibraryAlias( id );
49 
50  if( !part )
51  return;
52 
53  aName = wxT( "Description: " ) + part->GetDescription();
54  aName += wxT( "\nKey Words: " ) + part->GetKeyWords();
55 }
Part library alias object definition.
Class LIB_ID.
Definition: lib_id.h:56
LIB_ALIAS * FindLibraryAlias(const LIB_ID &aLibId, const wxString &aLibraryName=wxEmptyString)
Function FindLibraryEntry searches all libraries in the list for an entry.
wxString GetDescription() const
Class PART_LIBS is a collection of PART_LIBs.
wxString GetKeyWords() const