KiCad PCB EDA Suite
File Extension Definitions


#define PcbFileExtension   KiCadPcbFileExtension


wxString AddFileExtListToFilter (const std::vector< std::string > &aExts)
 Build the wildcard extension file dialog wildcard filter to add to the base message dialog. More...


const std::string SchematicSymbolFileExtension
const std::string SchematicLibraryFileExtension
const std::string SchematicBackupFileExtension
const std::string VrmlFileExtension
const std::string ProjectFileExtension
const std::string SchematicFileExtension
const std::string NetlistFileExtension
const std::string GerberFileExtension
const std::string GerberJobFileExtension
const std::string HtmlFileExtension
const std::string LegacyPcbFileExtension
const std::string KiCadPcbFileExtension
const std::string PageLayoutDescrFileExtension
const std::string LegacyFootprintLibPathExtension
const std::string PdfFileExtension
const std::string MacrosFileExtension
const std::string ComponentFileExtension
const std::string DrillFileExtension
const std::string SVGFileExtension
const std::string ReportFileExtension
const std::string FootprintPlaceFileExtension
const std::string KiCadFootprintFileExtension
const std::string KiCadFootprintLibPathExtension
const std::string GedaPcbFootprintLibFileExtension
const std::string EagleFootprintLibPathExtension
const std::string KiCadLib3DShapesPathExtension
const std::string SpecctraDsnFileExtension
const std::string IpcD356FileExtension
const std::string PngFileExtension
const std::string JpegFileExtension

Detailed Description

Please do not changes these. If a different file extension is needed, create a new definition in here. If you create a extension definition in another file, make sure to add it to the Doxygen group "file_extensions" using the "addtogroup" tag. Also note, just because they are defined as const doesn't guarantee that they cannot be changed.

Macro Definition Documentation

Function Documentation

wxString AddFileExtListToFilter ( const std::vector< std::string > &  aExts)

Build the wildcard extension file dialog wildcard filter to add to the base message dialog.

For instance, to open .txt files in a file dialog: the base message is for instance "Text files" the ext list is " (*.txt)|*.txt" and the returned string to add to the base message is " (*.txt)|*.txt" the message to display in the dialog is "Text files (*.txt)|*.txt"

This function produces a case-insensitive filter (so .txt, .TXT and .tXT are all match if you pass "txt" into the function).

aExtsis the list of exts to add to the filter. Do not include the leading dot. Empty means "allow all files".
the appropriate file dialog wildcard filter list.

Definition at line 71 of file wildcards_and_files_ext.cpp.

References ComponentFileExtension(), DrillFileExtension(), EagleFootprintLibPathExtension(), FootprintPlaceFileExtension(), formatWildcardExt(), GedaPcbFootprintLibFileExtension(), GerberFileExtension(), GerberJobFileExtension(), HtmlFileExtension(), IpcD356FileExtension(), JpegFileExtension(), KiCadFootprintFileExtension(), KiCadFootprintLibPathExtension(), KiCadLib3DShapesPathExtension(), KiCadPcbFileExtension(), LegacyFootprintLibPathExtension(), LegacyPcbFileExtension(), MacrosFileExtension(), NetlistFileExtension(), PageLayoutDescrFileExtension(), PdfFileExtension(), PngFileExtension(), ProjectFileExtension(), ReportFileExtension(), SchematicBackupFileExtension(), SchematicFileExtension(), SchematicLibraryFileExtension(), SchematicSymbolFileExtension(), SpecctraDsnFileExtension(), SVGFileExtension(), and VrmlFileExtension().

Referenced by AllFilesWildcard(), CadstarNetlistFileWildcard(), ComponentFileWildcard(), CsvFileWildcard(), DrillFileWildcard(), DxfFileWildcard(), EagleFilesWildcard(), EagleFootprintLibPathWildcard(), EaglePcbFileWildcard(), EagleSchematicFileWildcard(), EquFileWildcard(), ErcFileWildcard(), FootprintPlaceFileWildcard(), GedaPcbFootprintLibFileWildcard(), GencadFileWildcard(), GerberFileWildcard(), GerberJobFileWildcard(), HtmlFileWildcard(), IDF3DFileWildcard(), IpcD356FileWildcard(), JpegFileWildcard(), KiCadFootprintLibFileWildcard(), KiCadFootprintLibPathWildcard(), LegacyFootprintLibPathWildcard(), LegacyPcbFileWildcard(), ModLegacyExportFileWildcard(), NetlistFileWildcard(), PageLayoutDescrFileWildcard(), PCadPcbFileWildcard(), PcbFileWildcard(), PdfFileWildcard(), PngFileWildcard(), ProjectFileWildcard(), PSFileWildcard(), ReportFileWildcard(), SchematicFileWildcard(), SchematicLibraryFileWildcard(), SchematicSymbolFileWildcard(), Shapes3DFileWildcard(), SpecctraDsnFileWildcard(), SpiceLibraryFileWildcard(), SpiceNetlistFileWildcard(), SVGFileWildcard(), TextFileWildcard(), WorkbookFileWildcard(), and ZipFileWildcard().

72 {
73  if( aExts.size() == 0 )
74  {
75  // The "all files" wildcard is different on different systems
76  wxString filter;
77  filter << " (" << wxFileSelectorDefaultWildcardStr << ")|"
78  << wxFileSelectorDefaultWildcardStr;
79  return filter;
80  }
82  wxString files_filter = " (";
84  // Add extensions to the info message:
85  for( const auto& ext : aExts )
86  {
87  files_filter << " *." << ext;
88  }
90  files_filter << ")|*.";
92  // Add extensions to the filter list, using a formated string (GTK specific):
93  bool first = true;
94  for( const auto& ext : aExts )
95  {
96  if( !first )
97  files_filter << ";*.";
99  first = false;
101  files_filter << formatWildcardExt( ext );
102  }
104  return files_filter;
105 }
static wxString formatWildcardExt(const wxString &aWildcard)
Format wildcard extension to support case sensitive file dialogs.

Variable Documentation

const std::string ComponentFileExtension
const std::string EagleFootprintLibPathExtension
const std::string FootprintPlaceFileExtension
const std::string GedaPcbFootprintLibFileExtension
const std::string GerberFileExtension
const std::string GerberJobFileExtension
const std::string HtmlFileExtension
const std::string IpcD356FileExtension
const std::string JpegFileExtension
const std::string KiCadLib3DShapesPathExtension
const std::string LegacyFootprintLibPathExtension
const std::string MacrosFileExtension
const std::string NetlistFileExtension
const std::string PageLayoutDescrFileExtension
const std::string PdfFileExtension
const std::string PngFileExtension
const std::string SchematicBackupFileExtension
const std::string SchematicSymbolFileExtension
const std::string SpecctraDsnFileExtension
const std::string SVGFileExtension
const std::string VrmlFileExtension