33#include <lib_table_lexer.h>
54#include <wx/filedlg.h>
109 return m_rows.insert( aIterator, aRow );
116 return m_rows.erase( aFirst, aLast );
120 void SetValue(
int aRow,
int aCol,
const wxString &aValue )
override
122 wxCHECK( aRow < (
int)
size(), );
134 if( pluginType == SCH_IO_MGR::SCH_FILE_UNKNOWN )
135 pluginType = SCH_IO_MGR::SCH_KICAD;
158 std::function<
void( wxCommandEvent& )> aAddHandler ) :
175 wxString
result = options;
176 std::map<std::string, UTF8> choices;
180 pi->GetLibraryOptions( &choices );
199 size_t ndx = cb_text.find(
"(sym_lib_table" );
201 if( ndx != std::string::npos )
207 LIB_TABLE_LEXER lexer( &slr );
213 tmp_tbl.
Parse( &lexer );
227 for(
unsigned i = 0; i < tmp_tbl.
GetCount(); ++i )
231 m_grid->AutoSizeColumns(
false );
235 wxString
text = cb_text;
237 if( !
text.Contains(
'\t' ) &&
text.Contains(
',' ) )
238 text.Replace(
',',
'\t' );
240 if(
text.Contains(
'\t' ) )
242 int row =
m_grid->GetGridCursorRow();
245 m_grid->SetGridCursor( row, 0 );
251 m_grid->AutoSizeColumns(
false );
265 [&](
WX_GRID* aCurrGrid,
int aCol )
267 int prevWidth = aCurrGrid->GetColSize( aCol );
269 aCurrGrid->AutoSizeColumn( aCol,
false );
270 aCurrGrid->SetColSize( aCol, std::max( prevWidth, aCurrGrid->GetColSize( aCol ) ) );
277 aGrid->SetSelectionMode( wxGrid::wxGridSelectRows );
280 wxGridCellAttr* attr =
new wxGridCellAttr;
282 wxString fileFiltersStr;
283 wxString allWildcardsStr;
291 auto* libTable = static_cast<SYMBOL_LIB_TABLE_GRID*>( grid->GetTable() );
292 auto* tableRow = static_cast<SYMBOL_LIB_TABLE_ROW*>( libTable->at( row ) );
294 IO_RELEASER<SCH_IO> pi( SCH_IO_MGR::FindPlugin( tableRow->GetFileType() ) );
298 const IO_BASE::IO_FILE_DESC& desc = pi->GetLibraryDesc();
301 return desc.FileFilter();
304 return wxEmptyString;
308 aGrid->SetColAttr(
COL_URI, attr );
310 attr =
new wxGridCellAttr;
311 attr->SetEditor(
new wxGridCellChoiceEditor( m_pluginChoices ) );
312 aGrid->SetColAttr(
COL_TYPE, attr );
314 attr =
new wxGridCellAttr;
315 attr->SetRenderer(
new wxGridCellBoolRenderer() );
319 attr =
new wxGridCellAttr;
320 attr->SetRenderer(
new wxGridCellBoolRenderer() );
333 if( aGrid->GetNumberRows() > 0 )
334 aGrid->SelectRow( 0 );
340 const wxString& aGlobalTablePath,
342 const wxString& aProjectTablePath ) :
353 for(
const SCH_IO_MGR::SCH_FILE_T& type : SCH_IO_MGR::SCH_FILE_T_vector )
366 if( cfg->m_lastSymbolLibDir.IsEmpty() )
428 wxFileName fn( aLibraryPath );
429 wxString ext = fn.GetExt().Lower();
444 std::unique_ptr<wxBusyCursor> wait;
445 wait.reset(
new wxBusyCursor );
452 for(
int r = 0; r < model->GetNumberRows(); ++r )
454 wxString nick = model->GetValue( r,
COL_NICKNAME ).Trim(
false ).Trim();
455 wxString uri = model->GetValue( r,
COL_URI ).Trim(
false ).Trim();
456 unsigned illegalCh = 0;
462 msg =
_(
"Nickname and path cannot be empty." );
467 msg =
_(
"Nickname cannot be empty." );
472 msg =
_(
"Path cannot be empty." );
483 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
485 wxMessageDialog errdlg( topLevelParent, msg,
_(
"Library Table Error" ) );
493 msg = wxString::Format(
_(
"Illegal character '%c' in nickname '%s'" ),
504 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
506 wxMessageDialog errdlg( topLevelParent, msg,
_(
"Library Nickname Error" ) );
519 model->SetValue( r,
COL_URI, uri );
523 wxString ltype = model->GetValue( r,
COL_TYPE );
524 model->LIB_TABLE_GRID::SetValue( r,
COL_URI, uri );
525 model->SetValue( r,
COL_TYPE, ltype );
537 for(
int r1 = 0; r1 < model->GetNumberRows() - 1; ++r1 )
541 for(
int r2 = r1 + 1; r2 < model->GetNumberRows(); ++r2 )
547 msg = wxString::Format(
_(
"Multiple libraries cannot share the same nickname ('%s')." ),
558 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
561 wxMessageDialog errdlg( topLevelParent, msg,
_(
"Library Nickname Error" ) );
575 for(
unsigned int r = 0; r <
table->GetCount(); ++r )
590 m_parent->m_GlobalTableChanged =
true;
592 m_parent->m_ProjectTableChanged =
true;
597 msg.Printf(
_(
"Symbol library '%s' failed to load." ), row.
GetNickName() );
599 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
601 wxMessageDialog errdlg( topLevelParent, msg + wxS(
"\n" ) + ioe.
What(),
_(
"Error Loading Library" ) );
620 wxString fileFiltersStr;
621 wxString allWildcardsStr;
623 for(
const SCH_IO_MGR::SCH_FILE_T&
fileType : SCH_IO_MGR::SCH_FILE_T_vector )
635 if( !fileFiltersStr.IsEmpty() )
636 fileFiltersStr += wxChar(
'|' );
644 fileFiltersStr =
_(
"All supported formats" ) + wxT(
"|" ) + allWildcardsStr + wxT(
"|" )
656 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
658 wxFileDialog dlg( topLevelParent,
_(
"Add Library" ), *lastDir, wxEmptyString, fileFiltersStr,
659 wxFD_OPEN | wxFD_FILE_MUST_EXIST | wxFD_MULTIPLE );
661 if( dlg.ShowModal() == wxID_CANCEL )
664 *lastDir = dlg.GetDirectory();
667 bool addDuplicates =
false;
668 bool applyToAll =
false;
670 wxArrayString filePathsList;
671 dlg.GetPaths( filePathsList );
673 for(
const wxString& filePath : filePathsList )
675 wxFileName fn( filePath );
679 if(
cur_model()->ContainsNickname( nickname ) )
684 addDuplicates =
OKOrCancelDialog( wxGetTopLevelParent(
this ),
_(
"Warning: Duplicate Nickname" ),
685 wxString::Format(
_(
"A library nicknamed '%s' already exists." ),
687 _(
"One of the nicknames will need to be changed after adding "
689 _(
"Skip" ),
_(
"Add Anyway" ),
690 &applyToAll ) == wxID_CANCEL;
693 doAdd = addDuplicates;
698 int last_row =
m_cur_grid->GetNumberRows() - 1;
705 if( pluginType == SCH_IO_MGR::SCH_FILE_UNKNOWN )
706 pluginType = SCH_IO_MGR::SCH_KICAD;
716 path = fn.GetFullPath();
722 if( !filePathsList.IsEmpty() )
733 [&]() -> std::pair<int, int>
756 wxArrayInt selectedRows =
m_cur_grid->GetSelectedRows();
757 wxGridCellCoordsArray cells =
m_cur_grid->GetSelectedCells();
758 wxGridCellCoordsArray blockTopLeft =
m_cur_grid->GetSelectionBlockTopLeft();
759 wxGridCellCoordsArray blockBotRight =
m_cur_grid->GetSelectionBlockBottomRight();
762 for(
unsigned ii = 0; ii < cells.GetCount(); ii++ )
763 selectedRows.Add( cells[ii].GetRow() );
766 if( !blockTopLeft.IsEmpty() && !blockBotRight.IsEmpty() )
768 for(
int i = blockTopLeft[0].GetRow(); i <= blockBotRight[0].GetRow(); ++i )
769 selectedRows.Add( i );
773 if( selectedRows.size() == 0 &&
m_cur_grid->GetGridCursorRow() >= 0 )
774 selectedRows.Add(
m_cur_grid->GetGridCursorRow() );
776 if( selectedRows.size() == 0 )
782 std::sort( selectedRows.begin(), selectedRows.end() );
791 for(
int ii = selectedRows.GetCount()-1; ii >= 0; ii-- )
793 int row = selectedRows[ii];
795 if( row != last_row )
802 if(
m_cur_grid->GetNumberRows() > 0 && curRow >= 0 )
815 wxGridTableMessage msg(
cur_model(), wxGRIDTABLE_NOTIFY_ROWS_INSERTED, row - 1, 0 );
816 cur_model()->GetView()->ProcessTableMessage( msg );
829 wxGridTableMessage msg(
cur_model(), wxGRIDTABLE_NOTIFY_ROWS_INSERTED, row, 0 );
830 cur_model()->GetView()->ProcessTableMessage( msg );
842 !
IsOK(
this, wxString::Format(
_(
"This action will reset your global library table on "
843 "disk and cannot be undone." ) ) ) )
861 m_parent->m_GlobalTableChanged =
true;
890 wxArrayInt selectedRows =
m_cur_grid->GetSelectedRows();
892 if( selectedRows.empty() &&
m_cur_grid->GetGridCursorRow() >= 0 )
893 selectedRows.push_back(
m_cur_grid->GetGridCursorRow() );
895 wxArrayInt legacyRows;
900 for(
int row : selectedRows )
905 legacyRows.push_back( row );
909 if( legacyRows.size() <= 0 )
911 wxMessageBox(
_(
"Select one or more rows containing libraries "
912 "to save as current KiCad format (*.kicad_sym)." ) );
917 if( legacyRows.size() == 1 )
919 msg.Printf(
_(
"Save '%s' as current KiCad format (*.kicad_sym) "
920 "and replace legacy entry in table?" ),
925 msg.Printf(
_(
"Save %d libraries as current KiCad format (*.kicad_sym) "
926 "and replace legacy entries in table?" ),
927 (
int) legacyRows.size() );
934 for(
int row : legacyRows )
939 wxFileName legacyLib( resolvedPath );
941 if( !legacyLib.Exists() )
943 msg.Printf(
_(
"Library '%s' not found." ), relPath );
945 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
951 wxFileName newLib( resolvedPath );
952 newLib.SetExt(
"kicad_sym" );
954 if( newLib.Exists() )
956 msg.Printf(
_(
"File '%s' already exists. Do you want overwrite this file?" ),
957 newLib.GetFullPath() );
959 switch( wxMessageBox( msg,
_(
"Migrate Library" ),
960 wxYES_NO | wxCANCEL | wxICON_QUESTION,
m_parent ) )
964 case wxCANCEL:
return;
969 std::unique_ptr<std::map<std::string, UTF8>> props(
979 relPath = newLib.GetFullPath();
987 msg.Printf(
_(
"Failed to save symbol library file '%s'." ), newLib.GetFullPath() );
989 wxWindow* topLevelParent = wxGetTopLevelParent(
this );
1007 m_parent->m_GlobalTableChanged =
true;
1013 m_parent->m_ProjectTableChanged =
true;
1023 wxRegEx re(
".*?(\\$\\{(.+?)\\})|(\\$\\((.+?)\\)).*?", wxRE_ADVANCED );
1024 wxASSERT( re.IsValid() );
1026 std::set< wxString > unique;
1036 for(
int row = 0; row < tbl->GetNumberRows(); ++row )
1038 wxString uri = tbl->GetValue( row,
COL_URI );
1040 while( re.Matches( uri ) )
1042 wxString envvar = re.GetMatch( uri, 2 );
1045 if( envvar.IsEmpty() )
1046 envvar = re.GetMatch( uri, 4 );
1049 unique.insert( envvar );
1052 uri.Replace( re.GetMatch( uri, 0 ), wxEmptyString );
1063 for(
const wxString& evName : unique )
1068 m_path_subs_grid->SetCellValue( row, 0, wxT(
"${" ) + evName + wxT(
"}" ) );
1072 wxGetEnv( evName, &evValue );
1131 wxString currentLib;
1139 currentLib = symbolEditor->GetCurLib();
1142 symbolEditor->FreezeLibraryTree();
1144 if( symbolEditor->HasLibModifications() )
1146 msg =
_(
"Modifications have been made to one or more symbol libraries.\n"
1147 "Changes must be saved or discarded before the symbol library table can be modified." );
1151 case wxID_YES: symbolEditor->SaveAll();
break;
1152 case wxID_NO: symbolEditor->RevertAll();
break;
1154 case wxID_CANCEL: symbolEditor->ThawLibraryTree();
return;
1163 projectTable, projectTableFn.GetFullPath() ) );
1168 symbolEditor->ThawLibraryTree();
1177 globalTable->
Save( globalTablePath );
1181 msg.Printf(
_(
"Error saving global library table:\n\n%s" ), ioe.
What() );
1182 wxMessageBox( msg,
_(
"File Save Error" ), wxOK | wxICON_ERROR );
1190 projectTable->
Save( projectTableFn.GetFullPath() );
1194 msg.Printf(
_(
"Error saving project-specific library table:\n\n%s" ), ioe.
What() );
1195 wxMessageBox( msg,
_(
"File Save Error" ), wxOK | wxICON_ERROR );
1200 symbolEditor->ThawLibraryTree();
1202 std::string payload =
"";
wxBitmapBundle KiBitmapBundle(BITMAPS aBitmap, int aMinHeight)
bool m_ProjectTableChanged
void InstallPanel(wxPanel *aPanel)
bool m_GlobalTableChanged
An options editor in the form of a two column name/value spreadsheet like (table) UI.
wxString m_lastSymbolLibDir
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.
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 KIWAY_PLAYER * Player(FRAME_T aFrameType, bool doCreate=true, wxTopLevelWindow *aParent=nullptr)
Return the KIWAY_PLAYER* given a FRAME_T.
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.
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)
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.
void SetParent(LIB_TABLE *aParent)
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
bool GetIsEnabled() const
void SetOptions(const wxString &aOptions)
Change the library options strings.
bool ReplaceRow(size_t aIndex, LIB_TABLE_ROW *aRow)
Replaces the Nth row with the given new row.
static std::map< std::string, UTF8 > * ParseOptions(const std::string &aOptionsList)
Parses aOptionsList and places the result into a #PROPERTIES object which is returned.
LIB_TABLE_ROW & At(unsigned aIndex)
Get the 'n'th LIB_TABLE_ROW object.
LIB_TABLE_ROWS m_rows
Owning set of rows.
unsigned GetCount() const
Get the number of rows contained in the table.
bool ChangeRowOrder(size_t aIndex, int aOffset)
Moves a row within the table.
void Save(const wxString &aFileName) const
Write this library table to aFileName in s-expression form.
PANEL_SYM_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)
STD_BITMAP_BUTTON * m_browse_button
STD_BITMAP_BUTTON * m_move_up_button
STD_BITMAP_BUTTON * m_delete_button
STD_BITMAP_BUTTON * m_move_down_button
STD_BITMAP_BUTTON * m_append_button
WX_GRID * m_path_subs_grid
Dialog to show and edit symbol library tables.
void OnUpdateUI(wxUpdateUIEvent &event) override
void moveUpHandler(wxCommandEvent &event) override
void onPageChange(wxBookCtrlEvent &event) override
virtual ~PANEL_SYM_LIB_TABLE()
bool allowAutomaticPluginTypeSelection(wxString &aLibraryPath)
SYMBOL_LIB_TABLE * m_projectTable
static size_t m_pageNdx
Remember the last notebook page selected.
void setupGrid(WX_GRID *aGrid)
void onReset(wxCommandEvent &event) override
void deleteRowHandler(wxCommandEvent &event) override
wxString m_lastProjectLibDir
Transient (unsaved) last browsed folder when adding a project level library.
void browseLibrariesHandler(wxCommandEvent &event) override
SYMBOL_LIB_TABLE_GRID * cur_model() const
PANEL_SYM_LIB_TABLE(DIALOG_EDIT_LIBRARY_TABLES *aParent, PROJECT *m_project, SYMBOL_LIB_TABLE *aGlobal, const wxString &aGlobalTablePath, SYMBOL_LIB_TABLE *aProject, const wxString &aProjectTablePath)
bool verifyTables()
Trim important fields, removes blank row entries, and checks for duplicates.
void adjustPathSubsGridColumns(int aWidth)
SYMBOL_LIB_TABLE_GRID * global_model() const
SYMBOL_LIB_TABLE * m_globalTable
void onSizeGrid(wxSizeEvent &event) override
void onConvertLegacyLibraries(wxCommandEvent &event) override
SYMBOL_LIB_TABLE_GRID * project_model() const
wxArrayString m_pluginChoices
void moveDownHandler(wxCommandEvent &event) override
void populateEnvironReadOnlyTable()
Populate the readonly environment variable table with names and values by examining all the full_uri ...
WX_GRID * m_cur_grid
changed based on tab choice
DIALOG_EDIT_LIBRARY_TABLES * m_parent
bool TransferDataFromWindow() override
void appendRowHandler(wxCommandEvent &event) override
static wxString GetDefaultUserSymbolsPath()
Gets the default path we point users to create projects.
virtual ENV_VAR_MAP & GetLocalEnvVariables() const
static SYMBOL_LIB_TABLE * SchSymbolLibTable(PROJECT *aProject)
Accessor for project symbol library table.
Container for project specific data.
virtual const wxString GetProjectPath() const
Return the full path of the project.
virtual bool IsNullProject() const
Check if this project is a null project (i.e.
static bool ConvertLibrary(std::map< std::string, UTF8 > *aOldFileProps, const wxString &aOldFilePath, const wxString &aNewFilepath)
Convert a schematic symbol library to the latest KiCad format.
static SCH_FILE_T EnumFromStr(const wxString &aFileType)
Return the #SCH_FILE_T from the corresponding plugin type name: "kicad", "legacy",...
static const wxString ShowType(SCH_FILE_T aFileType)
Return a brief name for a plugin, given aFileType enum.
static SCH_FILE_T GuessPluginTypeFromLibPath(const wxString &aLibPath, int aCtl=0)
Return a plugin type given a symbol library using the file extension of aLibPath.
Is a LINE_READER that reads from a multiline 8 bit wide std::string.
The symbol library editor main window.
bool supportsVisibilityColumn() override
DIALOG_EDIT_LIBRARY_TABLES * m_dialog
virtual void optionsEditor(int aRow) override
SYMBOL_GRID_TRICKS(DIALOG_EDIT_LIBRARY_TABLES *aParent, WX_GRID *aGrid)
virtual void paste_text(const wxString &cb_text) override
handle specialized clipboard text, with leading "(sym_lib_table" or spreadsheet formatted text.
SYMBOL_GRID_TRICKS(DIALOG_EDIT_LIBRARY_TABLES *aParent, WX_GRID *aGrid, std::function< void(wxCommandEvent &)> aAddHandler)
Build a wxGridTableBase by wrapping an SYMBOL_LIB_TABLE object.
friend class SYMBOL_GRID_TRICKS
void SetValue(int aRow, int aCol, const wxString &aValue) override
LIB_TABLE_ROW * at(size_t aIndex) override
LIB_TABLE_ROWS_ITER erase(LIB_TABLE_ROWS_ITER aFirst, LIB_TABLE_ROWS_ITER aLast) override
LIB_TABLE_ROWS_ITER begin() override
LIB_TABLE_ROWS_ITER insert(LIB_TABLE_ROWS_ITER aIterator, LIB_TABLE_ROW *aRow) override
LIB_TABLE_ROW * makeNewRow() override
void push_back(LIB_TABLE_ROW *aRow) override
size_t size() const override
SYMBOL_LIB_TABLE_GRID(const SYMBOL_LIB_TABLE &aTableToEdit)
friend class PANEL_SYM_LIB_TABLE
Hold a record identifying a symbol library accessed by the appropriate symbol library SCH_IO object i...
bool Refresh() override
Attempt to reload the library.
static SYMBOL_LIB_TABLE & GetGlobalLibTable()
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 const wxString GetSymbolLibTableFileName()
SYMBOL_LIB_TABLE(SYMBOL_LIB_TABLE *aFallBackTable=nullptr)
Build a symbol library table by pre-pending this table fragment in front of aFallBackTable.
static wxString GetGlobalTableFileName()
Fetch the global symbol library table file name.
static const wxString GlobalPathEnvVariableName()
Return the name of the environment variable used to hold the directory of locally installed "KiCad sp...
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.
int UnsavedChangesDialog(wxWindow *parent, const wxString &aMessage, bool *aApplyToAll)
A specialized version of HandleUnsavedChanges which handles an apply-to-all checkbox.
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
@ ID_END_EESCHEMA_ID_LIST
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.
@ FRAME_SCH_SYMBOL_EDITOR
static const std::string LegacySymbolLibFileExtension
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
void InvokeSchEditSymbolLibTable(KIWAY *aKiway, wxWindow *aParent)
@ ID_PANEL_SYM_LIB_LEGACY
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)
#define TO_UTF8(wxstring)
Convert a wxString to a UTF8 encoded C string for all wxWidgets build modes.
Container that describes file type info.
std::vector< std::string > m_FileExtensions
Filter used for file pickers if m_IsFile is true.
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.
wxString m_Description
Description shown in the file picker dialog.
wxString m_FileFilter
Filter used for file pickers if m_IsFile is true.
SCH_IO_MGR::SCH_FILE_T m_Plugin
wxString m_FolderSearchExtension
In case of folders it stands for extensions of files stored inside.
wxString result
Test unit parsing edge cases and error handling.
wxString formatWildcardExt(const wxString &aWildcard)
Format wildcard extension to support case sensitive file dialogs.
Definition of file extensions used in Kicad.