33 "<hr><table border=0>"
37static const wxString
AliasOfFormat = wxS(
"<br><i>" ) +
_(
"Derived from" ) + wxS(
" %s (%s)</i>" );
39static const wxString
KeywordsFormat = wxS(
"<br>" ) +
_(
"Keywords" ) + wxS(
": %s" );
42 " <td><b>__NAME__</b></td>"
70 wxCHECK_RET(
m_sym_lib_table,
"Symbol library table pointer is not valid" );
81 wxLogError(
_(
"Error loading symbol %s from library '%s'." ) + wxS(
"\n%s" ),
117 m_html.Replace(
"__ALIASOF__", wxEmptyString );
121 wxString root_name =
_(
"Unknown" );
122 wxString root_desc = wxS(
"" );
128 root_name = parent->GetName();
129 root_desc = parent->GetDesc();
144 esc_desc.Replace( wxS(
"\n" ), wxS(
"<br>" ) );
149 m_html.Replace( wxS(
"__DESC__" ), wxString::Format(
DescFormat, esc_desc ) );
157 if( keywords.empty() )
158 m_html.Replace( wxS(
"__KEY__" ), wxEmptyString );
172 switch( aField.
GetId() )
177 if(
text.IsEmpty() ||
text == wxT(
"~" ) )
179 fieldhtml.Replace( wxS(
"__VALUE__" ),
text );
186 if(
text.Length() > 75 )
187 text =
text.Left( 72 ) + wxT(
"..." );
191 fieldhtml.Replace( wxS(
"__VALUE__" ), datasheetlink );
198 return wxEmptyString;
217 std::vector<SCH_FIELD*> fields;
231 std::vector<SCH_FIELD*> parentFields;
233 parent->GetFields( parentFields );
235 for(
const SCH_FIELD* parentField : parentFields )
245 m_html.Replace( wxS(
"__FIELDS__" ), fieldtable );
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
A logical library item identifier and consists of various portions much like a URI.
bool IsValid() const
Check if this LID_ID is valid.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Define a library symbol object.
wxString GetDescription() const override
wxString GetKeyWords() const override
void GetFields(std::vector< SCH_FIELD * > &aList)
Return a list of fields within this symbol.
bool IsRoot() const override
For symbols derived from other symbols, IsRoot() indicates no derivation.
SCH_FIELD & GetDatasheetField() const
Return reference to the datasheet field.
wxString GetName() const override
SCH_FIELD * FindField(const wxString &aFieldName, bool aCaseInsensitive=false)
Find a field within this symbol matching aFieldName and returns it or NULL if not found.
LIB_SYMBOL_REF & GetParent()
Instances are attached to a symbol or sheet and provide a place for the symbol's value,...
wxString GetFullText(int unit=1) const
Return the text of a field.
wxString GetCanonicalName() const
Get a non-language-specific name for a field which can be used for storage, variable look-up,...
wxString GetShownText(const SCH_SHEET_PATH *aPath, bool aAllowExtraText, int aDepth=0) const
LIB_SYMBOL * LoadSymbol(const wxString &aNickname, const wxString &aName)
Load a LIB_SYMBOL having aName from the library given by aNickname.
static const wxString KeywordsFormat
static const wxString DatasheetLinkFormat
static const wxString DescriptionFormat
static const wxString DescFormat
wxString GenerateAliasInfo(SYMBOL_LIB_TABLE *aSymLibTable, LIB_ID const &aLibId, int aUnit)
Return an HTML page describing a LIB_ID in a SYMBOL_LIB_TABLE.
static const wxString AliasOfFormat
static const wxString FieldFormat
wxString EscapeHTML(const wxString &aString)
Return a new wxString escaped for embedding in HTML.
wxString UnescapeString(const wxString &aSource)
wxString LinkifyHTML(wxString aStr)
Wraps links in HTML tags.
@ DATASHEET_FIELD
name of datasheet
@ VALUE_FIELD
Field Value of part, i.e. "3.3K".
@ REFERENCE_FIELD
Field Reference of part, i.e. "IC21".