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 <[email protected]>
6 * Copyright (C) 2008 Wayne Stambaugh <[email protected]>
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
68bool compareFileExtensions( const std::string& aExtension,
69 const std::vector<std::string>& aReference, bool aCaseSensitive = false );
70
89wxString AddFileExtListToFilter( const std::vector<std::string>& aExts );
90
109wxString formatWildcardExt( const wxString& aWildcard );
110
111extern const std::string BackupFileSuffix;
112
113extern const std::string SchematicSymbolFileExtension;
114extern const std::string LegacySymbolLibFileExtension;
115extern const std::string LegacySymbolDocumentFileExtension;
116extern const std::string SchematicBackupFileExtension;
117
118extern const std::string VrmlFileExtension;
119extern const std::string ProjectFileExtension;
120extern const std::string LegacyProjectFileExtension;
121extern const std::string ProjectLocalSettingsFileExtension;
122extern const std::string LegacySchematicFileExtension;
123extern const std::string EagleSchematicFileExtension;
124extern const std::string CadstarSchematicFileExtension;
125extern const std::string KiCadSchematicFileExtension;
126extern const std::string OrCadPcb2NetlistFileExtension;
127extern const std::string NetlistFileExtension;
128extern const std::string GerberFileExtension;
129extern const std::string GerberJobFileExtension;
130extern const std::string HtmlFileExtension;
131extern const std::string EquFileExtension;
132extern const std::string HotkeyFileExtension;
133extern const std::string DatabaseLibraryFileExtension;
134
135extern const std::string ArchiveFileExtension;
136
137extern const std::string LegacyPcbFileExtension;
138extern const std::string EaglePcbFileExtension;
139extern const std::string CadstarPcbFileExtension;
140extern const std::string KiCadPcbFileExtension;
141#define PcbFileExtension KiCadPcbFileExtension // symlink choice
142extern const std::string KiCadSymbolLibFileExtension;
143extern const std::string DrawingSheetFileExtension;
144extern const std::string DesignRulesFileExtension;
145
146extern const std::string LegacyFootprintLibPathExtension;
147extern const std::string PdfFileExtension;
148extern const std::string MacrosFileExtension;
149extern const std::string FootprintAssignmentFileExtension;
150extern const std::string DrillFileExtension;
151extern const std::string SVGFileExtension;
152extern const std::string ReportFileExtension;
153extern const std::string FootprintPlaceFileExtension;
154extern const std::string KiCadFootprintFileExtension;
155extern const std::string KiCadFootprintLibPathExtension;
156extern const std::string AltiumFootprintLibPathExtension;
157extern const std::string GedaPcbFootprintLibFileExtension;
158extern const std::string EagleFootprintLibPathExtension;
159extern const std::string DrawingSheetFileExtension;
160extern const std::string SpecctraDsnFileExtension;
161extern const std::string SpecctraSessionFileExtension;
162extern const std::string IpcD356FileExtension;
163extern const std::string WorkbookFileExtension;
164
165extern const std::string PngFileExtension;
166extern const std::string JpegFileExtension;
167extern const std::string TextFileExtension;
168extern const std::string MarkdownFileExtension;
169extern const std::string CsvFileExtension;
170
171extern const std::vector<std::string> GerberFileExtensions;
172extern const wxString GerberFileExtensionWildCard;
173
181bool IsExtensionAccepted( const wxString& aExt, const std::vector<std::string> acceptedExts );
182
183bool IsProtelExtension( const wxString& ext );
184
200extern wxString AllFilesWildcard();
201
202extern wxString FootprintAssignmentFileWildcard();
203extern wxString DrawingSheetFileWildcard();
204extern wxString SchematicSymbolFileWildcard();
205extern wxString KiCadSymbolLibFileWildcard();
206extern wxString LegacySymbolLibFileWildcard();
207extern wxString DatabaseLibFileWildcard();
208extern wxString AllSymbolLibFilesWildcard();
209extern wxString ProjectFileWildcard();
210extern wxString LegacyProjectFileWildcard();
211extern wxString AllProjectFilesWildcard();
212extern wxString AllSchematicFilesWildcard();
213extern wxString KiCadSchematicFileWildcard();
214extern wxString LegacySchematicFileWildcard();
215extern wxString BoardFileWildcard();
216extern wxString OrCadPcb2NetlistFileWildcard();
217extern wxString NetlistFileWildcard();
218extern wxString GerberFileWildcard();
219extern wxString HtmlFileWildcard();
220extern wxString CsvFileWildcard();
221extern wxString LegacyPcbFileWildcard();
222extern wxString PcbFileWildcard();
223extern wxString EaglePcbFileWildcard();
224extern wxString AltiumSchematicFileWildcard();
226extern wxString CadstarArchiveFilesWildcard();
227extern wxString EagleSchematicFileWildcard();
228extern wxString EagleFilesWildcard();
229extern wxString PCadPcbFileWildcard();
230extern wxString CadstarPcbArchiveFileWildcard();
231extern wxString AltiumDesignerPcbFileWildcard();
232extern wxString AltiumCircuitStudioPcbFileWildcard();
233extern wxString AltiumCircuitMakerPcbFileWildcard();
234extern wxString FabmasterPcbFileWildcard();
235extern wxString PdfFileWildcard();
236extern wxString PSFileWildcard();
237extern wxString MacrosFileWildcard();
238extern wxString DrillFileWildcard();
239extern wxString SVGFileWildcard();
240extern wxString ReportFileWildcard();
241extern wxString FootprintPlaceFileWildcard();
242extern wxString Shapes3DFileWildcard();
243extern wxString IDF3DFileWildcard();
244extern wxString DocModulesFileName();
245extern wxString LegacyFootprintLibPathWildcard();
246extern wxString KiCadFootprintLibFileWildcard();
247extern wxString KiCadFootprintLibPathWildcard();
248extern wxString AltiumFootprintLibPathWildcard();
249extern wxString GedaPcbFootprintLibFileWildcard();
250extern wxString EagleFootprintLibPathWildcard();
251extern wxString TextFileWildcard();
252extern wxString ModLegacyExportFileWildcard();
253extern wxString ErcFileWildcard();
254extern wxString SpiceLibraryFileWildcard();
255extern wxString SpiceNetlistFileWildcard();
256extern wxString CadstarNetlistFileWildcard();
257extern wxString EquFileWildcard();
258extern wxString ZipFileWildcard();
259extern wxString GencadFileWildcard();
260extern wxString DxfFileWildcard();
261extern wxString GerberJobFileWildcard();
262extern wxString SpecctraDsnFileWildcard();
263extern wxString SpecctraSessionFileWildcard();
264extern wxString IpcD356FileWildcard();
265extern wxString WorkbookFileWildcard();
266extern wxString PngFileWildcard();
267extern wxString JpegFileWildcard();
268extern wxString HotkeyFileWildcard();
269
274#endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_
const std::string KiCadFootprintLibPathExtension
bool IsExtensionAccepted(const wxString &aExt, const std::vector< std::string > acceptedExts)
Checks if the file extension is in accepted extensions.
const std::string DatabaseLibraryFileExtension
const std::string LegacyPcbFileExtension
const std::string EagleFootprintLibPathExtension
const wxString GerberFileExtensionWildCard
const std::string CadstarPcbFileExtension
const std::string SpecctraDsnFileExtension
const std::string PdfFileExtension
const std::string AltiumFootprintLibPathExtension
const std::string BackupFileSuffix
const std::string KiCadSymbolLibFileExtension
const std::vector< std::string > GerberFileExtensions
Gerber files extensions Kicad is to open.
const std::string LegacySchematicFileExtension
const std::string SpecctraSessionFileExtension
const std::string FootprintAssignmentFileExtension
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 WorkbookFileExtension
wxString formatWildcardExt(const wxString &aWildcard)
Format wildcard extension to support case sensitive file dialogs.
const std::string FootprintPlaceFileExtension
const std::string GerberJobFileExtension
const std::string SchematicBackupFileExtension
const std::string LegacySymbolDocumentFileExtension
const std::string DrillFileExtension
const std::string HotkeyFileExtension
const std::string JpegFileExtension
const std::string EagleSchematicFileExtension
const std::string KiCadFootprintFileExtension
const std::string LegacyProjectFileExtension
const std::string MarkdownFileExtension
const std::string KiCadPcbFileExtension
const std::string LegacyFootprintLibPathExtension
const std::string ProjectLocalSettingsFileExtension
const std::string SVGFileExtension
const std::string TextFileExtension
const std::string ProjectFileExtension
const std::string CsvFileExtension
const std::string MacrosFileExtension
const std::string NetlistFileExtension
bool IsProtelExtension(const wxString &ext)
const std::string OrCadPcb2NetlistFileExtension
const std::string EaglePcbFileExtension
const std::string DesignRulesFileExtension
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...
const std::string HtmlFileExtension
const std::string VrmlFileExtension
const std::string CadstarSchematicFileExtension
const std::string PngFileExtension
const std::string IpcD356FileExtension
const std::string EquFileExtension
const std::string GedaPcbFootprintLibFileExtension
const std::string KiCadSchematicFileExtension
const std::string ReportFileExtension
const std::string DrawingSheetFileExtension
const std::string GerberFileExtension
const std::string ArchiveFileExtension
const std::string SchematicSymbolFileExtension
const std::string LegacySymbolLibFileExtension
wxString KiCadSchematicFileWildcard()
wxString IDF3DFileWildcard()
wxString NetlistFileWildcard()
wxString SpecctraDsnFileWildcard()
wxString EagleFootprintLibPathWildcard()
wxString DatabaseLibFileWildcard()
wxString ErcFileWildcard()
wxString DxfFileWildcard()
wxString AllProjectFilesWildcard()
wxString DocModulesFileName()
wxString IpcD356FileWildcard()
wxString LegacyProjectFileWildcard()
wxString ProjectFileWildcard()
wxString SpiceLibraryFileWildcard()
wxString KiCadFootprintLibPathWildcard()
wxString LegacyPcbFileWildcard()
wxString SchematicSymbolFileWildcard()
wxString FootprintPlaceFileWildcard()
wxString TextFileWildcard()
wxString LegacySymbolLibFileWildcard()
wxString DrillFileWildcard()
wxString AltiumFootprintLibPathWildcard()
wxString EagleFilesWildcard()
wxString SVGFileWildcard()
wxString CadstarPcbArchiveFileWildcard()
wxString SpecctraSessionFileWildcard()
wxString EquFileWildcard()
wxString ReportFileWildcard()
wxString LegacySchematicFileWildcard()
wxString Shapes3DFileWildcard()
wxString FootprintAssignmentFileWildcard()
wxString AltiumDesignerPcbFileWildcard()
wxString MacrosFileWildcard()
wxString PCadPcbFileWildcard()
wxString BoardFileWildcard()
wxString PdfFileWildcard()
wxString WorkbookFileWildcard()
wxString ModLegacyExportFileWildcard()
wxString OrCadPcb2NetlistFileWildcard()
wxString EaglePcbFileWildcard()
wxString FabmasterPcbFileWildcard()
wxString AltiumCircuitMakerPcbFileWildcard()
wxString CadstarNetlistFileWildcard()
wxString GerberFileWildcard()
wxString KiCadFootprintLibFileWildcard()
wxString PngFileWildcard()
wxString CadstarSchematicArchiveFileWildcard()
wxString DrawingSheetFileWildcard()
wxString HtmlFileWildcard()
wxString AllSchematicFilesWildcard()
wxString AltiumSchematicFileWildcard()
wxString LegacyFootprintLibPathWildcard()
wxString AltiumCircuitStudioPcbFileWildcard()
wxString PSFileWildcard()
wxString CadstarArchiveFilesWildcard()
wxString HotkeyFileWildcard()
wxString AllFilesWildcard()
wxString SpiceNetlistFileWildcard()
wxString PcbFileWildcard()
wxString GedaPcbFootprintLibFileWildcard()
wxString GerberJobFileWildcard()
wxString GencadFileWildcard()
wxString EagleSchematicFileWildcard()
wxString KiCadSymbolLibFileWildcard()
wxString ZipFileWildcard()
wxString AllSymbolLibFilesWildcard()
wxString JpegFileWildcard()
wxString CsvFileWildcard()