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;
|
|
|
|
}
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
const std::string FILEEXT::BackupFileSuffix( "-bak" );
|
|
|
|
const std::string FILEEXT::LockFilePrefix( "~" );
|
|
|
|
const std::string FILEEXT::LockFileExtension( "lck" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::KiCadSymbolLibFileExtension( "kicad_sym" );
|
|
|
|
const std::string FILEEXT::SchematicSymbolFileExtension( "sym" );
|
|
|
|
const std::string FILEEXT::LegacySymbolLibFileExtension( "lib" );
|
|
|
|
const std::string FILEEXT::LegacySymbolDocumentFileExtension( "dcm" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::VrmlFileExtension( "wrl" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::ProjectFileExtension( "kicad_pro" );
|
|
|
|
const std::string FILEEXT::LegacyProjectFileExtension( "pro" );
|
|
|
|
const std::string FILEEXT::ProjectLocalSettingsFileExtension( "kicad_prl" );
|
|
|
|
const std::string FILEEXT::LegacySchematicFileExtension( "sch" );
|
|
|
|
const std::string FILEEXT::CadstarSchematicFileExtension( "csa" );
|
|
|
|
const std::string FILEEXT::CadstarPartsLibraryFileExtension( "lib" );
|
|
|
|
const std::string FILEEXT::KiCadSchematicFileExtension( "kicad_sch" );
|
|
|
|
const std::string FILEEXT::SpiceFileExtension( "cir" );
|
|
|
|
const std::string FILEEXT::CadstarNetlistFileExtension( "frp" );
|
|
|
|
const std::string FILEEXT::OrCadPcb2NetlistFileExtension( "net" );
|
|
|
|
const std::string FILEEXT::NetlistFileExtension( "net" );
|
|
|
|
const std::string FILEEXT::AllegroNetlistFileExtension( "txt" );
|
2024-03-09 14:57:24 +00:00
|
|
|
const std::string FILEEXT::PADSNetlistFileExtension( "asc" );
|
2023-12-28 02:10:01 +00:00
|
|
|
const std::string FILEEXT::FootprintAssignmentFileExtension( "cmp" );
|
|
|
|
const std::string FILEEXT::GerberFileExtension( "gbr" );
|
|
|
|
const std::string FILEEXT::GerberJobFileExtension( "gbrjob" );
|
|
|
|
const std::string FILEEXT::HtmlFileExtension( "html" );
|
|
|
|
const std::string FILEEXT::EquFileExtension( "equ" );
|
|
|
|
const std::string FILEEXT::HotkeyFileExtension( "hotkeys" );
|
|
|
|
const std::string FILEEXT::DatabaseLibraryFileExtension( "kicad_dbl" );
|
|
|
|
const std::string FILEEXT::HTTPLibraryFileExtension( "kicad_httplib" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::ArchiveFileExtension( "zip" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::LegacyPcbFileExtension( "brd" );
|
|
|
|
const std::string FILEEXT::EaglePcbFileExtension( "brd" );
|
|
|
|
const std::string FILEEXT::CadstarPcbFileExtension( "cpa" );
|
|
|
|
const std::string FILEEXT::KiCadPcbFileExtension( "kicad_pcb" );
|
|
|
|
const std::string FILEEXT::DrawingSheetFileExtension( "kicad_wks" );
|
|
|
|
const std::string FILEEXT::DesignRulesFileExtension( "kicad_dru" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::PdfFileExtension( "pdf" );
|
|
|
|
const std::string FILEEXT::MacrosFileExtension( "mcr" );
|
|
|
|
const std::string FILEEXT::DrillFileExtension( "drl" );
|
|
|
|
const std::string FILEEXT::SVGFileExtension( "svg" );
|
|
|
|
const std::string FILEEXT::ReportFileExtension( "rpt" );
|
|
|
|
const std::string FILEEXT::FootprintPlaceFileExtension( "pos" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::KiCadFootprintLibPathExtension( "pretty" ); // this is a directory
|
|
|
|
const std::string FILEEXT::LegacyFootprintLibPathExtension( "mod" ); // this is a file
|
|
|
|
const std::string FILEEXT::AltiumFootprintLibPathExtension( "PcbLib" ); // this is a file
|
|
|
|
const std::string FILEEXT::CadstarFootprintLibPathExtension( "cpa" ); // this is a file
|
|
|
|
const std::string FILEEXT::EagleFootprintLibPathExtension( "lbr" ); // this is a file
|
|
|
|
const std::string FILEEXT::GedaPcbFootprintLibFileExtension( "fp" ); // this is a file
|
|
|
|
|
|
|
|
const std::string FILEEXT::KiCadFootprintFileExtension( "kicad_mod" );
|
|
|
|
const std::string FILEEXT::SpecctraDsnFileExtension( "dsn" );
|
|
|
|
const std::string FILEEXT::SpecctraSessionFileExtension( "ses" );
|
|
|
|
const std::string FILEEXT::IpcD356FileExtension( "d356" );
|
|
|
|
const std::string FILEEXT::Ipc2581FileExtension( "xml" );
|
|
|
|
const std::string FILEEXT::WorkbookFileExtension( "wbk" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::PngFileExtension( "png" );
|
|
|
|
const std::string FILEEXT::JpegFileExtension( "jpg" );
|
|
|
|
const std::string FILEEXT::TextFileExtension( "txt" );
|
|
|
|
const std::string FILEEXT::MarkdownFileExtension( "md" );
|
|
|
|
const std::string FILEEXT::CsvFileExtension( "csv" );
|
|
|
|
const std::string FILEEXT::XmlFileExtension( "xml" );
|
|
|
|
const std::string FILEEXT::JsonFileExtension( "json" );
|
|
|
|
|
|
|
|
const std::string FILEEXT::StepFileExtension( "step" );
|
|
|
|
const std::string FILEEXT::StepFileAbrvExtension( "stp" );
|
|
|
|
const std::string FILEEXT::GltfBinaryFileExtension( "glb" );
|
|
|
|
|
|
|
|
const wxString FILEEXT::GerberFileExtensionsRegex( "(gbr|gko|pho|(g[tb][alops])|(gm?\\d\\d*)|(gp[tb]))" );
|
|
|
|
|
|
|
|
|
|
|
|
bool FILEEXT::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
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::AllFilesWildcard()
|
2019-01-08 11:57:39 +00:00
|
|
|
{
|
|
|
|
return _( "All files" ) + AddFileExtListToFilter( {} );
|
|
|
|
}
|
2012-02-16 20:03:33 +00:00
|
|
|
|
2017-11-12 00:31:38 +00:00
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::KiCadSymbolLibFileWildcard()
|
2020-02-13 13:39:52 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad symbol library files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadSymbolLibFileExtension } );
|
2020-02-13 13:39:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::ProjectFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad project files" ) + AddFileExtListToFilter( { ProjectFileExtension } );
|
2020-05-25 20:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::LegacyProjectFileWildcard()
|
2020-05-25 20:41:24 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad legacy project files" )
|
|
|
|
+ AddFileExtListToFilter( { LegacyProjectFileExtension } );
|
2020-05-25 20:41:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::AllProjectFilesWildcard()
|
2020-05-25 20:41:24 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "All KiCad project files" )
|
|
|
|
+ AddFileExtListToFilter( { ProjectFileExtension, LegacyProjectFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::AllSchematicFilesWildcard()
|
2021-11-18 22:31:18 +00:00
|
|
|
{
|
|
|
|
return _( "All KiCad schematic files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadSchematicFileExtension, LegacySchematicFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::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
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::KiCadSchematicFileWildcard()
|
2020-03-16 13:04:50 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad s-expression schematic files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadSchematicFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::CadstarArchiveFilesWildcard()
|
2020-09-27 17:12:32 +00:00
|
|
|
{
|
|
|
|
return _( "CADSTAR Archive files" ) + AddFileExtListToFilter( { "csa", "cpa" } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::EagleFilesWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Eagle XML files" ) + AddFileExtListToFilter( { "sch", "brd" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::OrCadPcb2NetlistFileWildcard()
|
2022-02-11 09:24:20 +00:00
|
|
|
{
|
|
|
|
return _( "OrcadPCB2 netlist files" )
|
|
|
|
+ AddFileExtListToFilter( { OrCadPcb2NetlistFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::NetlistFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "KiCad netlist files" ) + AddFileExtListToFilter( { "net" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::AllegroNetlistFileWildcard()
|
2023-06-28 22:47:30 +00:00
|
|
|
{
|
|
|
|
return _( "Allegro netlist files" )
|
|
|
|
+ AddFileExtListToFilter( { AllegroNetlistFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-03-09 14:57:24 +00:00
|
|
|
wxString FILEEXT::PADSNetlistFileWildcard()
|
|
|
|
{
|
|
|
|
return _( "PADS netlist files" ) + AddFileExtListToFilter( { PADSNetlistFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::EasyEdaArchiveWildcard()
|
2023-09-06 11:58:39 +00:00
|
|
|
{
|
|
|
|
return _( "EasyEDA (JLCEDA) Std backup archive" ) + AddFileExtListToFilter( { "zip" } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::EasyEdaProFileWildcard()
|
2023-09-06 11:58:39 +00:00
|
|
|
{
|
|
|
|
return _( "EasyEDA (JLCEDA) Pro files" ) + AddFileExtListToFilter( { "epro", "zip" } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::PcbFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2023-08-13 02:26:06 +00:00
|
|
|
return _( "KiCad printed circuit board files" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadPcbFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::KiCadFootprintLibFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2023-08-13 02:26:06 +00:00
|
|
|
return _( "KiCad footprint files" ) + AddFileExtListToFilter( { KiCadFootprintFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::KiCadFootprintLibPathWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "KiCad footprint library paths" )
|
|
|
|
+ AddFileExtListToFilter( { KiCadFootprintLibPathExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::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
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::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
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::DrillFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Drill files" )
|
|
|
|
+ AddFileExtListToFilter( { DrillFileExtension, "nc", "xnc", "txt" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::SVGFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "SVG files" ) + AddFileExtListToFilter( { SVGFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::HtmlFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "HTML files" ) + AddFileExtListToFilter( { "htm", "html" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::CsvFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2022-05-09 13:41:00 +00:00
|
|
|
return _( "CSV Files" ) + AddFileExtListToFilter( { CsvFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::PdfFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Portable document format files" ) + AddFileExtListToFilter( { "pdf" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::PSFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "PostScript files" ) + AddFileExtListToFilter( { "ps" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::JsonFileWildcard()
|
2023-08-13 22:48:29 +00:00
|
|
|
{
|
|
|
|
return _( "Json files" ) + AddFileExtListToFilter( { JsonFileExtension } );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::ReportFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2023-08-13 22:48:29 +00:00
|
|
|
return _( "Report files" ) + AddFileExtListToFilter( { ReportFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::FootprintPlaceFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-01-28 17:32:43 +00:00
|
|
|
return _( "Component placement files" ) + AddFileExtListToFilter( { "pos" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::Shapes3DFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "VRML and X3D files" ) + AddFileExtListToFilter( { "wrl", "x3d" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::IDF3DFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "IDFv3 footprint files" ) + AddFileExtListToFilter( { "idf" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::TextFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Text files" ) + AddFileExtListToFilter( { "txt" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::ModLegacyExportFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Legacy footprint export files" ) + AddFileExtListToFilter( { "emp" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::ErcFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2020-12-28 04:24:56 +00:00
|
|
|
return _( "Electrical rule check file" ) + AddFileExtListToFilter( { "erc" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::SpiceLibraryFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-09-20 15:17:01 +00:00
|
|
|
return _( "Spice library file" ) + AddFileExtListToFilter( { "lib", "mod" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::SpiceNetlistFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "SPICE netlist file" ) + AddFileExtListToFilter( { "cir" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::CadstarNetlistFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "CadStar netlist file" ) + AddFileExtListToFilter( { "frp" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::EquFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Symbol footprint association files" ) + AddFileExtListToFilter( { "equ" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::ZipFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "Zip file" ) + AddFileExtListToFilter( { "zip" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::GencadFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "GenCAD 1.4 board files" ) + AddFileExtListToFilter( { "cad" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::DxfFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2019-01-05 23:55:14 +00:00
|
|
|
return _( "DXF Files" ) + AddFileExtListToFilter( { "dxf" } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::GerberJobFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Gerber job file" ) + AddFileExtListToFilter( { GerberJobFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::SpecctraDsnFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Specctra DSN file" )
|
|
|
|
+ AddFileExtListToFilter( { SpecctraDsnFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::SpecctraSessionFileWildcard()
|
2021-07-28 17:25:40 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Specctra Session file" )
|
|
|
|
+ AddFileExtListToFilter( { SpecctraSessionFileExtension } );
|
2021-07-28 17:25:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::IpcD356FileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "IPC-D-356 Test Files" )
|
|
|
|
+ AddFileExtListToFilter( { IpcD356FileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::WorkbookFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Workbook file" )
|
|
|
|
+ AddFileExtListToFilter( { WorkbookFileExtension } );
|
2017-11-12 00:31:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::PngFileWildcard()
|
2017-11-12 00:31:38 +00:00
|
|
|
{
|
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
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::JpegFileWildcard()
|
2018-12-08 13:20:32 +00:00
|
|
|
{
|
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
|
|
|
|
|
|
|
|
2023-12-28 02:10:01 +00:00
|
|
|
wxString FILEEXT::HotkeyFileWildcard()
|
2021-07-28 17:25:40 +00:00
|
|
|
{
|
2021-08-15 15:50:23 +00:00
|
|
|
return _( "Hotkey file" ) + AddFileExtListToFilter( { HotkeyFileExtension } );
|
2021-07-28 17:25:40 +00:00
|
|
|
}
|