KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 The 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 <kicommon.h>
36#include <string>
37#include <vector>
38#include <wx/string.h>
39
56KICOMMON_API bool compareFileExtensions( const std::string& aExtension,
57 const std::vector<std::string>& aReference, bool aCaseSensitive = false );
58
77KICOMMON_API wxString AddFileExtListToFilter( const std::vector<std::string>& aExts );
78
97KICOMMON_API wxString formatWildcardExt( const wxString& aWildcard );
98
99
101{
102public:
103 FILEEXT() = delete;
104
116 static const std::string BackupFileSuffix;
117 static const std::string LockFilePrefix;
118 static const std::string LockFileExtension;
119 static const std::string AutoSaveFilePrefix;
120
121 static const std::string SchematicSymbolFileExtension;
122 static const std::string LegacySymbolLibFileExtension;
123 static const std::string LegacySymbolDocumentFileExtension;
124 static const std::string SchematicBackupFileExtension;
125
126 static const std::string VrmlFileExtension;
127 static const std::string ProjectFileExtension;
128 static const std::string LegacyProjectFileExtension;
129 static const std::string ProjectLocalSettingsFileExtension;
130 static const std::string LegacySchematicFileExtension;
131 static const std::string CadstarSchematicFileExtension;
132 static const std::string CadstarPartsLibraryFileExtension;
133 static const std::string KiCadSchematicFileExtension;
134 static const std::string IbisFileExtension;
135 static const std::string SpiceFileExtension;
136 static const std::string SpiceModelFileExtension;
137 static const std::string SpiceSubcircuitFileExtension;
138 static const std::string CadstarNetlistFileExtension;
139 static const std::string OrCadPcb2NetlistFileExtension;
140 static const std::string NetlistFileExtension;
141 static const std::string AllegroNetlistFileExtension;
142 static const std::string PADSNetlistFileExtension;
143 static const std::string GerberFileExtension;
144 static const std::string GerberJobFileExtension;
145 static const std::string HtmlFileExtension;
146 static const std::string EquFileExtension;
147 static const std::string HotkeyFileExtension;
148 static const std::string DatabaseLibraryFileExtension;
149 static const std::string HTTPLibraryFileExtension;
150
151 static const std::string ArchiveFileExtension;
152
153 static const std::string LegacyPcbFileExtension;
154 static const std::string EaglePcbFileExtension;
155 static const std::string CadstarPcbFileExtension;
156 static const std::string KiCadPcbFileExtension;
157 #define PcbFileExtension KiCadPcbFileExtension // symlink choice
158 static const std::string KiCadSymbolLibFileExtension;
159 static const std::string DrawingSheetFileExtension;
160 static const std::string DesignRulesFileExtension;
161
162 static const std::string LegacyFootprintLibPathExtension;
163 static const std::string PdfFileExtension;
164 static const std::string MacrosFileExtension;
165 static const std::string FootprintAssignmentFileExtension;
166 static const std::string DrillFileExtension;
167 static const std::string SVGFileExtension;
168 static const std::string ReportFileExtension;
169 static const std::string FootprintPlaceFileExtension;
170 static const std::string KiCadFootprintFileExtension;
171 static const std::string KiCadFootprintLibPathExtension;
172 static const std::string AltiumFootprintLibPathExtension;
173 static const std::string CadstarFootprintLibPathExtension;
174 static const std::string GedaPcbFootprintLibFileExtension;
175 static const std::string EagleFootprintLibPathExtension;
176 static const std::string SpecctraDsnFileExtension;
177 static const std::string SpecctraSessionFileExtension;
178 static const std::string IpcD356FileExtension;
179 static const std::string Ipc2581FileExtension;
180 static const std::string WorkbookFileExtension;
181
182 static const std::string KiCadDesignBlockLibPathExtension;
183 static const std::string KiCadDesignBlockPathExtension;
184
185 static const std::string PngFileExtension;
186 static const std::string JpegFileExtension;
187 static const std::string TextFileExtension;
188 static const std::string MarkdownFileExtension;
189 static const std::string CsvFileExtension;
190 static const std::string XmlFileExtension;
191 static const std::string JsonFileExtension;
192 static const std::string PythonFileExtension;
193
194 static const std::string StepFileExtension;
195 static const std::string StepFileAbrvExtension;
196 static const std::string GltfBinaryFileExtension;
197 static const std::string BrepFileExtension;
198 static const std::string XaoFileExtension;
199 static const std::string PlyFileExtension;
200 static const std::string StlFileExtension;
201
202 static const std::string GencadFileExtension;
203
204 static const std::string KiCadJobSetFileExtension;
205
206 static const wxString GerberFileExtensionsRegex;
207
208 static const std::string FootprintLibraryTableFileName;
209 static const std::string SymbolLibraryTableFileName;
210 static const std::string DesignBlockLibraryTableFileName;
211
212 static const std::string KiCadUriPrefix;
213
229 static bool IsGerberFileExtension( const wxString& ext );
230 static wxString AllFilesWildcard();
231
232 static wxString FootprintAssignmentFileWildcard();
233 static wxString DrawingSheetFileWildcard();
234 static wxString KiCadSymbolLibFileWildcard();
235 static wxString ProjectFileWildcard();
236 static wxString LegacyProjectFileWildcard();
237 static wxString AllProjectFilesWildcard();
238 static wxString AllSchematicFilesWildcard();
239 static wxString KiCadSchematicFileWildcard();
240 static wxString LegacySchematicFileWildcard();
241 static wxString BoardFileWildcard();
242 static wxString OrCadPcb2NetlistFileWildcard();
243 static wxString NetlistFileWildcard();
244 static wxString AllegroNetlistFileWildcard();
245 static wxString PADSNetlistFileWildcard();
246 static wxString HtmlFileWildcard();
247 static wxString CsvFileWildcard();
248 static wxString PcbFileWildcard();
249 static wxString CadstarArchiveFilesWildcard();
250 static wxString EagleFilesWildcard();
251 static wxString EasyEdaArchiveWildcard();
252 static wxString EasyEdaProFileWildcard();
253 static wxString PdfFileWildcard();
254 static wxString PSFileWildcard();
255 static wxString MacrosFileWildcard();
256 static wxString DrillFileWildcard();
257 static wxString SVGFileWildcard();
258 static wxString JsonFileWildcard();
259 static wxString ReportFileWildcard();
260 static wxString FootprintPlaceFileWildcard();
261 static wxString Shapes3DFileWildcard();
262 static wxString IDF3DFileWildcard();
263 static wxString DocModulesFileName();
264 static wxString KiCadFootprintLibFileWildcard();
265 static wxString KiCadFootprintLibPathWildcard();
266 static wxString KiCadDesignBlockLibPathWildcard();
267 static wxString KiCadDesignBlockPathWildcard();
268 static wxString TextFileWildcard();
269 static wxString ModLegacyExportFileWildcard();
270 static wxString ErcFileWildcard();
271 static wxString SpiceLibraryFileWildcard();
272 static wxString SpiceNetlistFileWildcard();
273 static wxString CadstarNetlistFileWildcard();
274 static wxString EquFileWildcard();
275 static wxString ZipFileWildcard();
276 static wxString GencadFileWildcard();
277 static wxString DxfFileWildcard();
278 static wxString GerberJobFileWildcard();
279 static wxString SpecctraDsnFileWildcard();
280 static wxString SpecctraSessionFileWildcard();
281 static wxString IpcD356FileWildcard();
282 static wxString WorkbookFileWildcard();
283 static wxString PngFileWildcard();
284 static wxString JpegFileWildcard();
285 static wxString HotkeyFileWildcard();
286 static wxString JobsetFileWildcard();
287
291};
292
293
294#endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_
FILEEXT()=delete
static const std::string CadstarNetlistFileExtension
static const std::string LegacySchematicFileExtension
static const std::string KiCadDesignBlockLibPathExtension
static const std::string HtmlFileExtension
static const wxString GerberFileExtensionsRegex
static const std::string BrepFileExtension
static const std::string CadstarPartsLibraryFileExtension
static const std::string NetlistFileExtension
static const std::string KiCadDesignBlockPathExtension
static const std::string SymbolLibraryTableFileName
static const std::string JpegFileExtension
static const std::string GerberJobFileExtension
static const std::string StepFileAbrvExtension
static const std::string GerberFileExtension
static const std::string XaoFileExtension
static const std::string WorkbookFileExtension
static const std::string ReportFileExtension
static const std::string GltfBinaryFileExtension
static const std::string EquFileExtension
static const std::string LockFileExtension
static const std::string ProjectFileExtension
static const std::string PngFileExtension
static const std::string FootprintPlaceFileExtension
static const std::string JsonFileExtension
static const std::string AltiumFootprintLibPathExtension
static const std::string LegacyPcbFileExtension
static const std::string SchematicSymbolFileExtension
static const std::string XmlFileExtension
static const std::string LegacyProjectFileExtension
static const std::string ProjectLocalSettingsFileExtension
static const std::string EagleFootprintLibPathExtension
static const std::string KiCadSchematicFileExtension
static const std::string OrCadPcb2NetlistFileExtension
static const std::string LegacySymbolLibFileExtension
static const std::string KiCadUriPrefix
static const std::string DesignBlockLibraryTableFileName
static const std::string SchematicBackupFileExtension
static const std::string LockFilePrefix
static const std::string CsvFileExtension
static const std::string KiCadSymbolLibFileExtension
static const std::string SpiceFileExtension
static const std::string PdfFileExtension
static const std::string TextFileExtension
static const std::string Ipc2581FileExtension
static const std::string FootprintLibraryTableFileName
static const std::string PADSNetlistFileExtension
static const std::string GencadFileExtension
static const std::string StlFileExtension
static const std::string DrawingSheetFileExtension
static const std::string BackupFileSuffix
static const std::string AutoSaveFilePrefix
static const std::string IbisFileExtension
static const std::string IpcD356FileExtension
static const std::string KiCadJobSetFileExtension
static const std::string CadstarFootprintLibPathExtension
static const std::string GedaPcbFootprintLibFileExtension
static const std::string DatabaseLibraryFileExtension
static const std::string LegacyFootprintLibPathExtension
static const std::string CadstarSchematicFileExtension
static const std::string PlyFileExtension
static const std::string PythonFileExtension
static const std::string SpecctraDsnFileExtension
static const std::string StepFileExtension
static const std::string LegacySymbolDocumentFileExtension
static const std::string KiCadFootprintLibPathExtension
static const std::string FootprintAssignmentFileExtension
static const std::string SVGFileExtension
static const std::string EaglePcbFileExtension
static const std::string SpecctraSessionFileExtension
static const std::string HTTPLibraryFileExtension
static const std::string DrillFileExtension
static const std::string SpiceSubcircuitFileExtension
static const std::string MacrosFileExtension
static const std::string HotkeyFileExtension
static const std::string CadstarPcbFileExtension
static const std::string SpiceModelFileExtension
static const std::string DesignRulesFileExtension
static const std::string VrmlFileExtension
static const std::string MarkdownFileExtension
static const std::string KiCadFootprintFileExtension
static const std::string ArchiveFileExtension
static const std::string AllegroNetlistFileExtension
static const std::string KiCadPcbFileExtension
static wxString MacrosFileWildcard()
static wxString DocModulesFileName()
static wxString BoardFileWildcard()
#define KICOMMON_API
Definition: kicommon.h:28
KICOMMON_API wxString formatWildcardExt(const wxString &aWildcard)
Format wildcard extension to support case sensitive file dialogs.
KICOMMON_API wxString AddFileExtListToFilter(const std::vector< std::string > &aExts)
Build the wildcard extension file dialog wildcard filter to add to the base message dialog.
KICOMMON_API 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...