KiCad PCB EDA Suite
generate_alias_info.cpp File Reference
#include <generate_alias_info.h>
#include <kicad_string.h>
#include <template_fieldnames.h>
#include <class_libentry.h>
#include <symbol_lib_table.h>

Go to the source code of this file.

Classes

class  ALIAS_INFO_GENERATOR
 

Functions

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. More...
 

Variables

static const wxString DescriptionFormat
 
static const wxString AliasOfFormat = "<br><i>" + _( "Alias of " ) + "%s (%s)</i>"
 
static const wxString DescFormat = "<br>%s"
 
static const wxString KeywordsFormat = "<br>" + _( "Keywords:" ) + " %s"
 
static const wxString FieldFormat
 
static const wxString DatasheetLinkFormat = "<a href=\"__VALUE__\">__VALUE__</a>"
 

Function Documentation

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.

This is suitable for inclusion in a wxHtmlWindow.

Definition at line 203 of file generate_alias_info.cpp.

References ALIAS_INFO_GENERATOR::GenerateHtml(), and ALIAS_INFO_GENERATOR::GetHtml().

Referenced by COMPONENT_TREE::onPreselect().

204 {
205  ALIAS_INFO_GENERATOR gen( aSymLibTable, aLibId, aUnit );
206  gen.GenerateHtml();
207  return gen.GetHtml();
208 }

Variable Documentation

const wxString AliasOfFormat = "<br><i>" + _( "Alias of " ) + "%s (%s)</i>"
static

Definition at line 37 of file generate_alias_info.cpp.

Referenced by ALIAS_INFO_GENERATOR::SetHtmlAliasOf().

const wxString DatasheetLinkFormat = "<a href=\"__VALUE__\">__VALUE__</a>"
static

Definition at line 45 of file generate_alias_info.cpp.

Referenced by ALIAS_INFO_GENERATOR::GetHtmlFieldRow().

const wxString DescFormat = "<br>%s"
static

Definition at line 38 of file generate_alias_info.cpp.

Referenced by ALIAS_INFO_GENERATOR::SetHtmlDesc().

const wxString DescriptionFormat
static
Initial value:
=
"<b>__NAME__</b>"
"__ALIASOF__"
"__DESC__"
"__KEY__"
"<hr><table border=0>"
"__FIELDS__"
"</table>"

Definition at line 28 of file generate_alias_info.cpp.

const wxString FieldFormat
static
Initial value:
=
"<tr>"
" <td><b>__NAME__</b></td>"
" <td>__VALUE__</td>"
"</tr>"

Definition at line 40 of file generate_alias_info.cpp.

Referenced by ALIAS_INFO_GENERATOR::GetHtmlFieldRow().

const wxString KeywordsFormat = "<br>" + _( "Keywords:" ) + " %s"
static

Definition at line 39 of file generate_alias_info.cpp.

Referenced by ALIAS_INFO_GENERATOR::SetHtmlKeywords().