2012-02-16 20:03:33 +00:00
|
|
|
/*
|
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
|
|
|
*
|
2019-01-01 14:38:57 +00:00
|
|
|
* Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
2017-11-12 00:31:38 +00:00
|
|
|
* Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
|
2023-04-22 20:17:08 +00:00
|
|
|
* Copyright (C) 1992-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
2012-02-16 20:03:33 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, you may find one here:
|
|
|
|
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
|
|
|
|
* or you may search the http://www.gnu.org website for the version 2 license,
|
|
|
|
* or you may write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file wildcards_and_files_ext.cpp
|
2019-01-01 14:38:57 +00:00
|
|
|
* Definition of file extensions used in Kicad.
|
2012-02-16 20:03:33 +00:00
|
|
|
*/
|
2019-09-26 20:09:09 +00:00
|
|
|
#include <regex>
|
2012-02-16 20:03:33 +00:00
|
|
|
#include <wildcards_and_files_ext.h>
|
2021-06-07 22:38:35 +00:00
|
|
|
#include <wx/filedlg.h>
|
2019-11-11 20:34:42 +00:00
|
|
|
#include <wx/regex.h>
|
2021-06-07 22:38:35 +00:00
|
|
|
#include <wx/translation.h>
|
2022-09-14 22:28:09 +00:00
|
|
|
#include <regex>
|
2019-06-15 03:27:36 +00:00
|
|
|
|
2019-09-26 20:09:09 +00:00
|
|
|
bool compareFileExtensions( const std::string& aExtension,
|
2022-10-16 16:45:10 +00:00
|
|
|
const std::vector<std::string>& aReference, bool aCaseSensitive )
|
2019-09-26 20:09:09 +00:00
|
|
|
{
|
|
|
|
// Form the regular expression string by placing all possible extensions into it as alternatives
|
|
|
|
std::string regexString = "(";
|
|
|
|
bool first = true;
|
2022-10-16 16:45:10 +00:00
|
|
|
|
|
|
|
for( const std::string& ext : aReference )
|
2019-09-26 20:09:09 +00:00
|
|
|
{
|
|
|
|
// The | separate goes between the extensions
|
|
|
|
if( !first )
|
|
|
|
regexString += "|";
|
|
|
|
else
|
|
|
|
first = false;
|
|
|
|
|
|
|
|
regexString += ext;
|
|
|
|
}
|
2022-10-16 16:45:10 +00:00
|
|
|
|
2019-09-26 20:09:09 +00:00
|
|
|
regexString += ")";
|
|
|
|
|
|
|
|
// Create the regex and see if it matches
|
|
|
|
std::regex extRegex( regexString, aCaseSensitive ? std::regex::ECMAScript : std::regex::icase );
|
|
|
|
return std::regex_match( aExtension, extRegex );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-06-15 03:27:36 +00:00
|
|
|
wxString formatWildcardExt( const wxString& aWildcard )
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
|
|
|
wxString wc;
|
|
|
|
#if defined( __WXGTK__ )
|
|
|
|
|
2022-08-15 19:07:16 +00:00
|
|
|
for( const auto& ch : aWildcard )
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
|
|
|
if( wxIsalpha( ch ) )
|
|
|
|
wc += wxString::Format( "[%c%c]", wxTolower( ch ), wxToupper( ch ) );
|
|
|
|
else
|
|
|
|
wc += ch;
|
|
|
|
}
|
|
|
|
|
|
|
|
return wc;
|
|
|
|
#else
|
|
|
|
wc = aWildcard;
|
|
|
|
|
|
|
|
return wc;
|
|
|
|
#endif
|
|
|
|
}
|
2012-02-16 20:03:33 +00:00
|
|
|
|
2019-06-15 03:27:36 +00:00
|
|
|
|
2019-01-05 23:55:14 +00:00
|
|
|
wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
|
2019-01-01 14:38:57 +00:00
|
|
|
{
|
2019-01-08 11:57:39 +00:00
|
|
|
if( aExts.size() == 0 )
|
|
|
|
{
|
|
|
|
// The "all files" wildcard is different on different systems
|
|
|
|
wxString filter;
|
2023-01-17 04:14:38 +00:00
|
|
|
filter << wxS( " (" ) << wxFileSelectorDefaultWildcardStr << wxS( ")|" )
|
2019-01-08 11:57:39 +00:00
|
|
|
<< wxFileSelectorDefaultWildcardStr;
|
|
|
|
return filter;
|
|
|
|
}
|
|
|
|
|
2023-01-17 04:14:38 +00:00
|
|
|
wxString files_filter = wxS( " (" );
|
2019-01-01 14:38:57 +00:00
|
|
|
|
|
|
|
// Add extensions to the info message:
|
2020-07-17 17:32:16 +00:00
|
|
|
for( const std::string& ext : aExts )
|
2019-01-01 14:38:57 +00:00
|
|
|
{
|
2020-07-17 17:32:16 +00:00
|
|
|
if( files_filter.length() > 2 )
|
2023-01-17 04:14:38 +00:00
|
|
|
files_filter << wxS( "; " );
|
2020-07-17 17:32:16 +00:00
|
|
|
|
|
|
|
files_filter << "*." << ext;
|
2019-01-01 14:38:57 +00:00
|
|
|
}
|
|
|
|
|
2023-01-17 04:14:38 +00:00
|
|
|
files_filter << wxS( ")|*." );
|
2019-01-01 14:38:57 +00:00
|
|
|
|
2021-06-09 19:32:58 +00:00
|
|
|
// Add extensions to the filter list, using a formatted string (GTK specific):
|
2019-01-05 23:55:14 +00:00
|
|
|
bool first = true;
|
2022-10-16 16:45:10 +00:00
|
|
|
|
|
|
|
for( const std::string& ext : aExts )
|
2019-01-01 14:38:57 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
if( !first )
|
2023-01-17 04:14:38 +00:00
|
|
|
files_filter << wxS( ";*." );
|
2019-01-01 14:38:57 +00:00
|
|
|
|
2019-01-05 23:55:14 +00:00
|
|
|
first = false;
|
|
|
|
|
2019-01-01 14:38:57 +00:00
|
|
|
files_filter << formatWildcardExt( ext );
|
|
|
|
}
|
|
|
|
|
|
|
|
return files_filter;
|
|
|
|
}
|
|
|
|
|
2021-03-03 01:06:25 +00:00
|
|
|
const std::string BackupFileSuffix( "-bak" );
|
2023-07-16 14:02:12 +00:00
|
|
|
const std::string LockFilePrefix( "~" );
|
|
|
|
const std::string LockFileExtension( "lck" );
|
2019-01-01 14:38:57 +00:00
|
|
|
|
2020-02-13 13:39:52 +00:00
|
|
|
const std::string KiCadSymbolLibFileExtension( "kicad_sym" );
|
2018-08-02 22:15:01 +00:00
|
|
|
const std::string SchematicSymbolFileExtension( "sym" );
|
2020-05-15 13:25:11 +00:00
|
|
|
const std::string LegacySymbolLibFileExtension( "lib" );
|
2021-03-03 01:06:25 +00:00
|
|
|
const std::string LegacySymbolDocumentFileExtension( "dcm" );
|
2023-04-22 20:17:08 +00:00
|
|
|
const std::string LtspiceSymbolExtension( "asy" );
|
2018-08-02 22:15:01 +00:00
|
|
|
|
|
|
|
const std::string VrmlFileExtension( "wrl" );
|
|
|
|
|
2020-05-25 17:06:53 +00:00
|
|
|
const std::string ProjectFileExtension( "kicad_pro" );
|
|
|
|
const std::string LegacyProjectFileExtension( "pro" );
|
2020-05-31 21:42:04 +00:00
|
|
|
const std::string ProjectLocalSettingsFileExtension( "kicad_prl" );
|
2020-03-16 13:04:50 +00:00
|
|
|
const std::string LegacySchematicFileExtension( "sch" );
|
2022-09-14 22:28:09 +00:00
|
|
|
const std::string EagleSchematicFileExtension( "sch" );
|
|
|
|
const std::string CadstarSchematicFileExtension( "csa" );
|
2023-02-26 22:37:05 +00:00
|
|
|
const std::string CadstarPartsLibraryFileExtension( "lib" );
|
2020-03-16 13:04:50 +00:00
|
|
|
const std::string KiCadSchematicFileExtension( "kicad_sch" );
|
2022-11-10 03:37:47 +00:00
|
|
|
const std::string SpiceFileExtension( "cir" );
|
2023-04-22 20:17:08 +00:00
|
|
|
const std::string LtspiceSchematicExtension( "asc" );
|
2022-11-10 03:37:47 +00:00
|
|
|
const std::string CadstarNetlistFileExtension( "frp" );
|
2022-02-11 09:24:20 +00:00
|
|
|
const std::string OrCadPcb2NetlistFileExtension( "net" );
|
2018-08-02 22:15:01 +00:00
|
|
|
const std::string NetlistFileExtension( "net" );
|
2023-06-28 22:47:30 +00:00
|
|
|
const std::string AllegroNetlistFileExtension( "txt" );
|
2021-06-14 18:00:08 +00:00
|
|
|
const std::string FootprintAssignmentFileExtension( "cmp" );
|
2018-08-02 22:15:01 +00:00
|
|
|
const std::string GerberFileExtension( "gbr" );
|
|
|
|
const std::string GerberJobFileExtension( "gbrjob" );
|
|
|
|
const std::string HtmlFileExtension( "html" );
|
2019-08-09 19:37:41 +00:00
|
|
|
const std::string EquFileExtension( "equ" );
|
2021-07-28 17:25:40 +00:00
|
|
|
const std::string HotkeyFileExtension( "hotkeys" );
|
2022-05-29 19:29:32 +00:00
|
|
|
const std::string DatabaseLibraryFileExtension( "kicad_dbl" );
|
2018-08-02 22:15:01 +00:00
|
|
|
|
2020-07-03 13:40:31 +00:00
|
|
|
const std::string ArchiveFileExtension( "zip" );
|
|
|
|
|
2018-08-02 22:15:01 +00:00
|
|
|
const std::string LegacyPcbFileExtension( "brd" );
|
2022-09-14 22:28:09 +00:00
|
|
|
const std::string EaglePcbFileExtension( "brd" );
|
|
|
|
const std::string CadstarPcbFileExtension( "cpa" );
|
2018-08-02 22:15:01 +00:00
|
|
|
const std::string KiCadPcbFileExtension( "kicad_pcb" );
|
2021-05-30 22:56:24 +00:00
|
|
|
const std::string DrawingSheetFileExtension( "kicad_wks" );
|
2020-09-25 01:26:23 +00:00
|
|
|
const std::string DesignRulesFileExtension( "kicad_dru" );
|
2018-08-02 22:15:01 +00:00
|
|
|
|
|
|
|
const std::string PdfFileExtension( "pdf" );
|
|
|
|
const std::string MacrosFileExtension( "mcr" );
|
|
|
|
const std::string DrillFileExtension( "drl" );
|
|
|
|
const std::string SVGFileExtension( "svg" );
|
|
|
|
const std::string ReportFileExtension( "rpt" );
|
|
|
|
const std::string FootprintPlaceFileExtension( "pos" );
|
|
|
|
|
2020-02-02 23:00:54 +00:00
|
|
|
const std::string KiCadFootprintLibPathExtension( "pretty" ); // this is a directory
|
|
|
|
const std::string LegacyFootprintLibPathExtension( "mod" ); // this is a file
|
2022-01-06 14:01:05 +00:00
|
|
|
const std::string AltiumFootprintLibPathExtension( "PcbLib" ); // this is a file
|
2020-02-02 23:00:54 +00:00
|
|
|
const std::string EagleFootprintLibPathExtension( "lbr" ); // this is a file
|
|
|
|
const std::string GedaPcbFootprintLibFileExtension( "fp" ); // this is a file
|
2018-08-02 22:15:01 +00:00
|
|
|
|
|
|
|
const std::string KiCadFootprintFileExtension( "kicad_mod" );
|
|
|
|
const std::string SpecctraDsnFileExtension( "dsn" );
|
2021-07-28 17:25:40 +00:00
|
|
|
const std::string SpecctraSessionFileExtension( "ses" );
|
2018-08-02 22:15:01 +00:00
|
|
|
const std::string IpcD356FileExtension( "d356" );
|
2021-07-04 01:48:12 +00:00
|
|
|
const std::string WorkbookFileExtension( "wbk" );
|
2017-11-12 00:31:38 +00:00
|
|
|
|
2018-12-08 13:20:32 +00:00
|
|
|
const std::string PngFileExtension( "png" );
|
|
|
|
const std::string JpegFileExtension( "jpg" );
|
2021-07-28 17:25:40 +00:00
|
|
|
const std::string TextFileExtension( "txt" );
|
2022-09-10 20:11:03 +00:00
|
|
|
const std::string MarkdownFileExtension( "md" );
|
2022-05-09 13:41:00 +00:00
|
|
|
const std::string CsvFileExtension( "csv" );
|
2022-12-13 03:42:22 +00:00
|
|
|
const std::string XmlFileExtension( "xml" );
|
2023-08-13 18:44:31 +00:00
|
|
|
const std::string JsonFileExtension( "json" );
|
2018-12-08 13:20:32 +00:00
|
|
|
|
2022-11-18 04:55:34 +00:00
|
|
|
const wxString GerberFileExtensionsRegex( "(gbr|gko|pho|(g[tb][alops])|(gm?\\d\\d*)|(gp[tb]))" );
|
2022-09-14 22:28:09 +00:00
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
|
2022-11-18 04:55:34 +00:00
|
|
|
bool IsGerberFileExtension( const wxString& ext )
|
2019-11-11 20:34:42 +00:00
|
|
|
{
|
2022-11-18 04:55:34 +00:00
|
|
|
static wxRegEx gerberRE( GerberFileExtensionsRegex, wxRE_ICASE );
|
2019-11-11 20:34:42 +00:00
|
|
|
|
2022-11-18 04:55:34 +00:00
|
|
|
return gerberRE.Matches( ext );
|
2019-11-11 20:34:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-01-08 11:57:39 +00:00
|
|
|
wxString AllFilesWildcard()
|
|
|
|
{
|
|
|
|
return _( "All files" ) + AddFileExtListToFilter( {} );
|
|
|
|
}
|
2012-02-16 20:03:33 +00:00
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
|
|
|
|
wxString SchematicSymbolFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "KiCad drawing symbol files" ) + AddFileExtListToFilter( { "sym" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-02-13 13:39:52 +00:00
|
|
|
wxString KiCadSymbolLibFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad symbol library files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadSymbolLibFileExtension } );
|
2020-02-13 13:39:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-05-15 13:25:11 +00:00
|
|
|
wxString LegacySymbolLibFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2020-02-13 13:39:52 +00:00
|
|
|
return _( "KiCad legacy symbol library files" ) + AddFileExtListToFilter( { "lib" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-05-29 19:29:32 +00:00
|
|
|
wxString DatabaseLibFileWildcard()
|
|
|
|
{
|
|
|
|
return _( "KiCad database library files" )
|
|
|
|
+ AddFileExtListToFilter( { DatabaseLibraryFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-07-17 17:32:16 +00:00
|
|
|
wxString AllSymbolLibFilesWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "All KiCad symbol library files" )
|
2022-05-29 19:29:32 +00:00
|
|
|
+ AddFileExtListToFilter( { KiCadSymbolLibFileExtension,
|
|
|
|
DatabaseLibraryFileExtension,
|
|
|
|
"lib" } );
|
2020-07-17 17:32:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString ProjectFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad project files" ) + AddFileExtListToFilter( { ProjectFileExtension } );
|
2020-05-25 20:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString LegacyProjectFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad legacy project files" )
|
|
|
|
+ AddFileExtListToFilter( { LegacyProjectFileExtension } );
|
2020-05-25 20:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString AllProjectFilesWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "All KiCad project files" )
|
|
|
|
+ AddFileExtListToFilter( { ProjectFileExtension, LegacyProjectFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-11-18 22:31:18 +00:00
|
|
|
wxString AllSchematicFilesWildcard()
|
|
|
|
{
|
|
|
|
return _( "All KiCad schematic files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadSchematicFileExtension, LegacySchematicFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-03-16 13:04:50 +00:00
|
|
|
wxString LegacySchematicFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad legacy schematic files" )
|
|
|
|
+ AddFileExtListToFilter( { LegacySchematicFileExtension } );
|
2020-03-16 13:04:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString KiCadSchematicFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad s-expression schematic files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadSchematicFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-08-23 19:01:08 +00:00
|
|
|
wxString AltiumSchematicFileWildcard()
|
|
|
|
{
|
|
|
|
return _( "Altium schematic files" ) + AddFileExtListToFilter( { "SchDoc" } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-08 19:51:22 +00:00
|
|
|
wxString CadstarSchematicArchiveFileWildcard()
|
|
|
|
{
|
|
|
|
return _( "CADSTAR Schematic Archive files" ) + AddFileExtListToFilter( { "csa" } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-09-27 17:12:32 +00:00
|
|
|
wxString CadstarArchiveFilesWildcard()
|
|
|
|
{
|
|
|
|
return _( "CADSTAR Archive files" ) + AddFileExtListToFilter( { "csa", "cpa" } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString EagleSchematicFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Eagle XML schematic files" ) + AddFileExtListToFilter( { "sch" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-04-22 20:17:08 +00:00
|
|
|
wxString LtspiceSchematicFileWildcard()
|
|
|
|
{
|
2023-08-09 21:10:06 +00:00
|
|
|
return _( "LTspice schematic files" ) + AddFileExtListToFilter( { "asc" } );
|
2023-04-22 20:17:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString EagleFilesWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Eagle XML files" ) + AddFileExtListToFilter( { "sch", "brd" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2022-02-11 09:24:20 +00:00
|
|
|
wxString OrCadPcb2NetlistFileWildcard()
|
|
|
|
{
|
|
|
|
return _( "OrcadPCB2 netlist files" )
|
|
|
|
+ AddFileExtListToFilter( { OrCadPcb2NetlistFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString NetlistFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "KiCad netlist files" ) + AddFileExtListToFilter( { "net" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-06-28 22:47:30 +00:00
|
|
|
wxString AllegroNetlistFileWildcard()
|
|
|
|
{
|
|
|
|
return _( "Allegro netlist files" )
|
|
|
|
+ AddFileExtListToFilter( { AllegroNetlistFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString PcbFileWildcard()
|
|
|
|
{
|
2023-08-13 02:26:06 +00:00
|
|
|
return _( "KiCad printed circuit board files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadPcbFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString KiCadFootprintLibFileWildcard()
|
|
|
|
{
|
2023-08-13 02:26:06 +00:00
|
|
|
return _( "KiCad footprint files" ) + AddFileExtListToFilter( { KiCadFootprintFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString KiCadFootprintLibPathWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad footprint library paths" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadFootprintLibPathExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-05-30 22:56:24 +00:00
|
|
|
wxString DrawingSheetFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Drawing sheet files" )
|
|
|
|
+ AddFileExtListToFilter( { DrawingSheetFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-05-05 21:41:51 +00:00
|
|
|
// Wildcard for cvpcb symbol to footprint link file
|
2021-06-14 18:00:08 +00:00
|
|
|
wxString FootprintAssignmentFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad symbol footprint link files" )
|
|
|
|
+ AddFileExtListToFilter( { FootprintAssignmentFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
2012-02-16 20:03:33 +00:00
|
|
|
|
2012-10-05 12:25:12 +00:00
|
|
|
// Wildcard for reports and fabrication documents
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString DrillFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Drill files" )
|
|
|
|
+ AddFileExtListToFilter( { DrillFileExtension, "nc", "xnc", "txt" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString SVGFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "SVG files" ) + AddFileExtListToFilter( { SVGFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString HtmlFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "HTML files" ) + AddFileExtListToFilter( { "htm", "html" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString CsvFileWildcard()
|
|
|
|
{
|
2022-05-09 13:41:00 +00:00
|
|
|
return _( "CSV Files" ) + AddFileExtListToFilter( { CsvFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString PdfFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Portable document format files" ) + AddFileExtListToFilter( { "pdf" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString PSFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "PostScript files" ) + AddFileExtListToFilter( { "ps" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-08-13 22:48:29 +00:00
|
|
|
wxString JsonFileWildcard()
|
|
|
|
{
|
|
|
|
return _( "Json files" ) + AddFileExtListToFilter( { JsonFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString ReportFileWildcard()
|
|
|
|
{
|
2023-08-13 22:48:29 +00:00
|
|
|
return _( "Report files" ) + AddFileExtListToFilter( { ReportFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString FootprintPlaceFileWildcard()
|
|
|
|
{
|
2021-01-28 17:32:43 +00:00
|
|
|
return _( "Component placement files" ) + AddFileExtListToFilter( { "pos" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString Shapes3DFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "VRML and X3D files" ) + AddFileExtListToFilter( { "wrl", "x3d" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString IDF3DFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "IDFv3 footprint files" ) + AddFileExtListToFilter( { "idf" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString TextFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Text files" ) + AddFileExtListToFilter( { "txt" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString ModLegacyExportFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Legacy footprint export files" ) + AddFileExtListToFilter( { "emp" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString ErcFileWildcard()
|
|
|
|
{
|
2020-12-28 04:24:56 +00:00
|
|
|
return _( "Electrical rule check file" ) + AddFileExtListToFilter( { "erc" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString SpiceLibraryFileWildcard()
|
|
|
|
{
|
2019-09-20 15:17:01 +00:00
|
|
|
return _( "Spice library file" ) + AddFileExtListToFilter( { "lib", "mod" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString SpiceNetlistFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "SPICE netlist file" ) + AddFileExtListToFilter( { "cir" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString CadstarNetlistFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "CadStar netlist file" ) + AddFileExtListToFilter( { "frp" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString EquFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Symbol footprint association files" ) + AddFileExtListToFilter( { "equ" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString ZipFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Zip file" ) + AddFileExtListToFilter( { "zip" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString GencadFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "GenCAD 1.4 board files" ) + AddFileExtListToFilter( { "cad" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString DxfFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "DXF Files" ) + AddFileExtListToFilter( { "dxf" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString GerberJobFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Gerber job file" ) + AddFileExtListToFilter( { GerberJobFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString SpecctraDsnFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Specctra DSN file" )
|
|
|
|
+ AddFileExtListToFilter( { SpecctraDsnFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-07-28 17:25:40 +00:00
|
|
|
wxString SpecctraSessionFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Specctra Session file" )
|
|
|
|
+ AddFileExtListToFilter( { SpecctraSessionFileExtension } );
|
2021-07-28 17:25:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
wxString IpcD356FileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "IPC-D-356 Test Files" )
|
|
|
|
+ AddFileExtListToFilter( { IpcD356FileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString WorkbookFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Workbook file" )
|
|
|
|
+ AddFileExtListToFilter( { WorkbookFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
wxString PngFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "PNG file" ) + AddFileExtListToFilter( { "png" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
2018-12-08 13:20:32 +00:00
|
|
|
|
|
|
|
|
|
|
|
wxString JpegFileWildcard()
|
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Jpeg file" ) + AddFileExtListToFilter( { "jpg", "jpeg" } );
|
2018-12-08 13:20:32 +00:00
|
|
|
}
|
2021-07-28 17:25:40 +00:00
|
|
|
|
|
|
|
|
|
|
|
wxString HotkeyFileWildcard()
|
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Hotkey file" ) + AddFileExtListToFilter( { HotkeyFileExtension } );
|
2021-07-28 17:25:40 +00:00
|
|
|
}
|