34    "<hr><table border=0>" 
   38static const wxString 
AliasOfFormat =   wxS( 
"<br><i>" ) + 
_( 
"Derived from" ) +
 
   39                                        wxS( 
" %s (%s)</i>" );
 
   41static const wxString 
KeywordsFormat =  wxS( 
"<br>" ) + 
_( 
"Keywords" ) + wxS( 
": %s" );
 
   44    "   <td><b>__NAME__</b></td>" 
   47static const wxString 
LinkFormat = wxS( 
"<a href=\"__HREF__\">__TEXT__</a>" );
 
   66        wxCHECK_RET( 
m_libs, 
"Symbol library manager adapter pointer is not valid" );
 
   77            wxLogError( 
_( 
"Error loading symbol %s from library '%s'." ) + wxS( 
"\n%s" ),
 
 
  112            m_html.Replace( 
"__ALIASOF__", wxEmptyString );
 
  116            wxString root_name = 
_( 
"Unknown" );
 
  117            wxString root_desc = wxS( 
"" );
 
  119            std::shared_ptr< LIB_SYMBOL > parent = 
m_symbol->GetParent().lock();
 
 
  138        esc_desc.Replace( wxS( 
"\n" ), wxS( 
"<br>" ) );
 
  143        m_html.Replace( wxS( 
"__DESC__" ), wxString::Format( 
DescFormat, esc_desc ) );
 
 
  148        wxString keywords = 
m_symbol->GetShownKeyWords();
 
  150        if( keywords.empty() )
 
  151            m_html.Replace( wxS( 
"__KEY__" ), wxEmptyString );
 
 
  164        switch( aField.
GetId() )
 
  167            text = 
m_symbol->GetDatasheetField().GetShownText( 
false );
 
  169            if( 
text.IsEmpty() || 
text == wxT( 
"~" ) )
 
  171                fieldhtml.Replace( wxS( 
"__VALUE__" ), 
text );
 
  178                if( 
text.Length() > 75 )
 
  179                    text = 
text.Left( 72 ) + wxT( 
"..." );
 
  183                fieldhtml.Replace( wxS( 
"__VALUE__" ), datasheetlink );
 
  190            return wxEmptyString;
 
  205                if( 
text.Length() > 75 )
 
  206                    text = 
text.Left( 72 ) + wxT( 
"..." );
 
  210                fieldhtml.Replace( wxS( 
"__VALUE__" ), link );
 
 
  225        std::vector<SCH_FIELD*> fields;
 
  234            std::shared_ptr<LIB_SYMBOL> parent = 
m_symbol->GetParent().lock();
 
  239                std::vector<SCH_FIELD*> parentFields;
 
  241                parent->GetFields( parentFields );
 
  243                for( 
const SCH_FIELD* parentField : parentFields )
 
  245                    if( 
m_symbol->GetField( parentField->GetCanonicalName() ) )
 
  253        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.
 
Define a library symbol object.
 
wxString GetName() const override
 
wxString GetDesc() override
 
wxString GetFullText(int unit=1) const
Return the text of a field.
 
bool IsHypertext() const override
Allow items to support hypertext actions when hovered/clicked.
 
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
 
An interface to the global shared library manager that is schematic-specific and linked to one projec...
 
wxString GenerateAliasInfo(SYMBOL_LIBRARY_ADAPTER *aLibs, LIB_ID const &aLibId, int aUnit)
Return an HTML page describing a LIB_ID in a #SYMBOL_LIB_TABLE.
 
static const wxString KeywordsFormat
 
static const wxString DescriptionFormat
 
static const wxString DescFormat
 
static const wxString LinkFormat
 
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
name of datasheet
 
@ REFERENCE
Field Reference of part, i.e. "IC21".
 
@ VALUE
Field Value of part, i.e. "3.3K".