39#include <wx/filedlg.h>
47#include <lib_table_lexer.h>
101 virtual wxDirTraverseResult
OnFile(
const wxString& aFileName )
override
103 wxFileName file( aFileName );
107 if( file.GetExt().IsSameAs( ext,
false ) )
111 return wxDIR_CONTINUE;
114 virtual wxDirTraverseResult
OnOpenError(
const wxString& aOpenErrorName )
override
125 virtual wxDirTraverseResult
OnDir(
const wxString& aDirName )
override
128 return wxDIR_CONTINUE;
133 for( std::pair<const wxString, int>& foundDirsPair :
m_foundDirs )
134 aPathArray.Add( foundDirsPair.first );
139 for( std::pair<const wxString, int>& failedDirsPair :
m_failedDirs )
140 aPathArray.Add( failedDirsPair.first );
173 return m_rows.insert( aIterator, aRow );
180 return m_rows.erase( aFirst, aLast );
190 void SetValue(
int aRow,
int aCol,
const wxString &aValue )
override
192 wxCHECK( aRow < (
int)
size(), );
232 wxString result = options;
237 pi->GetLibraryOptions( &choices );
242 if( options != result )
255 size_t ndx = cb_text.find(
"(fp_lib_table" );
257 if( ndx != std::string::npos )
263 LIB_TABLE_LEXER lexer( &slr );
269 tmp_tbl.
Parse( &lexer );
283 for(
unsigned i = 0; i < tmp_tbl.
GetCount(); ++i )
287 m_grid->AutoSizeColumns(
false );
294 m_grid->AutoSizeColumns(
false );
301 FP_LIB_TABLE* aGlobalTable,
const wxString& aGlobalTblPath,
302 FP_LIB_TABLE* aProjectTable,
const wxString& aProjectTblPath,
303 const wxString& aProjectBasePath ) :
305 m_globalTable( aGlobalTable ),
306 m_projectTable( aProjectTable ),
307 m_project( aProject ),
308 m_projectBasePath( aProjectBasePath ),
318 wxArrayString choices;
332 [&](
WX_GRID* aGrid,
int aCol )
334 int prevWidth = aGrid->GetColSize( aCol );
336 aGrid->AutoSizeColumn( aCol,
false );
337 aGrid->SetColSize( aCol, std::max( prevWidth, aGrid->GetColSize( aCol ) ) );
344 aGrid->SetDefaultRowSize( aGrid->GetDefaultRowSize() + 4 );
349 aGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
351 wxGridCellAttr* attr;
353 attr =
new wxGridCellAttr;
366 return wxEmptyString;
368 aGrid->SetColAttr(
COL_URI, attr );
370 attr =
new wxGridCellAttr;
371 attr->SetEditor(
new wxGridCellChoiceEditor( choices ) );
372 aGrid->SetColAttr(
COL_TYPE, attr );
374 attr =
new wxGridCellAttr;
375 attr->SetRenderer(
new wxGridCellBoolRenderer() );
392 if( aGrid->GetNumberRows() > 0 )
393 aGrid->SelectRow( 0 );
441 auto joinExts = [](
const std::vector<std::string>& aExts )
444 for(
const std::string& ext : aExts )
446 if( !joined.empty() )
447 joined << wxS(
", " );
449 joined << wxS(
"*." ) << ext;
459 if( desc.m_IsFile && !desc.m_FileExtensions.empty() )
461 entryStr << wxString::Format( wxS(
" (%s)" ),
462 joinExts( desc.m_FileExtensions ) );
464 else if( !desc.m_IsFile && !desc.m_ExtensionsInDir.empty() )
466 wxString midPart = wxString::Format(
_(
"folder with %s files" ),
467 joinExts( desc.m_ExtensionsInDir ) );
469 entryStr << wxString::Format( wxS(
" (%s)" ), midPart );
472 browseMenu->Append( type, entryStr );
490 browseMenu->Unbind( wxEVT_COMMAND_MENU_SELECTED,
530 for(
int r = 0; r < model->GetNumberRows(); )
532 wxString nick = model->GetValue( r,
COL_NICKNAME ).Trim(
false ).Trim();
533 wxString uri = model->GetValue( r,
COL_URI ).Trim(
false ).Trim();
534 unsigned illegalCh = 0;
539 msg =
_(
"A library table row nickname and path cells are empty." );
541 msg =
_(
"A library table row nickname cell is empty." );
543 msg =
_(
"A library table row path cell is empty." );
545 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
547 wxMessageDialog badCellDlg( topLevelParent, msg,
_(
"Invalid Row Definition" ),
548 wxYES_NO | wxCENTER | wxICON_QUESTION | wxYES_DEFAULT );
549 badCellDlg.SetExtendedMessage(
_(
"Empty cells will result in all rows that are "
550 "invalid to be removed from the table." ) );
551 badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel(
_(
"Remove Invalid Cells" ) ),
552 wxMessageDialog::ButtonLabel(
_(
"Cancel Table Update" ) ) );
554 if( badCellDlg.ShowModal() == wxID_NO )
561 model->DeleteRows( r, 1 );
565 msg = wxString::Format(
_(
"Illegal character '%c' in nickname '%s'." ),
576 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
578 wxMessageDialog errdlg( topLevelParent, msg,
_(
"Library Nickname Error" ) );
586 model->SetValue( r,
COL_URI, uri );
602 for(
int r1 = 0; r1 < model->GetNumberRows() - 1; ++r1 )
606 for(
int r2 = r1 + 1; r2 < model->GetNumberRows(); ++r2 )
612 msg = wxString::Format(
_(
"Multiple libraries cannot share the same "
613 "nickname ('%s')." ),
624 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
626 wxMessageDialog errdlg( topLevelParent, msg,
_(
"Library Nickname Error" ) );
652 int last_row =
m_cur_grid->GetNumberRows() - 1;
676 wxArrayInt selectedRows =
m_cur_grid->GetSelectedRows();
677 wxGridCellCoordsArray cells =
m_cur_grid->GetSelectedCells();
678 wxGridCellCoordsArray blockTopLeft =
m_cur_grid->GetSelectionBlockTopLeft();
679 wxGridCellCoordsArray blockBotRight =
m_cur_grid->GetSelectionBlockBottomRight();
682 for(
unsigned ii = 0; ii < cells.GetCount(); ii++ )
683 selectedRows.Add( cells[ii].GetRow() );
686 if( !blockTopLeft.IsEmpty() && !blockBotRight.IsEmpty() )
688 for(
int i = blockTopLeft[0].GetRow(); i <= blockBotRight[0].GetRow(); ++i )
689 selectedRows.Add( i );
693 if( selectedRows.size() == 0 &&
m_cur_grid->GetGridCursorRow() >= 0 )
694 selectedRows.Add(
m_cur_grid->GetGridCursorRow() );
696 if( selectedRows.size() == 0 )
702 std::sort( selectedRows.begin(), selectedRows.end() );
711 for(
int ii = selectedRows.GetCount()-1; ii >= 0; ii-- )
713 int row = selectedRows[ii];
715 if( row != last_row )
722 if(
m_cur_grid->GetNumberRows() > 0 && curRow >= 0 )
738 boost::ptr_vector< LIB_TABLE_ROW >::auto_type move_me =
742 tbl->
m_rows.insert( tbl->
m_rows.begin() + curRow, move_me.release() );
747 wxGridTableMessage msg( tbl, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, curRow, 0 );
748 tbl->GetView()->ProcessTableMessage( msg );
766 if(
unsigned( curRow + 1 ) < tbl->
m_rows.size() )
768 boost::ptr_vector< LIB_TABLE_ROW >::auto_type move_me =
772 tbl->
m_rows.insert( tbl->
m_rows.begin() + curRow, move_me.release() );
777 wxGridTableMessage msg( tbl, wxGRIDTABLE_NOTIFY_ROWS_INSERTED, curRow - 1, 0 );
778 tbl->GetView()->ProcessTableMessage( msg );
793 wxArrayInt selectedRows =
m_cur_grid->GetSelectedRows();
795 if( selectedRows.empty() &&
m_cur_grid->GetGridCursorRow() >= 0 )
796 selectedRows.push_back(
m_cur_grid->GetGridCursorRow() );
798 wxArrayInt rowsToMigrate;
802 for(
int row : selectedRows )
805 rowsToMigrate.push_back( row );
808 if( rowsToMigrate.size() <= 0 )
810 wxMessageBox( wxString::Format(
_(
"Select one or more rows containing libraries "
811 "to save as current KiCad format." ) ) );
816 if( rowsToMigrate.size() == 1 )
818 msg.Printf(
_(
"Save '%s' as current KiCad format "
819 "and replace entry in table?" ),
824 msg.Printf(
_(
"Save %d libraries as current KiCad format "
825 "and replace entries in table?" ),
826 (
int) rowsToMigrate.size() );
833 for(
int row : rowsToMigrate )
838 wxFileName legacyLib( resolvedPath );
840 if( !legacyLib.Exists() )
842 msg.Printf(
_(
"Library '%s' not found." ), relPath );
847 wxFileName newLib( resolvedPath );
849 newLib.SetName(
"" );
852 if( newLib.DirExists() )
854 msg.Printf(
_(
"Folder '%s' already exists. Do you want overwrite any existing footprints?" ),
855 newLib.GetFullPath() );
857 switch( wxMessageBox( msg,
_(
"Migrate Library" ),
858 wxYES_NO | wxCANCEL | wxICON_QUESTION,
m_parent ) )
862 case wxCANCEL:
return;
871 relPath =
NormalizePath( newLib.GetFullPath(), &
Pgm().GetLocalEnvVariables(),
877 relPath = newLib.GetFullPath();
884 msg.Printf(
_(
"Failed to save footprint library file '%s'." ), newLib.GetFullPath() );
900 if( event.GetEventType() == wxEVT_BUTTON )
912 wxLogWarning( wxT(
"File type selection event received but could not find the file type "
928 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
932 wxFileDialog dlg( topLevelParent, title, openDir, wxEmptyString, fileDesc.
FileFilter(),
933 wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
935 int result = dlg.ShowModal();
937 if( result == wxID_CANCEL )
940 dlg.GetPaths( files );
949 wxDirDialog dlg( topLevelParent, title, openDir,
950 wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST | wxDD_MULTIPLE );
952 int result = dlg.ShowModal();
954 if( result == wxID_CANCEL )
957 dlg.GetPaths( files );
959 if( !files.IsEmpty() )
961 wxFileName first( files.front() );
975 bool addDuplicates =
false;
976 bool applyToAll =
false;
977 wxString warning =
_(
"Warning: Duplicate Nicknames" );
978 wxString msg =
_(
"A library nicknamed '%s' already exists." );
979 wxString detailedMsg =
_(
"One of the nicknames will need to be changed after "
980 "adding this library." );
982 for(
const wxString& filePath : files )
984 wxFileName fn( filePath );
992 if(
cur_model()->ContainsNickname( nickname ) )
998 wxString::Format( msg, nickname ),
999 detailedMsg,
_(
"Skip" ),
_(
"Add Anyway" ),
1000 &applyToAll ) == wxID_CANCEL;
1003 doAdd = addDuplicates;
1008 int last_row =
m_cur_grid->GetNumberRows() - 1;
1019 if(
m_pageNdx == 0 &&
path.Contains( wxT(
"${KIPRJMOD}" ) ) )
1020 path = fn.GetFullPath();
1026 if( !files.IsEmpty() )
1028 int new_row =
m_cur_grid->GetNumberRows() - 1;
1088 wxRegEx re(
".*?(\\$\\{(.+?)\\})|(\\$\\((.+?)\\)).*?", wxRE_ADVANCED );
1089 wxASSERT( re.IsValid() );
1091 std::set< wxString > unique;
1101 for(
int row = 0; row < tbl->GetNumberRows(); ++row )
1103 wxString uri = tbl->GetValue( row,
COL_URI );
1105 while( re.Matches( uri ) )
1107 wxString envvar = re.GetMatch( uri, 2 );
1110 if( envvar.IsEmpty() )
1111 envvar = re.GetMatch( uri, 4 );
1114 unique.insert( envvar );
1117 uri.Replace( re.GetMatch( uri, 0 ), wxEmptyString );
1131 for(
const wxString& evName : unique )
1136 m_path_subs_grid->SetCellValue( row, 0, wxT(
"${" ) + evName + wxT(
"}" ) );
1140 wxGetEnv( evName, &evValue );
1171 projectTable =
nullptr;
1174 projectTable, projectTablePath,
1177 if( dlg.ShowModal() == wxID_CANCEL )
1184 globalTable->
Save( globalTablePath );
1188 msg.Printf(
_(
"Error saving global library table:\n\n%s" ), ioe.
What() );
1189 wxMessageBox( msg,
_(
"File Save Error" ), wxOK | wxICON_ERROR );
1197 projectTable->
Save( projectTablePath );
1201 msg.Printf(
_(
"Error saving project-specific library table:\n\n%s" ), ioe.
What() );
1202 wxMessageBox( msg,
_(
"File Save Error" ), wxOK | wxICON_ERROR );
1206 std::string payload =
"";
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap)
bool m_ProjectTableChanged
void InstallPanel(wxPanel *aPanel)
bool m_GlobalTableChanged
DIALOG_PLUGIN_OPTIONS is an options editor in the form of a two column name/value spreadsheet like (t...
void SetInitialFocus(wxWindow *aWindow)
Sets the window (usually a wxTextCtrl) that should be focused when the dialog is shown.
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
This class builds a wxGridTableBase by wrapping an FP_LIB_TABLE object.
size_t size() const override
FP_LIB_TABLE_GRID(const FP_LIB_TABLE &aTableToEdit)
void SetValue(int aRow, int aCol, const wxString &aValue) override
LIB_TABLE_ROWS_ITER begin() override
LIB_TABLE_ROWS_ITER erase(LIB_TABLE_ROWS_ITER aFirst, LIB_TABLE_ROWS_ITER aLast) override
LIB_TABLE_ROW * makeNewRow() override
LIB_TABLE_ROW * at(size_t aIndex) override
void push_back(LIB_TABLE_ROW *aRow) override
LIB_TABLE_ROWS_ITER insert(LIB_TABLE_ROWS_ITER aIterator, LIB_TABLE_ROW *aRow) override
Hold a record identifying a library accessed by the appropriate footprint library #PLUGIN object in t...
static const wxString GlobalPathEnvVariableName()
Return the name of the environment variable used to hold the directory of locally installed "KiCad sp...
virtual void Parse(LIB_TABLE_LEXER *aLexer) override
Parse the #LIB_TABLE_LEXER s-expression library table format into the appropriate LIB_TABLE_ROW objec...
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)
WX_GRID * m_grid
I don't own the grid, but he owns me.
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()
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)
Send aPayload to aDestination from aSource.
virtual PROJECT & Prj() const
Return the PROJECT associated with this KIWAY.
Traverser implementation that looks to find any and all "folder" libraries by looking for files with ...
void GetPaths(wxArrayString &aPathArray)
virtual wxDirTraverseResult OnOpenError(const wxString &aOpenErrorName) override
std::unordered_map< wxString, int > m_failedDirs
std::vector< std::string > m_searchExtensions
void GetFailedPaths(wxArrayString &aPathArray)
bool HasDirectoryOpenFailures()
LIBRARY_TRAVERSER(std::vector< std::string > aSearchExtensions, wxString aInitialDir)
std::unordered_map< wxString, int > m_foundDirs
virtual wxDirTraverseResult OnDir(const wxString &aDirName) override
virtual wxDirTraverseResult OnFile(const wxString &aFileName) override
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 '_'.
This abstract base class mixes any object derived from LIB_TABLE into wxGridTableBase so the result c...
void SetValue(int aRow, int aCol, const wxString &aValue) override
bool AppendRows(size_t aNumRows=1) override
int GetNumberRows() override
Hold a record identifying a library accessed by the appropriate plug in object in the LIB_TABLE.
const wxString & GetOptions() const
Return the options string, which may hold a password or anything else needed to instantiate the under...
virtual const wxString GetType() const =0
Return the type of library represented by this row.
const wxString & GetNickName() const
const wxString GetFullURI(bool aSubstituted=false) const
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
LIB_TABLE_ROW * clone() const
void SetOptions(const wxString &aOptions)
Change the library options strings.
LIB_TABLE_ROW & At(unsigned aIndex)
Get the 'n'th LIB_TABLE_ROW object.
void TransferRows(LIB_TABLE_ROWS &aRowsList)
Takes ownership of another list of rows; the original list will be freed.
LIB_TABLE_ROWS m_rows
Owning set of rows.
void Clear()
Delete all rows.
unsigned GetCount() const
Get the number of rows contained in the table.
void Save(const wxString &aFileName) const
Write this library table to aFileName in s-expression form.
static STRING_UTF8_MAP * ParseOptions(const std::string &aOptionsList)
Parses aOptionsList and places the result into a #PROPERTIES object which is returned.
Class PANEL_FP_LIB_TABLE_BASE.
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
Dialog to show and edit symbol library tables.
FP_LIB_TABLE * m_globalTable
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
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
FP_LIB_TABLE * m_projectTable
void deleteRowHandler(wxCommandEvent &event) override
void populatePluginList()
void onMigrateLibraries(wxCommandEvent &event) override
void browseLibrariesHandler(wxCommandEvent &event)
bool TransferDataFromWindow() override
PANEL_FP_LIB_TABLE(DIALOG_EDIT_LIBRARY_TABLES *aParent, PROJECT *aProject, FP_LIB_TABLE *aGlobalTable, const wxString &aGlobalTblPath, FP_LIB_TABLE *aProjectTable, const wxString &aProjectTblPath, const wxString &aProjectBasePath)
wxString m_projectBasePath
DIALOG_EDIT_LIBRARY_TABLES * m_parent
void OnUpdateUI(wxUpdateUIEvent &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(STRING_UTF8_MAP *aOldFileProps, const wxString &aOldFilePath, const wxString &aNewFilePath)
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 SETTINGS_MANAGER & GetSettingsManager() const
static FP_LIB_TABLE * PcbFootprintLibs(PROJECT *aProject)
Return the table of footprint libraries without Kiway.
Container for project specific data.
virtual const wxString GetProjectPath() const
Return the full path of the project.
virtual const wxString FootprintLibTblName() const
Returns the path and filename of this project's footprint library table.
virtual bool IsNullProject() const
Check if this project is a null project (i.e.
T * GetAppSettings()
Returns a handle to the a given settings by type If the settings have already been loaded,...
Is a LINE_READER that reads from a multiline 8 bit wide std::string.
A name/value tuple with unique names and optional values.
void SetTable(wxGridTableBase *table, bool aTakeOwnership=false)
Hide wxGrid's SetTable() method with one which doesn't mess up the grid column widths when setting th...
void ClearRows()
wxWidgets recently added an ASSERT which fires if the position is greater than or equal to the number...
bool CommitPendingChanges(bool aQuietMode=false)
Close any open cell edit controls.
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 DisplayError(wxWindow *aParent, const wxString &aText, int aDisplayTime)
Display an error or warning message box with aMessage.
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message 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.
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.
LIB_TABLE_ROWS::iterator LIB_TABLE_ROWS_ITER
This file contains miscellaneous commonly used macros and functions.
KICOMMON_API wxString GetVersionedEnvVarName(const wxString &aBaseName)
Constructs 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...
PGM_BASE & Pgm()
The global Program "get" accessor.
#define PROJECT_VAR_NAME
A variable name whose value holds the current project directory.
MODEL3D_FORMAT_TYPE fileType(const char *aFileName)
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Container that describes file type info.
bool m_IsFile
Whether the library is a folder or a file.
wxString FileFilter() const
A filename or source description, a problem input line, a line number, a byte offset,...
Container that describes file type info for the add a library options.
bool m_IsFile
Whether the library is a folder or a file.
PCB_IO_MGR::PCB_FILE_T m_Plugin
wxString m_Description
Description shown in the file picker dialog.
wxString m_FileFilter
Filter used for file pickers if m_IsFile is true.
wxString m_FolderSearchExtension
In case of folders it stands for extensions of files stored inside.
Definition of file extensions used in Kicad.