KiCad PCB EDA Suite
Loading...
Searching...
No Matches
generate_footprint_info.h File Reference
#include <optional>
#include <wx/string.h>

Go to the source code of this file.

Functions

wxString GenerateFootprintInfo (FP_LIB_TABLE *aFpLibTable, LIB_ID const &aLibId)
 Return an HTML page describing a LIB_ID in a FP_LIB_TABLE.
 
std::optional< wxString > GetFootprintDocumentationURL (const FOOTPRINT &aFootprint)
 Get a URL to the documentation for a LIB_ID in a FP_LIB_TABLE.
 

Function Documentation

◆ GenerateFootprintInfo()

wxString GenerateFootprintInfo ( FP_LIB_TABLE aFpLibTable,
LIB_ID const &  aLibId 
)

Return an HTML page describing a LIB_ID in a FP_LIB_TABLE.

This is suitable for inclusion in a wxHtmlWindow.

Definition at line 181 of file generate_footprint_info.cpp.

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

Referenced by FP_TREE_MODEL_ADAPTER::GenerateInfo().

◆ GetFootprintDocumentationURL()

std::optional< wxString > GetFootprintDocumentationURL ( const FOOTPRINT aFootprint)

Get a URL to the documentation for a LIB_ID in a FP_LIB_TABLE.

This is suitable for opening in a web browser. Currently, for want of a proper home in the format, this is usually found in the "description" field of the footprint.

Returns
The URL, or std::nullopt if no URL is available.

Definition at line 48 of file generate_footprint_info.cpp.

References FOOTPRINT::GetLibDescription().

Referenced by FOOTPRINT_INFO_GENERATOR::GenerateHtml(), and FOOTPRINT_EDITOR_CONTROL::ShowDatasheet().