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 extern const std::string HotkeyFileExtension;
130 
131 extern const std::string ArchiveFileExtension;
132 
133 extern const std::string LegacyPcbFileExtension;
134 extern const std::string KiCadPcbFileExtension;
135 #define PcbFileExtension KiCadPcbFileExtension // symlink choice
136 extern const std::string KiCadSymbolLibFileExtension;
137 extern const std::string DrawingSheetFileExtension;
138 extern const std::string DesignRulesFileExtension;
139 
140 extern const std::string LegacyFootprintLibPathExtension;
141 extern const std::string PdfFileExtension;
142 extern const std::string MacrosFileExtension;
143 extern const std::string FootprintAssignmentFileExtension;
144 extern const std::string DrillFileExtension;
145 extern const std::string SVGFileExtension;
146 extern const std::string ReportFileExtension;
147 extern const std::string FootprintPlaceFileExtension;
148 extern const std::string KiCadFootprintFileExtension;
149 extern const std::string KiCadFootprintLibPathExtension;
150 extern const std::string GedaPcbFootprintLibFileExtension;
151 extern const std::string EagleFootprintLibPathExtension;
152 extern const std::string DrawingSheetFileExtension;
153 extern const std::string SpecctraDsnFileExtension;
154 extern const std::string SpecctraSessionFileExtension;
155 extern const std::string IpcD356FileExtension;
156 extern const std::string WorkbookFileExtension;
157 
158 extern const std::string PngFileExtension;
159 extern const std::string JpegFileExtension;
160 extern const std::string TextFileExtension;
161 
162 
163 bool IsProtelExtension( const wxString& ext );
164 
180 extern wxString AllFilesWildcard();
181 
182 extern wxString FootprintAssignmentFileWildcard();
183 extern wxString DrawingSheetFileWildcard();
184 extern wxString SchematicSymbolFileWildcard();
185 extern wxString KiCadSymbolLibFileWildcard();
186 extern wxString LegacySymbolLibFileWildcard();
187 extern wxString AllSymbolLibFilesWildcard();
188 extern wxString ProjectFileWildcard();
189 extern wxString LegacyProjectFileWildcard();
190 extern wxString AllProjectFilesWildcard();
191 extern wxString KiCadSchematicFileWildcard();
192 extern wxString LegacySchematicFileWildcard();
193 extern wxString BoardFileWildcard();
194 extern wxString NetlistFileWildcard();
195 extern wxString GerberFileWildcard();
196 extern wxString HtmlFileWildcard();
197 extern wxString CsvFileWildcard();
198 extern wxString LegacyPcbFileWildcard();
199 extern wxString PcbFileWildcard();
200 extern wxString EaglePcbFileWildcard();
201 extern wxString AltiumSchematicFileWildcard();
202 extern wxString CadstarSchematicArchiveFileWildcard();
203 extern wxString CadstarArchiveFilesWildcard();
204 extern wxString EagleSchematicFileWildcard();
205 extern wxString EagleFilesWildcard();
206 extern wxString PCadPcbFileWildcard();
207 extern wxString CadstarPcbArchiveFileWildcard();
208 extern wxString AltiumDesignerPcbFileWildcard();
209 extern wxString AltiumCircuitStudioPcbFileWildcard();
210 extern wxString AltiumCircuitMakerPcbFileWildcard();
211 extern wxString FabmasterPcbFileWildcard();
212 extern wxString PdfFileWildcard();
213 extern wxString PSFileWildcard();
214 extern wxString MacrosFileWildcard();
215 extern wxString DrillFileWildcard();
216 extern wxString SVGFileWildcard();
217 extern wxString ReportFileWildcard();
218 extern wxString FootprintPlaceFileWildcard();
219 extern wxString Shapes3DFileWildcard();
220 extern wxString IDF3DFileWildcard();
221 extern wxString DocModulesFileName();
222 extern wxString LegacyFootprintLibPathWildcard();
223 extern wxString KiCadFootprintLibFileWildcard();
224 extern wxString KiCadFootprintLibPathWildcard();
225 extern wxString GedaPcbFootprintLibFileWildcard();
226 extern wxString EagleFootprintLibPathWildcard();
227 extern wxString TextFileWildcard();
228 extern wxString ModLegacyExportFileWildcard();
229 extern wxString ErcFileWildcard();
230 extern wxString SpiceLibraryFileWildcard();
231 extern wxString SpiceNetlistFileWildcard();
232 extern wxString CadstarNetlistFileWildcard();
233 extern wxString EquFileWildcard();
234 extern wxString ZipFileWildcard();
235 extern wxString GencadFileWildcard();
236 extern wxString DxfFileWildcard();
237 extern wxString GerberJobFileWildcard();
238 extern wxString SpecctraDsnFileWildcard();
239 extern wxString SpecctraSessionFileWildcard();
240 extern wxString IpcD356FileWildcard();
241 extern wxString WorkbookFileWildcard();
242 extern wxString PngFileWildcard();
243 extern wxString JpegFileWildcard();
244 extern wxString HotkeyFileWildcard();
245 
250 #endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_
const std::string SchematicBackupFileExtension
const std::string NetlistFileExtension
wxString AllProjectFilesWildcard()
wxString GerberFileWildcard()
wxString SchematicSymbolFileWildcard()
wxString LegacySchematicFileWildcard()
wxString AllSymbolLibFilesWildcard()
const std::string LegacyFootprintLibPathExtension
wxString EaglePcbFileWildcard()
wxString EagleFootprintLibPathWildcard()
const std::string VrmlFileExtension
wxString SVGFileWildcard()
const std::string JpegFileExtension
wxString LegacyProjectFileWildcard()
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()
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()
const std::string FootprintAssignmentFileExtension
wxString LegacyPcbFileWildcard()
wxString CadstarSchematicArchiveFileWildcard()
wxString PSFileWildcard()
wxString SpecctraSessionFileWildcard()
wxString GencadFileWildcard()
wxString ReportFileWildcard()
wxString NetlistFileWildcard()
wxString HtmlFileWildcard()
wxString FootprintAssignmentFileWildcard()
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 HotkeyFileWildcard()
wxString KiCadSymbolLibFileWildcard()
wxString BoardFileWildcard()
wxString LegacySymbolLibFileWildcard()
const std::string LegacyProjectFileExtension
const std::string IpcD356FileExtension
const std::string PdfFileExtension
const std::string TextFileExtension
wxString DrillFileWildcard()
const std::string LegacySchematicFileExtension
const std::string SpecctraSessionFileExtension
const std::string SpecctraDsnFileExtension
wxString AltiumDesignerPcbFileWildcard()
wxString IpcD356FileWildcard()
wxString PngFileWildcard()
const std::string EquFileExtension
wxString ProjectFileWildcard()
wxString AltiumCircuitStudioPcbFileWildcard()
wxString ErcFileWildcard()
wxString KiCadFootprintLibPathWildcard()
wxString GerberJobFileWildcard()
const std::string DrawingSheetFileExtension
wxString EagleSchematicFileWildcard()
const std::string ReportFileExtension
const std::string HotkeyFileExtension
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()
wxString DrawingSheetFileWildcard()
const std::string FootprintPlaceFileExtension
wxString EagleFilesWildcard()
wxString MacrosFileWildcard()
wxString CadstarPcbArchiveFileWildcard()
wxString WorkbookFileWildcard()
const std::string WorkbookFileExtension
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