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 SchematicLibraryFileExtension;
114 extern const std::string SchematicBackupFileExtension;
115 
116 extern const std::string VrmlFileExtension;
117 extern const std::string ProjectFileExtension;
118 extern const std::string LegacySchematicFileExtension;
119 extern const std::string KiCadSchematicFileExtension;
120 extern const std::string NetlistFileExtension;
121 extern const std::string GerberFileExtension;
122 extern const std::string GerberJobFileExtension;
123 extern const std::string HtmlFileExtension;
124 extern const std::string EquFileExtension;
125 
126 extern const std::string LegacyPcbFileExtension;
127 extern const std::string KiCadPcbFileExtension;
128 #define PcbFileExtension KiCadPcbFileExtension // symlink choice
129 extern const std::string KiCadSymbolLibFileExtension;
130 extern const std::string PageLayoutDescrFileExtension;
131 
132 extern const std::string LegacyFootprintLibPathExtension;
133 extern const std::string PdfFileExtension;
134 extern const std::string MacrosFileExtension;
135 extern const std::string ComponentFileExtension;
136 extern const std::string DrillFileExtension;
137 extern const std::string SVGFileExtension;
138 extern const std::string ReportFileExtension;
139 extern const std::string FootprintPlaceFileExtension;
140 extern const std::string KiCadFootprintFileExtension;
141 extern const std::string KiCadFootprintLibPathExtension;
142 extern const std::string GedaPcbFootprintLibFileExtension;
143 extern const std::string EagleFootprintLibPathExtension;
144 extern const std::string ComponentFileExtension;
145 extern const std::string PageLayoutDescrFileExtension;
146 extern const std::string SpecctraDsnFileExtension;
147 extern const std::string IpcD356FileExtension;
148 
149 extern const std::string PngFileExtension;
150 extern const std::string JpegFileExtension;
151 
152 
153 bool IsProtelExtension( const wxString& ext );
154 
170 extern wxString AllFilesWildcard();
171 
172 extern wxString ComponentFileWildcard();
173 extern wxString PageLayoutDescrFileWildcard();
174 extern wxString SchematicSymbolFileWildcard();
175 extern wxString KiCadSymbolLibFileWildcard();
176 extern wxString SchematicLibraryFileWildcard();
177 extern wxString ProjectFileWildcard();
178 extern wxString KiCadSchematicFileWildcard();
179 extern wxString LegacySchematicFileWildcard();
180 extern wxString BoardFileWildcard();
181 extern wxString NetlistFileWildcard();
182 extern wxString GerberFileWildcard();
183 extern wxString HtmlFileWildcard();
184 extern wxString CsvFileWildcard();
185 extern wxString LegacyPcbFileWildcard();
186 extern wxString PcbFileWildcard();
187 extern wxString EaglePcbFileWildcard();
188 extern wxString EagleSchematicFileWildcard();
189 extern wxString EagleFilesWildcard();
190 extern wxString PCadPcbFileWildcard();
191 extern wxString PdfFileWildcard();
192 extern wxString PSFileWildcard();
193 extern wxString MacrosFileWildcard();
194 extern wxString ComponentFileWildcard();
195 extern wxString DrillFileWildcard();
196 extern wxString SVGFileWildcard();
197 extern wxString ReportFileWildcard();
198 extern wxString FootprintPlaceFileWildcard();
199 extern wxString Shapes3DFileWildcard();
200 extern wxString IDF3DFileWildcard();
201 extern wxString DocModulesFileName();
202 extern wxString LegacyFootprintLibPathWildcard();
203 extern wxString KiCadFootprintLibFileWildcard();
204 extern wxString KiCadFootprintLibPathWildcard();
205 extern wxString GedaPcbFootprintLibFileWildcard();
206 extern wxString EagleFootprintLibPathWildcard();
207 extern wxString TextFileWildcard();
208 extern wxString ModLegacyExportFileWildcard();
209 extern wxString ErcFileWildcard();
210 extern wxString SpiceLibraryFileWildcard();
211 extern wxString SpiceNetlistFileWildcard();
212 extern wxString CadstarNetlistFileWildcard();
213 extern wxString EquFileWildcard();
214 extern wxString ZipFileWildcard();
215 extern wxString GencadFileWildcard();
216 extern wxString DxfFileWildcard();
217 extern wxString GerberJobFileWildcard();
218 extern wxString SpecctraDsnFileWildcard();
219 extern wxString IpcD356FileWildcard();
220 extern wxString WorkbookFileWildcard();
221 extern wxString PngFileWildcard();
222 extern wxString JpegFileWildcard();
223 
228 #endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_
const std::string SchematicBackupFileExtension
const std::string NetlistFileExtension
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 ComponentFileWildcard()
const std::string KiCadFootprintFileExtension
wxString SpiceNetlistFileWildcard()
const std::string ProjectFileExtension
wxString PdfFileWildcard()
const std::string LegacyPcbFileExtension
wxString KiCadSchematicFileWildcard()
wxString DxfFileWildcard()
wxString SchematicLibraryFileWildcard()
wxString ZipFileWildcard()
const std::string SchematicSymbolFileExtension
const std::string EagleFootprintLibPathExtension
wxString CsvFileWildcard()
const std::string ComponentFileExtension
wxString JpegFileWildcard()
const std::string GerberFileExtension
const std::string KiCadPcbFileExtension
const std::string MacrosFileExtension
wxString LegacyFootprintLibPathWildcard()
wxString AllFilesWildcard()
bool IsProtelExtension(const wxString &ext)
wxString EquFileWildcard()
wxString DocModulesFileName()
const std::string HtmlFileExtension
wxString LegacyPcbFileWildcard()
wxString PSFileWildcard()
wxString GencadFileWildcard()
wxString ReportFileWildcard()
const std::string SchematicLibraryFileExtension
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()
const std::string IpcD356FileExtension
const std::string PdfFileExtension
wxString DrillFileWildcard()
const std::string LegacySchematicFileExtension
const std::string SpecctraDsnFileExtension
const std::string PageLayoutDescrFileExtension
wxString IpcD356FileWildcard()
wxString PngFileWildcard()
const std::string EquFileExtension
wxString ProjectFileWildcard()
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