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-2023 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
120 static const std::string SchematicSymbolFileExtension;
121 static const std::string LegacySymbolLibFileExtension;
122 static const std::string LegacySymbolDocumentFileExtension;
123 static const std::string SchematicBackupFileExtension;
124
125 static const std::string VrmlFileExtension;
126 static const std::string ProjectFileExtension;
127 static const std::string LegacyProjectFileExtension;
128 static const std::string ProjectLocalSettingsFileExtension;
129 static const std::string LegacySchematicFileExtension;
130 static const std::string CadstarSchematicFileExtension;
131 static const std::string CadstarPartsLibraryFileExtension;
132 static const std::string KiCadSchematicFileExtension;
133 static const std::string SpiceFileExtension;
134 static const std::string CadstarNetlistFileExtension;
135 static const std::string OrCadPcb2NetlistFileExtension;
136 static const std::string NetlistFileExtension;
137 static const std::string AllegroNetlistFileExtension;
138 static const std::string PADSNetlistFileExtension;
139 static const std::string GerberFileExtension;
140 static const std::string GerberJobFileExtension;
141 static const std::string HtmlFileExtension;
142 static const std::string EquFileExtension;
143 static const std::string HotkeyFileExtension;
144 static const std::string DatabaseLibraryFileExtension;
145 static const std::string HTTPLibraryFileExtension;
146
147 static const std::string ArchiveFileExtension;
148
149 static const std::string LegacyPcbFileExtension;
150 static const std::string EaglePcbFileExtension;
151 static const std::string CadstarPcbFileExtension;
152 static const std::string KiCadPcbFileExtension;
153 #define PcbFileExtension KiCadPcbFileExtension // symlink choice
154 static const std::string KiCadSymbolLibFileExtension;
155 static const std::string DrawingSheetFileExtension;
156 static const std::string DesignRulesFileExtension;
157
158 static const std::string LegacyFootprintLibPathExtension;
159 static const std::string PdfFileExtension;
160 static const std::string MacrosFileExtension;
161 static const std::string FootprintAssignmentFileExtension;
162 static const std::string DrillFileExtension;
163 static const std::string SVGFileExtension;
164 static const std::string ReportFileExtension;
165 static const std::string FootprintPlaceFileExtension;
166 static const std::string KiCadFootprintFileExtension;
167 static const std::string KiCadFootprintLibPathExtension;
168 static const std::string AltiumFootprintLibPathExtension;
169 static const std::string CadstarFootprintLibPathExtension;
170 static const std::string GedaPcbFootprintLibFileExtension;
171 static const std::string EagleFootprintLibPathExtension;
172 static const std::string SpecctraDsnFileExtension;
173 static const std::string SpecctraSessionFileExtension;
174 static const std::string IpcD356FileExtension;
175 static const std::string Ipc2581FileExtension;
176 static const std::string WorkbookFileExtension;
177
178 static const std::string PngFileExtension;
179 static const std::string JpegFileExtension;
180 static const std::string TextFileExtension;
181 static const std::string MarkdownFileExtension;
182 static const std::string CsvFileExtension;
183 static const std::string XmlFileExtension;
184 static const std::string JsonFileExtension;
185
186 static const std::string StepFileExtension;
187 static const std::string StepFileAbrvExtension;
188 static const std::string GltfBinaryFileExtension;
189 static const std::string BrepFileExtension;
190
191 static const wxString GerberFileExtensionsRegex;
192
208 static bool IsGerberFileExtension( const wxString& ext );
209 static wxString AllFilesWildcard();
210
211 static wxString FootprintAssignmentFileWildcard();
212 static wxString DrawingSheetFileWildcard();
213 static wxString KiCadSymbolLibFileWildcard();
214 static wxString ProjectFileWildcard();
215 static wxString LegacyProjectFileWildcard();
216 static wxString AllProjectFilesWildcard();
217 static wxString AllSchematicFilesWildcard();
218 static wxString KiCadSchematicFileWildcard();
219 static wxString LegacySchematicFileWildcard();
220 static wxString BoardFileWildcard();
221 static wxString OrCadPcb2NetlistFileWildcard();
222 static wxString NetlistFileWildcard();
223 static wxString AllegroNetlistFileWildcard();
224 static wxString PADSNetlistFileWildcard();
225 static wxString HtmlFileWildcard();
226 static wxString CsvFileWildcard();
227 static wxString PcbFileWildcard();
228 static wxString CadstarArchiveFilesWildcard();
229 static wxString EagleFilesWildcard();
230 static wxString EasyEdaArchiveWildcard();
231 static wxString EasyEdaProFileWildcard();
232 static wxString PdfFileWildcard();
233 static wxString PSFileWildcard();
234 static wxString MacrosFileWildcard();
235 static wxString DrillFileWildcard();
236 static wxString SVGFileWildcard();
237 static wxString JsonFileWildcard();
238 static wxString ReportFileWildcard();
239 static wxString FootprintPlaceFileWildcard();
240 static wxString Shapes3DFileWildcard();
241 static wxString IDF3DFileWildcard();
242 static wxString DocModulesFileName();
243 static wxString KiCadFootprintLibFileWildcard();
244 static wxString KiCadFootprintLibPathWildcard();
245 static wxString TextFileWildcard();
246 static wxString ModLegacyExportFileWildcard();
247 static wxString ErcFileWildcard();
248 static wxString SpiceLibraryFileWildcard();
249 static wxString SpiceNetlistFileWildcard();
250 static wxString CadstarNetlistFileWildcard();
251 static wxString EquFileWildcard();
252 static wxString ZipFileWildcard();
253 static wxString GencadFileWildcard();
254 static wxString DxfFileWildcard();
255 static wxString GerberJobFileWildcard();
256 static wxString SpecctraDsnFileWildcard();
257 static wxString SpecctraSessionFileWildcard();
258 static wxString IpcD356FileWildcard();
259 static wxString WorkbookFileWildcard();
260 static wxString PngFileWildcard();
261 static wxString JpegFileWildcard();
262 static wxString HotkeyFileWildcard();
263
267};
268
269
270#endif // INCLUDE_WILDCARDS_AND_FILES_EXT_H_
FILEEXT()=delete
static const std::string CadstarNetlistFileExtension
static const std::string LegacySchematicFileExtension
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 JpegFileExtension
static const std::string GerberJobFileExtension
static const std::string StepFileAbrvExtension
static const std::string GerberFileExtension
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 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 IpcD356FileExtension
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...