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 (C) 1992-2024 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 SpiceFileExtension;
135 static const std::string CadstarNetlistFileExtension;
136 static const std::string OrCadPcb2NetlistFileExtension;
137 static const std::string NetlistFileExtension;
138 static const std::string AllegroNetlistFileExtension;
139 static const std::string PADSNetlistFileExtension;
140 static const std::string GerberFileExtension;
141 static const std::string GerberJobFileExtension;
142 static const std::string HtmlFileExtension;
143 static const std::string EquFileExtension;
144 static const std::string HotkeyFileExtension;
145 static const std::string DatabaseLibraryFileExtension;
146 static const std::string HTTPLibraryFileExtension;
147
148 static const std::string ArchiveFileExtension;
149
150 static const std::string LegacyPcbFileExtension;
151 static const std::string EaglePcbFileExtension;
152 static const std::string CadstarPcbFileExtension;
153 static const std::string KiCadPcbFileExtension;
154 #define PcbFileExtension KiCadPcbFileExtension // symlink choice
155 static const std::string KiCadSymbolLibFileExtension;
156 static const std::string DrawingSheetFileExtension;
157 static const std::string DesignRulesFileExtension;
158
159 static const std::string LegacyFootprintLibPathExtension;
160 static const std::string PdfFileExtension;
161 static const std::string MacrosFileExtension;
162 static const std::string FootprintAssignmentFileExtension;
163 static const std::string DrillFileExtension;
164 static const std::string SVGFileExtension;
165 static const std::string ReportFileExtension;
166 static const std::string FootprintPlaceFileExtension;
167 static const std::string KiCadFootprintFileExtension;
168 static const std::string KiCadFootprintLibPathExtension;
169 static const std::string AltiumFootprintLibPathExtension;
170 static const std::string CadstarFootprintLibPathExtension;
171 static const std::string GedaPcbFootprintLibFileExtension;
172 static const std::string EagleFootprintLibPathExtension;
173 static const std::string SpecctraDsnFileExtension;
174 static const std::string SpecctraSessionFileExtension;
175 static const std::string IpcD356FileExtension;
176 static const std::string Ipc2581FileExtension;
177 static const std::string WorkbookFileExtension;
178
179 static const std::string KiCadDesignBlockLibPathExtension;
180 static const std::string KiCadDesignBlockPathExtension;
181
182 static const std::string PngFileExtension;
183 static const std::string JpegFileExtension;
184 static const std::string TextFileExtension;
185 static const std::string MarkdownFileExtension;
186 static const std::string CsvFileExtension;
187 static const std::string XmlFileExtension;
188 static const std::string JsonFileExtension;
189
190 static const std::string StepFileExtension;
191 static const std::string StepFileAbrvExtension;
192 static const std::string GltfBinaryFileExtension;
193 static const std::string BrepFileExtension;
194 static const std::string XaoFileExtension;
195
196 static const std::string KiCadJobSetFileExtension;
197
198 static const wxString GerberFileExtensionsRegex;
199
200 static const std::string KiCadUriPrefix;
201
217 static bool IsGerberFileExtension( const wxString& ext );
218 static wxString AllFilesWildcard();
219
220 static wxString FootprintAssignmentFileWildcard();
221 static wxString DrawingSheetFileWildcard();
222 static wxString KiCadSymbolLibFileWildcard();
223 static wxString ProjectFileWildcard();
224 static wxString LegacyProjectFileWildcard();
225 static wxString AllProjectFilesWildcard();
226 static wxString AllSchematicFilesWildcard();
227 static wxString KiCadSchematicFileWildcard();
228 static wxString LegacySchematicFileWildcard();
229 static wxString BoardFileWildcard();
230 static wxString OrCadPcb2NetlistFileWildcard();
231 static wxString NetlistFileWildcard();
232 static wxString AllegroNetlistFileWildcard();
233 static wxString PADSNetlistFileWildcard();
234 static wxString HtmlFileWildcard();
235 static wxString CsvFileWildcard();
236 static wxString PcbFileWildcard();
237 static wxString CadstarArchiveFilesWildcard();
238 static wxString EagleFilesWildcard();
239 static wxString EasyEdaArchiveWildcard();
240 static wxString EasyEdaProFileWildcard();
241 static wxString PdfFileWildcard();
242 static wxString PSFileWildcard();
243 static wxString MacrosFileWildcard();
244 static wxString DrillFileWildcard();
245 static wxString SVGFileWildcard();
246 static wxString JsonFileWildcard();
247 static wxString ReportFileWildcard();
248 static wxString FootprintPlaceFileWildcard();
249 static wxString Shapes3DFileWildcard();
250 static wxString IDF3DFileWildcard();
251 static wxString DocModulesFileName();
252 static wxString KiCadFootprintLibFileWildcard();
253 static wxString KiCadFootprintLibPathWildcard();
254 static wxString KiCadDesignBlockLibPathWildcard();
255 static wxString KiCadDesignBlockPathWildcard();
256 static wxString TextFileWildcard();
257 static wxString ModLegacyExportFileWildcard();
258 static wxString ErcFileWildcard();
259 static wxString SpiceLibraryFileWildcard();
260 static wxString SpiceNetlistFileWildcard();
261 static wxString CadstarNetlistFileWildcard();
262 static wxString EquFileWildcard();
263 static wxString ZipFileWildcard();
264 static wxString GencadFileWildcard();
265 static wxString DxfFileWildcard();
266 static wxString GerberJobFileWildcard();
267 static wxString SpecctraDsnFileWildcard();
268 static wxString SpecctraSessionFileWildcard();
269 static wxString IpcD356FileWildcard();
270 static wxString WorkbookFileWildcard();
271 static wxString PngFileWildcard();
272 static wxString JpegFileWildcard();
273 static wxString HotkeyFileWildcard();
274 static wxString JobsetFileWildcard();
275
279};
280
281
282#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 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 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 PADSNetlistFileExtension
static const std::string DrawingSheetFileExtension
static const std::string BackupFileSuffix
static const std::string AutoSaveFilePrefix
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 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 MacrosFileExtension
static const std::string HotkeyFileExtension
static const std::string CadstarPcbFileExtension
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...