KiCad PCB EDA Suite
wildcards_and_files_ext.h
Go to the documentation of this file.
1 /*
2  * This program source code file is part of KiCad, a free EDA CAD application.
3  *
4  * Copyright (C) 2018 Jean-Pierre Charras, jp.charras at wanadoo.fr
5  * Copyright (C) 2007-2012 SoftPLC Corporation, Dick Hollenbeck <dick@softplc.com>
6  * Copyright (C) 2008 Wayne Stambaugh <stambaughw@gmail.com>
7  * Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
8  *
9  * This program is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; either version 2
12  * of the License, or (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, you may find one here:
21  * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
22  * or you may search the http://www.gnu.org website for the version 2 license,
23  * or you may write to the Free Software Foundation, Inc.,
24  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
25  */
26 
32 #ifndef INCLUDE_WILDCARDS_AND_FILES_EXT_H_
33 #define INCLUDE_WILDCARDS_AND_FILES_EXT_H_
34 
35 #include <string>
36 #include <vector>
37 #include <wx/string.h>
38 
68 bool compareFileExtensions( const std::string& aExtension,
69  const std::vector<std::string>& aReference, bool aCaseSensitive = false );
70 
89 wxString AddFileExtListToFilter( const std::vector<std::string>& aExts );
90 
109 wxString formatWildcardExt( const wxString& aWildcard );
110 
111 extern const std::string BackupFileSuffix;
112 
113 extern const std::string SchematicSymbolFileExtension;
114 extern const std::string LegacySymbolLibFileExtension;
115 extern const std::string LegacySymbolDocumentFileExtension;
116 extern const std::string SchematicBackupFileExtension;
117 
118 extern const std::string VrmlFileExtension;
119 extern const std::string ProjectFileExtension;
120 extern const std::string LegacyProjectFileExtension;
121 extern const std::string ProjectLocalSettingsFileExtension;
122 extern const std::string LegacySchematicFileExtension;
123 extern const std::string KiCadSchematicFileExtension;
124 extern const std::string NetlistFileExtension;
125 extern const std::string GerberFileExtension;
126 extern const std::string GerberJobFileExtension;
127 extern const std::string HtmlFileExtension;
128 extern const std::string EquFileExtension;
129 
130 extern const std::string ArchiveFileExtension;
131 
132 extern const std::string LegacyPcbFileExtension;
133 extern const std::string KiCadPcbFileExtension;
134 #define PcbFileExtension KiCadPcbFileExtension // symlink choice
135 extern const std::string KiCadSymbolLibFileExtension;
136 extern const std::string PageLayoutDescrFileExtension;
137 extern const std::string DesignRulesFileExtension;
138 
139 extern const std::string LegacyFootprintLibPathExtension;
140 extern const std::string PdfFileExtension;
141 extern const std::string MacrosFileExtension;
142 extern const std::string ComponentFileExtension;
143 extern const std::string DrillFileExtension;
144 extern const std::string SVGFileExtension;
145 extern const std::string ReportFileExtension;
146 extern const std::string FootprintPlaceFileExtension;
147 extern const std::string KiCadFootprintFileExtension;
148 extern const std::string KiCadFootprintLibPathExtension;
149 extern const std::string GedaPcbFootprintLibFileExtension;
150 extern const std::string EagleFootprintLibPathExtension;
151 extern const std::string ComponentFileExtension;
152 extern const std::string PageLayoutDescrFileExtension;
153 extern const std::string SpecctraDsnFileExtension;
154 extern const std::string IpcD356FileExtension;
155 
156 extern const std::string PngFileExtension;
157 extern const std::string JpegFileExtension;
158 
159 
160 bool IsProtelExtension( const wxString& ext );
161 
177 extern wxString AllFilesWildcard();
178 
179 extern wxString ComponentFileWildcard();
180 extern wxString PageLayoutDescrFileWildcard();
181 extern wxString SchematicSymbolFileWildcard();
182 extern wxString KiCadSymbolLibFileWildcard();
183 extern wxString LegacySymbolLibFileWildcard();
184 extern wxString AllSymbolLibFilesWildcard();
185 extern wxString ProjectFileWildcard();
186 extern wxString LegacyProjectFileWildcard();
187 extern wxString AllProjectFilesWildcard();
188 extern wxString KiCadSchematicFileWildcard();
189 extern wxString LegacySchematicFileWildcard();
190 extern wxString BoardFileWildcard();
191 extern wxString NetlistFileWildcard();
192 extern wxString GerberFileWildcard();
193 extern wxString HtmlFileWildcard();
194 extern wxString CsvFileWildcard();
195 extern wxString LegacyPcbFileWildcard();
196 extern wxString PcbFileWildcard();
197 extern wxString EaglePcbFileWildcard();
198 extern wxString AltiumSchematicFileWildcard();
199 extern wxString CadstarSchematicArchiveFileWildcard();
200 extern wxString CadstarArchiveFilesWildcard();
201 extern wxString EagleSchematicFileWildcard();
202 extern wxString EagleFilesWildcard();
203 extern wxString PCadPcbFileWildcard();
204 extern wxString CadstarPcbArchiveFileWildcard();
205 extern wxString AltiumDesignerPcbFileWildcard();
206 extern wxString AltiumCircuitStudioPcbFileWildcard();
207 extern wxString AltiumCircuitMakerPcbFileWildcard();
208 extern wxString FabmasterPcbFileWildcard();
209 extern wxString PdfFileWildcard();
210 extern wxString PSFileWildcard();
211 extern wxString MacrosFileWildcard();
212 extern wxString ComponentFileWildcard();
213 extern wxString DrillFileWildcard();
214 extern wxString SVGFileWildcard();
215 extern wxString ReportFileWildcard();
216 extern wxString FootprintPlaceFileWildcard();
217 extern wxString Shapes3DFileWildcard();
218 extern wxString IDF3DFileWildcard();
219 extern wxString DocModulesFileName();
220 extern wxString LegacyFootprintLibPathWildcard();
221 extern wxString KiCadFootprintLibFileWildcard();
222 extern wxString KiCadFootprintLibPathWildcard();
223 extern wxString GedaPcbFootprintLibFileWildcard();
224 extern wxString EagleFootprintLibPathWildcard();
225 extern wxString TextFileWildcard();
226 extern wxString ModLegacyExportFileWildcard();
227 extern wxString ErcFileWildcard();
228 extern wxString SpiceLibraryFileWildcard();
229 extern wxString SpiceNetlistFileWildcard();
230 extern wxString CadstarNetlistFileWildcard();
231 extern wxString EquFileWildcard();
232 extern wxString ZipFileWildcard();
233 extern wxString GencadFileWildcard();
234 extern wxString DxfFileWildcard();
235 extern wxString GerberJobFileWildcard();
236 extern wxString SpecctraDsnFileWildcard();
237 extern wxString IpcD356FileWildcard();
238 extern wxString WorkbookFileWildcard();
239 extern wxString PngFileWildcard();
240 extern wxString JpegFileWildcard();
241 
246 #endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_
const std::string SchematicBackupFileExtension
const std::string NetlistFileExtension
wxString AllProjectFilesWildcard()
wxString GerberFileWildcard()
wxString SchematicSymbolFileWildcard()
wxString PageLayoutDescrFileWildcard()
wxString LegacySchematicFileWildcard()
wxString AllSymbolLibFilesWildcard()
const std::string LegacyFootprintLibPathExtension
wxString EaglePcbFileWildcard()
wxString EagleFootprintLibPathWildcard()
const std::string VrmlFileExtension
wxString SVGFileWildcard()
const std::string JpegFileExtension
wxString LegacyProjectFileWildcard()
wxString ComponentFileWildcard()
const std::string KiCadFootprintFileExtension
wxString SpiceNetlistFileWildcard()
const std::string ProjectFileExtension
wxString PdfFileWildcard()
const std::string LegacyPcbFileExtension
const std::string LegacySymbolLibFileExtension
const std::string BackupFileSuffix
const std::string DesignRulesFileExtension
wxString KiCadSchematicFileWildcard()
wxString DxfFileWildcard()
wxString ZipFileWildcard()
const std::string SchematicSymbolFileExtension
const std::string EagleFootprintLibPathExtension
wxString CsvFileWildcard()
const std::string ComponentFileExtension
wxString JpegFileWildcard()
const std::string GerberFileExtension
wxString AltiumCircuitMakerPcbFileWildcard()
const std::string KiCadPcbFileExtension
const std::string MacrosFileExtension
wxString LegacyFootprintLibPathWildcard()
wxString AllFilesWildcard()
bool IsProtelExtension(const wxString &ext)
wxString EquFileWildcard()
const std::string ProjectLocalSettingsFileExtension
wxString DocModulesFileName()
const std::string HtmlFileExtension
wxString FabmasterPcbFileWildcard()
wxString LegacyPcbFileWildcard()
wxString CadstarSchematicArchiveFileWildcard()
wxString PSFileWildcard()
wxString GencadFileWildcard()
wxString ReportFileWildcard()
wxString NetlistFileWildcard()
wxString HtmlFileWildcard()
const std::string LegacySymbolDocumentFileExtension
wxString ModLegacyExportFileWildcard()
const std::string GerberJobFileExtension
wxString formatWildcardExt(const wxString &aWildcard)
Format wildcard extension to support case sensitive file dialogs.
wxString KiCadSymbolLibFileWildcard()
wxString BoardFileWildcard()
wxString LegacySymbolLibFileWildcard()
const std::string LegacyProjectFileExtension
const std::string IpcD356FileExtension
const std::string PdfFileExtension
wxString DrillFileWildcard()
const std::string LegacySchematicFileExtension
const std::string SpecctraDsnFileExtension
const std::string PageLayoutDescrFileExtension
wxString AltiumDesignerPcbFileWildcard()
wxString IpcD356FileWildcard()
wxString PngFileWildcard()
const std::string EquFileExtension
wxString ProjectFileWildcard()
wxString AltiumCircuitStudioPcbFileWildcard()
wxString ErcFileWildcard()
wxString KiCadFootprintLibPathWildcard()
wxString GerberJobFileWildcard()
wxString EagleSchematicFileWildcard()
const std::string ReportFileExtension
wxString FootprintPlaceFileWildcard()
wxString Shapes3DFileWildcard()
wxString SpiceLibraryFileWildcard()
const std::string KiCadSchematicFileExtension
const std::string SVGFileExtension
const std::string PngFileExtension
wxString PcbFileWildcard()
wxString TextFileWildcard()
const std::string GedaPcbFootprintLibFileExtension
wxString SpecctraDsnFileWildcard()
wxString IDF3DFileWildcard()
const std::string FootprintPlaceFileExtension
wxString EagleFilesWildcard()
wxString MacrosFileWildcard()
wxString CadstarPcbArchiveFileWildcard()
wxString WorkbookFileWildcard()
wxString PCadPcbFileWildcard()
const std::string KiCadFootprintLibPathExtension
wxString AltiumSchematicFileWildcard()
wxString KiCadFootprintLibFileWildcard()
bool compareFileExtensions(const std::string &aExtension, const std::vector< std::string > &aReference, bool aCaseSensitive=false)
Compare the given extension against the reference extensions to see if it matches any of the referenc...
wxString CadstarArchiveFilesWildcard()
wxString GedaPcbFootprintLibFileWildcard()
const std::string DrillFileExtension
wxString CadstarNetlistFileWildcard()
wxString AddFileExtListToFilter(const std::vector< std::string > &aExts)
Build the wildcard extension file dialog wildcard filter to add to the base message dialog.
const std::string ArchiveFileExtension
const std::string KiCadSymbolLibFileExtension