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 <wx/wx.h>
36 
37 #include <string>
38 #include <vector>
39 
69 bool compareFileExtensions( const std::string& aExtension,
70  const std::vector<std::string>& aReference, bool aCaseSensitive = false );
71 
90 wxString AddFileExtListToFilter( const std::vector<std::string>& aExts );
91 
110 wxString formatWildcardExt( const wxString& aWildcard );
111 
112 extern const std::string SchematicSymbolFileExtension;
113 extern const std::string LegacySymbolLibFileExtension;
114 extern const std::string SchematicBackupFileExtension;
115 
116 extern const std::string VrmlFileExtension;
117 extern const std::string ProjectFileExtension;
118 extern const std::string LegacyProjectFileExtension;
119 extern const std::string ProjectLocalSettingsFileExtension;
120 extern const std::string LegacySchematicFileExtension;
121 extern const std::string KiCadSchematicFileExtension;
122 extern const std::string NetlistFileExtension;
123 extern const std::string GerberFileExtension;
124 extern const std::string GerberJobFileExtension;
125 extern const std::string HtmlFileExtension;
126 extern const std::string EquFileExtension;
127 
128 extern const std::string LegacyPcbFileExtension;
129 extern const std::string KiCadPcbFileExtension;
130 #define PcbFileExtension KiCadPcbFileExtension // symlink choice
131 extern const std::string KiCadSymbolLibFileExtension;
132 extern const std::string PageLayoutDescrFileExtension;
133 
134 extern const std::string LegacyFootprintLibPathExtension;
135 extern const std::string PdfFileExtension;
136 extern const std::string MacrosFileExtension;
137 extern const std::string ComponentFileExtension;
138 extern const std::string DrillFileExtension;
139 extern const std::string SVGFileExtension;
140 extern const std::string ReportFileExtension;
141 extern const std::string FootprintPlaceFileExtension;
142 extern const std::string KiCadFootprintFileExtension;
143 extern const std::string KiCadFootprintLibPathExtension;
144 extern const std::string GedaPcbFootprintLibFileExtension;
145 extern const std::string EagleFootprintLibPathExtension;
146 extern const std::string ComponentFileExtension;
147 extern const std::string PageLayoutDescrFileExtension;
148 extern const std::string SpecctraDsnFileExtension;
149 extern const std::string IpcD356FileExtension;
150 
151 extern const std::string PngFileExtension;
152 extern const std::string JpegFileExtension;
153 
154 
155 bool IsProtelExtension( const wxString& ext );
156 
172 extern wxString AllFilesWildcard();
173 
174 extern wxString ComponentFileWildcard();
175 extern wxString PageLayoutDescrFileWildcard();
176 extern wxString SchematicSymbolFileWildcard();
177 extern wxString KiCadSymbolLibFileWildcard();
178 extern wxString LegacySymbolLibFileWildcard();
179 extern wxString ProjectFileWildcard();
180 extern wxString LegacyProjectFileWildcard();
181 extern wxString AllProjectFilesWildcard();
182 extern wxString KiCadSchematicFileWildcard();
183 extern wxString LegacySchematicFileWildcard();
184 extern wxString BoardFileWildcard();
185 extern wxString NetlistFileWildcard();
186 extern wxString GerberFileWildcard();
187 extern wxString HtmlFileWildcard();
188 extern wxString CsvFileWildcard();
189 extern wxString LegacyPcbFileWildcard();
190 extern wxString PcbFileWildcard();
191 extern wxString EaglePcbFileWildcard();
192 extern wxString EagleSchematicFileWildcard();
193 extern wxString EagleFilesWildcard();
194 extern wxString PCadPcbFileWildcard();
195 extern wxString AltiumDesignerPcbFileWildcard();
196 extern wxString AltiumCircuitStudioPcbFileWildcard();
197 extern wxString AltiumCircuitMakerPcbFileWildcard();
198 extern wxString PdfFileWildcard();
199 extern wxString PSFileWildcard();
200 extern wxString MacrosFileWildcard();
201 extern wxString ComponentFileWildcard();
202 extern wxString DrillFileWildcard();
203 extern wxString SVGFileWildcard();
204 extern wxString ReportFileWildcard();
205 extern wxString FootprintPlaceFileWildcard();
206 extern wxString Shapes3DFileWildcard();
207 extern wxString IDF3DFileWildcard();
208 extern wxString DocModulesFileName();
209 extern wxString LegacyFootprintLibPathWildcard();
210 extern wxString KiCadFootprintLibFileWildcard();
211 extern wxString KiCadFootprintLibPathWildcard();
212 extern wxString GedaPcbFootprintLibFileWildcard();
213 extern wxString EagleFootprintLibPathWildcard();
214 extern wxString TextFileWildcard();
215 extern wxString ModLegacyExportFileWildcard();
216 extern wxString ErcFileWildcard();
217 extern wxString SpiceLibraryFileWildcard();
218 extern wxString SpiceNetlistFileWildcard();
219 extern wxString CadstarNetlistFileWildcard();
220 extern wxString EquFileWildcard();
221 extern wxString ZipFileWildcard();
222 extern wxString GencadFileWildcard();
223 extern wxString DxfFileWildcard();
224 extern wxString GerberJobFileWildcard();
225 extern wxString SpecctraDsnFileWildcard();
226 extern wxString IpcD356FileWildcard();
227 extern wxString WorkbookFileWildcard();
228 extern wxString PngFileWildcard();
229 extern wxString JpegFileWildcard();
230 
235 #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()
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
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 LegacyPcbFileWildcard()
wxString PSFileWildcard()
wxString GencadFileWildcard()
wxString ReportFileWildcard()
wxString NetlistFileWildcard()
wxString HtmlFileWildcard()
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 WorkbookFileWildcard()
wxString PCadPcbFileWildcard()
const std::string KiCadFootprintLibPathExtension
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 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 KiCadSymbolLibFileExtension