32#include <wx/filedlg.h> 
   42#include <lib_table_lexer.h> 
   88    void SetValue( 
int aRow, 
int aCol, 
const wxString &aValue )
 override 
   90        wxCHECK( aRow < (
int) 
size(),  );
 
 
 
  120            std::function<
void( wxCommandEvent& )> aAddHandler ) :
 
 
  135            const wxString& options = row.
Options();
 
  136            wxString        
result = options;
 
  137            std::map<std::string, UTF8> choices;
 
  141            pi->GetLibraryOptions( &choices );
 
 
  161        if( 
size_t ndx = cb_text.find( 
"(fp_lib_table" ); ndx != std::string::npos )
 
  168                std::ranges::copy( tempTable.Rows(),
 
  173                    wxGridTableMessage msg( tbl, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, 0, 0 );
 
  174                    tbl->GetView()->ProcessTableMessage( msg );
 
  184            wxString 
text = cb_text;
 
  186            if( !
text.Contains( 
'\t' ) && 
text.Contains( 
',' ) )
 
  187                text.Replace( 
',', 
'\t' );
 
  189            if( 
text.Contains( 
'\t' ) )
 
  191                int row = 
m_grid->GetGridCursorRow();
 
  194                m_grid->SetGridCursor( row, 0 );
 
  200            m_grid->AutoSizeColumns( 
false );
 
  203        m_grid->AutoSizeColumns( 
false );
 
 
  207    bool toggleCell( 
int aRow, 
int aCol, 
bool aPreserveSelection )
 override 
  211            m_dialog->ShowInfoBarError( 
_( 
"Hidden footprint libraries are not yet supported." ) );
 
 
 
  223            [&]( 
WX_GRID* aLocGrid, 
int aCol )
 
  225                int prevWidth = aLocGrid->GetColSize( aCol );
 
  227                aLocGrid->AutoSizeColumn( aCol, 
false );
 
  228                aLocGrid->SetColSize( aCol, std::max( prevWidth, aLocGrid->GetColSize( aCol ) ) );
 
  233            [
this]( wxCommandEvent& event )
 
  238    aGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
 
  240    wxGridCellAttr* attr;
 
  242    attr = 
new wxGridCellAttr;
 
  250                    auto* libTable = static_cast<FP_LIB_TABLE_GRID*>( grid->GetTable() );
 
  251                    LIBRARY_TABLE_ROW& tableRow = libTable->at( row );
 
  252                    PCB_IO_MGR::PCB_FILE_T       fileType = PCB_IO_MGR::EnumFromStr( tableRow.Type() );
 
  253                    const IO_BASE::IO_FILE_DESC& pluginDesc = m_supportedFpFiles.at( fileType );
 
  255                    if( pluginDesc.m_IsFile )
 
  256                        return pluginDesc.FileFilter();
 
  258                        return wxEmptyString;
 
  262    aGrid->SetColAttr( 
COL_URI, attr );
 
  264    attr = 
new wxGridCellAttr;
 
  266    aGrid->SetColAttr( 
COL_TYPE, attr );
 
  268    attr = 
new wxGridCellAttr;
 
  269    attr->SetRenderer( 
new wxGridCellBoolRenderer() );
 
  273    attr = 
new wxGridCellAttr;
 
  274    attr->SetRenderer( 
new wxGridCellBoolRenderer() );
 
  290    if( aGrid->GetNumberRows() > 0 )
 
  291        aGrid->SelectRow( 0 );
 
 
  316        if( cfg->m_LastFootprintLibDir.IsEmpty() )
 
  370    auto joinExts = []( 
const std::vector<std::string>& aExts )
 
  373        for( 
const std::string& ext : aExts )
 
  375            if( !joined.empty() )
 
  376                joined << wxS( 
", " );
 
  378            joined << wxS( 
"*." ) << ext;
 
  388        if( desc.m_IsFile && !desc.m_FileExtensions.empty() )
 
  390            entryStr << wxString::Format( wxS( 
" (%s)" ), joinExts( desc.m_FileExtensions ) );
 
  392        else if( !desc.m_IsFile && !desc.m_ExtensionsInDir.empty() )
 
  394            wxString midPart = wxString::Format( 
_( 
"folder with %s files" ),
 
  395                                                 joinExts( desc.m_ExtensionsInDir ) );
 
  397            entryStr << wxString::Format( wxS( 
" (%s)" ), midPart );
 
  400        browseMenu->Append( type, entryStr );
 
 
  456        for( 
int r = 0; r < model->GetNumberRows(); )
 
  458            wxString nick = model->GetValue( r, 
COL_NICKNAME ).Trim( 
false ).Trim();
 
  459            wxString uri  = model->GetValue( r, 
COL_URI ).Trim( 
false ).Trim();
 
  460            unsigned illegalCh = 0;
 
  465                    msg = 
_( 
"A library table row nickname and path cells are empty." );
 
  467                    msg = 
_( 
"A library table row nickname cell is empty." );
 
  469                    msg = 
_( 
"A library table row path cell is empty." );
 
  471                wxWindow* topLevelParent = wxGetTopLevelParent( 
this );
 
  473                wxMessageDialog badCellDlg( topLevelParent, msg, 
_( 
"Invalid Row Definition" ),
 
  474                                            wxYES_NO | wxCENTER | wxICON_QUESTION | wxYES_DEFAULT );
 
  475                badCellDlg.SetExtendedMessage( 
_( 
"Empty cells will result in all rows that are " 
  476                                                  "invalid to be removed from the table." ) );
 
  477                badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( 
_( 
"Remove Invalid Cells" ) ),
 
  478                                           wxMessageDialog::ButtonLabel( 
_( 
"Cancel Table Update" ) ) );
 
  480                if( badCellDlg.ShowModal() == wxID_NO )
 
  487                model->DeleteRows( r, 1 );
 
  491                msg = wxString::Format( 
_( 
"Illegal character '%c' in nickname '%s'." ),
 
  502                wxWindow* topLevelParent = wxGetTopLevelParent( 
this );
 
  504                wxMessageDialog errdlg( topLevelParent, msg, 
_( 
"Library Nickname Error" ) );
 
  512                model->SetValue( r, 
COL_URI, uri );
 
  528        for( 
int r1 = 0; r1 < model->GetNumberRows() - 1; ++r1 )
 
  532            for( 
int r2 = r1 + 1; r2 < model->GetNumberRows(); ++r2 )
 
  538                    msg = wxString::Format( 
_( 
"Multiple libraries cannot share the same nickname ('%s')." ),
 
  549                    wxWindow* topLevelParent = wxGetTopLevelParent( 
this );
 
  551                    wxMessageDialog errdlg( topLevelParent, msg, 
_( 
"Library Nickname Error" ) );
 
 
  571            [&]() -> std::pair<int, int>
 
 
  594    wxArrayInt selectedRows = 
m_cur_grid->GetSelectedRows();
 
  595    wxGridCellCoordsArray cells = 
m_cur_grid->GetSelectedCells();
 
  596    wxGridCellCoordsArray blockTopLeft = 
m_cur_grid->GetSelectionBlockTopLeft();
 
  597    wxGridCellCoordsArray blockBotRight = 
m_cur_grid->GetSelectionBlockBottomRight();
 
  600    for( 
unsigned ii = 0; ii < cells.GetCount(); ii++ )
 
  601        selectedRows.Add( cells[ii].GetRow() );
 
  604    if( !blockTopLeft.IsEmpty() && !blockBotRight.IsEmpty() )
 
  606        for( 
int i = blockTopLeft[0].GetRow(); i <= blockBotRight[0].GetRow(); ++i )
 
  607            selectedRows.Add( i );
 
  611    if( selectedRows.size() == 0 && 
m_cur_grid->GetGridCursorRow() >= 0 )
 
  612        selectedRows.Add( 
m_cur_grid->GetGridCursorRow() );
 
  614    if( selectedRows.size() == 0 )
 
  620    std::sort( selectedRows.begin(), selectedRows.end() );
 
  629    for( 
int ii = selectedRows.GetCount()-1; ii >= 0; ii-- )
 
  631        int row = selectedRows[ii];
 
  633        if( row != last_row )
 
  640    if( 
m_cur_grid->GetNumberRows() > 0 && curRow >= 0 )
 
 
  653                std::vector<LIBRARY_TABLE_ROW>& rows = tbl->
Table().
Rows();
 
  655                auto current = rows.begin() + curRow;
 
  656                auto prev    = rows.begin() + curRow - 1;
 
  658                std::iter_swap( current, prev );
 
  661                wxGridTableMessage msg( tbl, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, row - 1, 0 );
 
  662                tbl->GetView()->ProcessTableMessage( msg );
 
 
  674                std::vector<LIBRARY_TABLE_ROW>& rows = tbl->
Table().
Rows();
 
  676                auto current = rows.begin() + curRow;
 
  677                auto next    = rows.begin() + curRow + 1;
 
  679                std::iter_swap( current, 
next );
 
  682                wxGridTableMessage msg( tbl, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, row, 0 );
 
  683                tbl->GetView()->ProcessTableMessage( msg );
 
 
  694    wxArrayInt selectedRows = 
m_cur_grid->GetSelectedRows();
 
  696    if( selectedRows.empty() && 
m_cur_grid->GetGridCursorRow() >= 0 )
 
  697        selectedRows.push_back( 
m_cur_grid->GetGridCursorRow() );
 
  699    wxArrayInt rowsToMigrate;
 
  704    for( 
int row : selectedRows )
 
  707            rowsToMigrate.push_back( row );
 
  710    if( rowsToMigrate.size() <= 0 )
 
  712        wxMessageBox( wxString::Format( 
_( 
"Select one or more rows containing libraries " 
  713                                           "to save as current KiCad format." ) ) );
 
  718        if( rowsToMigrate.size() == 1 )
 
  720            msg.Printf( 
_( 
"Save '%s' as current KiCad format and replace entry in table?" ),
 
  725            msg.Printf( 
_( 
"Save %d libraries as current KiCad format and replace entries in table?" ),
 
  726                        (
int) rowsToMigrate.size() );
 
  733    for( 
int row : rowsToMigrate )
 
  737        wxFileName legacyLib( resolvedPath );
 
  739        if( !legacyLib.Exists() )
 
  741            msg.Printf( 
_( 
"Library '%s' not found." ), relPath );
 
  746        wxFileName newLib( resolvedPath );
 
  748        newLib.SetName( 
"" );
 
  751        if( newLib.DirExists() )
 
  753            msg.Printf( 
_( 
"Folder '%s' already exists. Do you want overwrite any existing footprints?" ),
 
  754                        newLib.GetFullPath() );
 
  756            switch( wxMessageBox( msg, 
_( 
"Migrate Library" ), wxYES_NO|wxCANCEL|wxICON_QUESTION, 
m_parent ) )
 
  760            case wxCANCEL: 
return;
 
  775                relPath = newLib.GetFullPath();
 
  782            msg.Printf( 
_( 
"Failed to save footprint library file '%s'." ), newLib.GetFullPath() );
 
 
  804    if( event.GetEventType() == wxEVT_BUTTON )
 
  816        wxLogWarning( wxT( 
"File type selection event received but could not find the file type in the table" ) );
 
  834    wxWindow* topLevelParent = wxGetTopLevelParent( 
this );
 
  838        wxFileDialog dlg( topLevelParent, title, *lastDir, wxEmptyString, fileDesc.
FileFilter(),
 
  839                          wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
 
  841        if( dlg.ShowModal() == wxID_CANCEL )
 
  844        dlg.GetPaths( files );
 
  845        *lastDir = dlg.GetDirectory();
 
  849        wxDirDialog dlg( topLevelParent, title, *lastDir,
 
  850                         wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST | wxDD_MULTIPLE );
 
  852        if( dlg.ShowModal() == wxID_CANCEL )
 
  855        dlg.GetPaths( files );
 
  857        if( !files.IsEmpty() )
 
  859            wxFileName first( files.front() );
 
  860            *lastDir = first.GetPath();
 
  869    bool               addDuplicates = 
false;
 
  870    bool               applyToAll    = 
false;
 
  871    wxString           warning       = 
_( 
"Warning: Duplicate Nicknames" );
 
  872    wxString           msg           = 
_( 
"A library nicknamed '%s' already exists." );
 
  873    wxString           detailedMsg   = 
_( 
"One of the nicknames will need to be changed after " 
  874                                          "adding this library." );
 
  876    for( 
const wxString& filePath : files )
 
  878        wxFileName fn( filePath );
 
  888        if( 
cur_model()->ContainsNickname( nickname ) )
 
  894                                                  wxString::Format( msg, nickname ),
 
  895                                                  detailedMsg, 
_( 
"Skip" ), 
_( 
"Add Anyway" ),
 
  896                                                  &applyToAll ) == wxID_CANCEL;
 
  899            doAdd = addDuplicates;
 
  904            int last_row = 
m_cur_grid->GetNumberRows() - 1;
 
  915            if( 
m_pageNdx == 0 && 
path.Contains( wxT( 
"${KIPRJMOD}" ) ) )
 
  916                path = fn.GetFullPath();
 
  922    if( !files.IsEmpty() )
 
  924        int new_row = 
m_cur_grid->GetNumberRows() - 1;
 
 
  957        !
IsOK( 
this, wxString::Format( 
_( 
"This action will reset your global library table on " 
  958                                          "disk and cannot be undone." ) ) ) )
 
  969        face->PreloadLibraries( &
m_parent->Kiway() );
 
  976    std::optional<LIBRARY_TABLE*> newTable =
 
  979    wxASSERT( newTable );
 
  984    m_parent->m_GlobalTableChanged = 
true;
 
 
 1015    std::optional<LIBRARY_TABLE*> optTable =
 
 1017    wxCHECK( optTable, 
false );
 
 1022        m_parent->m_GlobalTableChanged = 
true;
 
 1035            m_parent->m_ProjectTableChanged = 
true;
 
 
 1048    wxRegEx re( 
".*?(\\$\\{(.+?)\\})|(\\$\\((.+?)\\)).*?", wxRE_ADVANCED );
 
 1049    wxASSERT( re.IsValid() );   
 
 1051    std::set< wxString > unique;
 
 1061        for( 
int row = 0; row < tbl->GetNumberRows(); ++row )
 
 1063            wxString uri = tbl->GetValue( row, 
COL_URI );
 
 1065            while( re.Matches( uri ) )
 
 1067                wxString envvar = re.GetMatch( uri, 2 );
 
 1070                if( envvar.IsEmpty() )
 
 1071                    envvar = re.GetMatch( uri, 4 );
 
 1074                unique.insert( envvar );
 
 1077                uri.Replace( re.GetMatch( uri, 0 ), wxEmptyString );
 
 1091    for( 
const wxString& evName : unique )
 
 1096        m_path_subs_grid->SetCellValue( row, 0, wxT( 
"${" ) + evName + wxT( 
"}" ) );
 
 1100        wxGetEnv( evName, &evValue );
 
 
 1130        std::optional<LIBRARY_TABLE*> optTable =
 
 1132        wxCHECK( optTable,  );
 
 1135        globalTable->
Save().map_error(
 
 1138                wxMessageBox( wxString::Format( 
_( 
"Error saving global library table:\n\n%s" ), aError.
message ),
 
 1139                              _( 
"File Save Error" ), wxOK | wxICON_ERROR );
 
 1148    std::optional<LIBRARY_TABLE*> projectTable =
 
 1153        ( *projectTable )->Save().map_error(
 
 1156                wxMessageBox( wxString::Format( 
_( 
"Error saving project-specific library table:\n\n%s" ),
 
 1158                              _( 
"File Save Error" ), wxOK | wxICON_ERROR );
 
 1171        face->PreloadLibraries( aKiway );
 
 1173    std::string payload = 
"";
 
 
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
 
bool m_ProjectTableChanged
 
void InstallPanel(wxPanel *aPanel)
 
bool m_GlobalTableChanged
 
Class DIALOG_HTML_REPORTER.
 
WX_HTML_REPORT_BOX * m_Reporter
 
An options editor in the form of a two column name/value spreadsheet like (table) UI.
 
void paste_text(const wxString &cb_text) override
handle specialized clipboard text, with leading "(fp_lib_table", OR spreadsheet formatted text.
 
DIALOG_EDIT_LIBRARY_TABLES * m_dialog
 
FP_GRID_TRICKS(DIALOG_EDIT_LIBRARY_TABLES *aParent, WX_GRID *aGrid)
 
void optionsEditor(int aRow) override
 
FP_GRID_TRICKS(DIALOG_EDIT_LIBRARY_TABLES *aParent, WX_GRID *aGrid, std::function< void(wxCommandEvent &)> aAddHandler)
 
bool toggleCell(int aRow, int aCol, bool aPreserveSelection) override
 
This class builds a wxGridTableBase by wrapping an FP_LIB_TABLE object.
 
void SetValue(int aRow, int aCol, const wxString &aValue) override
 
FP_LIB_TABLE_GRID(const LIBRARY_TABLE &aTableToEdit)
 
friend class FP_GRID_TRICKS
 
friend class PANEL_FP_LIB_TABLE
 
static const wxString GlobalPathEnvVariableName()
Return the name of the environment variable used to hold the directory of locally installed "KiCad sp...
 
static wxString GetGlobalTableFileName()
 
Editor for wxGrid cells that adds a file/folder browser to the grid input field.
 
Add mouse and command handling (such as cut, copy, and paste) to a WX_GRID instance.
 
virtual void paste_text(const wxString &cb_text)
 
void getSelectedArea()
Puts the selected area into a sensible rectangle of m_sel_{row,col}_{start,count} above.
 
WX_GRID * m_grid
I don't own the grid, but he owns me.
 
virtual bool toggleCell(int aRow, int aCol, bool aPreserveSelection=false)
 
void SetKiway(wxWindow *aDest, KIWAY *aKiway)
It is only used for debugging, since "this" is not a wxWindow*.
 
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
 
virtual void ExpressMail(FRAME_T aDestination, MAIL_T aCommand, std::string &aPayload, wxWindow *aSource=nullptr, bool aFromOtherThread=false)
Send aPayload to aDestination from aSource.
 
virtual KIFACE * KiFACE(FACE_T aFaceId, bool doLoad=true)
Return the KIFACE* given a FACE_T.
 
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
 
static wxString ExpandURI(const wxString &aShortURI, const PROJECT &aProject)
 
std::optional< LIBRARY_TABLE * > Table(LIBRARY_TABLE_TYPE aType, LIBRARY_TABLE_SCOPE aScope)
Retrieves a given table; creating a new empty project table if a valid project is loaded and the give...
 
static bool CreateGlobalTable(LIBRARY_TABLE_TYPE aType, bool aPopulateDefaultLibraries)
 
void LoadGlobalTables(std::initializer_list< LIBRARY_TABLE_TYPE > aTablesToLoad={})
(Re)loads the global library tables in the given list, or all tables if no list is given
 
void ProjectChanged()
Notify all adapters that the project has changed.
 
void SetOptions(const wxString &aOptions)
 
const wxString & Type() const
 
const wxString & URI() const
 
const wxString & Nickname() const
 
const wxString & Options() const
 
LIBRARY_RESULT< void > Save()
 
LIBRARY_TABLE_SCOPE Scope() const
 
const std::vector< LIBRARY_TABLE_ROW > & Rows() const
 
static unsigned FindIllegalLibraryNameChar(const UTF8 &aLibraryName)
Looks for characters that are illegal in library nicknames.
 
static UTF8 FixIllegalChars(const UTF8 &aLibItemName, bool aLib)
Replace illegal LIB_ID item name characters with underscores '_'.
 
LIB_TABLE_GRID_TRICKS(WX_GRID *aGrid)
 
LIB_TABLE_GRID(const LIBRARY_TABLE &aTableToEdit, LIBRARY_MANAGER_ADAPTER *aAdapter=nullptr)
 
void SetValue(int aRow, int aCol, const wxString &aValue) override
 
virtual size_t size() const
 
int GetNumberRows() override
 
virtual LIBRARY_TABLE_ROW & at(size_t aIndex)
 
void Load(const wxString &aFileName)
Load the library table using the path defined by aFileName aFallBackTable.
 
static std::map< std::string, UTF8 > ParseOptions(const std::string &aOptionsList)
Parses aOptionsList and places the result into a #PROPERTIES object which is returned.
 
STD_BITMAP_BUTTON * m_move_up_button
 
WX_GRID * m_path_subs_grid
 
STD_BITMAP_BUTTON * m_append_button
 
STD_BITMAP_BUTTON * m_move_down_button
 
STD_BITMAP_BUTTON * m_delete_button
 
SPLIT_BUTTON * m_browseButton
 
PANEL_FP_LIB_TABLE_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxTAB_TRAVERSAL, const wxString &name=wxEmptyString)
 
Dialog to show and edit symbol library tables.
 
bool verifyTables()
Trim important fields, removes blank row entries, and checks for duplicates.
 
std::map< PCB_IO_MGR::PCB_FILE_T, IO_BASE::IO_FILE_DESC > m_supportedFpFiles
 
void onSizeGrid(wxSizeEvent &event) override
 
void moveUpHandler(wxCommandEvent &event) override
 
void adjustPathSubsGridColumns(int aWidth)
 
FP_LIB_TABLE_GRID * cur_model() const
 
FP_LIB_TABLE_GRID * project_model() const
 
void moveDownHandler(wxCommandEvent &event) override
 
wxArrayString m_pluginChoices
 
void setupGrid(WX_GRID *aGrid)
 
PANEL_FP_LIB_TABLE(DIALOG_EDIT_LIBRARY_TABLES *aParent, PROJECT *aProject)
 
FP_LIB_TABLE_GRID * global_model() const
 
wxString m_lastProjectLibDir
 
void populateEnvironReadOnlyTable()
Populate the readonly environment variable table with names and values by examining all the full_uri ...
 
~PANEL_FP_LIB_TABLE() override
 
void deleteRowHandler(wxCommandEvent &event) override
 
void populatePluginList()
 
void onReset(wxCommandEvent &event) override
 
void onMigrateLibraries(wxCommandEvent &event) override
 
void browseLibrariesHandler(wxCommandEvent &event)
 
bool TransferDataFromWindow() override
 
DIALOG_EDIT_LIBRARY_TABLES * m_parent
 
void OnUpdateUI(wxUpdateUIEvent &event) override
 
void onPageChange(wxBookCtrlEvent &event) override
 
void appendRowHandler(wxCommandEvent &event) override
 
static wxString GetDefaultUserFootprintsPath()
Gets the default path we point users to create projects.
 
wxString m_LastFootprintLibDir
 
static PLUGIN_REGISTRY * Instance()
 
static PCB_IO * PluginFind(PCB_FILE_T aFileType)
Return a #PLUGIN which the caller can use to import, export, save, or load design documents.
 
static bool ConvertLibrary(const std::map< std::string, UTF8 > &aOldFileProps, const wxString &aOldFilePath, const wxString &aNewFilePath, REPORTER *aReporter)
Convert a schematic symbol library to the latest KiCad format.
 
static PCB_FILE_T EnumFromStr(const wxString &aFileType)
Return the PCB_FILE_T from the corresponding plugin type name: "kicad", "legacy", etc.
 
PCB_FILE_T
The set of file types that the PCB_IO_MGR knows about, and for which there has been a plugin written,...
 
@ KICAD_SEXP
S-expression Pcbnew file format.
 
static PCB_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a footprint library's libPath.
 
static const wxString ShowType(PCB_FILE_T aFileType)
Return a brief name for a plugin given aFileType enum.
 
virtual ENV_VAR_MAP & GetLocalEnvVariables() const
 
virtual LIBRARY_MANAGER & GetLibraryManager() const
 
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
 
Container for project specific data.
 
virtual const wxString FootprintLibTblName() const
Returns the path and filename of this project's footprint library table.
 
void Flush()
Build the HTML messages page.
 
bool HasMessage() const override
Returns true if any messages were reported.
 
const wxString ExpandEnvVarSubstitutions(const wxString &aString, const PROJECT *aProject)
Replace any environment variable & text variable references with their values.
 
int OKOrCancelDialog(wxWindow *aParent, const wxString &aWarning, const wxString &aMessage, const wxString &aDetailedMessage, const wxString &aOKLabel, const wxString &aCancelLabel, bool *aApplyToAll)
Display a warning dialog with aMessage and returns the user response.
 
bool IsOK(wxWindow *aParent, const wxString &aMessage)
Display a yes/no dialog with aMessage and returns the user response.
 
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
 
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
 
This file is part of the common library.
 
FP_LIB_TABLE GFootprintTable
The global footprint library table.
 
Declaration of the eda_3d_viewer class.
 
wxString NormalizePath(const wxFileName &aFilePath, const ENV_VAR_MAP *aEnvVars, const wxString &aProjectPath)
Normalize a file path to an environmental variable, if possible.
 
Helper functions to substitute paths with environmental variables.
 
Functions related to environment variables, including help functions.
 
static const std::string KiCadFootprintLibPathExtension
 
std::map< wxString, ENV_VAR_ITEM > ENV_VAR_MAP
 
std::unique_ptr< T > IO_RELEASER
Helper to hold and release an IO_BASE object when exceptions are thrown.
 
This file contains miscellaneous commonly used macros and functions.
 
KICOMMON_API wxString GetVersionedEnvVarName(const wxString &aBaseName)
Construct a versioned environment variable based on this KiCad major version.
 
void InvokePcbLibTableEditor(KIWAY *aKiway, wxWindow *aCaller)
Function InvokePcbLibTableEditor shows the modal DIALOG_FP_LIB_TABLE for purposes of editing the glob...
 
SETTINGS_MANAGER * GetSettingsManager()
 
PGM_BASE & Pgm()
The global program "get" accessor.
 
#define PROJECT_VAR_NAME
A variable name whose value holds the current project directory.
 
T * GetAppSettings(const char *aFilename)
 
std::vector< FAB_LAYER_COLOR > dummy
 
MODEL3D_FORMAT_TYPE fileType(const char *aFileName)
 
Container that describes file type info.
 
bool m_IsFile
Whether the library is a folder or a file.
 
wxString FileFilter() const
 
Implement a participant in the KIWAY alchemy.
 
wxString result
Test unit parsing edge cases and error handling.
 
Definition of file extensions used in Kicad.