KiCad PCB EDA Suite
wildcards_and_files_ext.cpp File Reference

Definition of file extensions used in Kicad. More...

Go to the source code of this file.

Functions

static wxString formatWildcardExt (const wxString &aWildcard)
 Format wildcard extension to support case sensitive file dialogs. More...
 
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 ("sym")
 
const std::string SchematicLibraryFileExtension ("lib")
 
const std::string SchematicBackupFileExtension ("bak")
 
const std::string VrmlFileExtension ("wrl")
 
const std::string ProjectFileExtension ("pro")
 
const std::string SchematicFileExtension ("sch")
 
const std::string NetlistFileExtension ("net")
 
const std::string ComponentFileExtension ("cmp")
 
const std::string GerberFileExtension ("gbr")
 
const std::string GerberJobFileExtension ("gbrjob")
 
const std::string HtmlFileExtension ("html")
 
const std::string LegacyPcbFileExtension ("brd")
 
const std::string KiCadPcbFileExtension ("kicad_pcb")
 
const std::string PageLayoutDescrFileExtension ("kicad_wks")
 
const std::string PdfFileExtension ("pdf")
 
const std::string MacrosFileExtension ("mcr")
 
const std::string DrillFileExtension ("drl")
 
const std::string SVGFileExtension ("svg")
 
const std::string ReportFileExtension ("rpt")
 
const std::string FootprintPlaceFileExtension ("pos")
 
const std::string KiCadLib3DShapesPathExtension ("3dshapes")
 3D shapes default libpath More...
 
const std::string KiCadFootprintLibPathExtension ("pretty")
 KICAD PLUGIN libpath. More...
 
const std::string LegacyFootprintLibPathExtension ("mod")
 
const std::string EagleFootprintLibPathExtension ("lbr")
 
const std::string KiCadFootprintFileExtension ("kicad_mod")
 
const std::string GedaPcbFootprintLibFileExtension ("fp")
 
const std::string SpecctraDsnFileExtension ("dsn")
 
const std::string IpcD356FileExtension ("d356")
 
const std::string PngFileExtension ("png")
 
const std::string JpegFileExtension ("jpg")
 
wxString AllFilesWildcard ()
 
wxString SchematicSymbolFileWildcard ()
 
wxString SchematicLibraryFileWildcard ()
 
wxString ProjectFileWildcard ()
 
wxString SchematicFileWildcard ()
 
wxString EagleSchematicFileWildcard ()
 
wxString EagleFilesWildcard ()
 
wxString NetlistFileWildcard ()
 
wxString GerberFileWildcard ()
 
wxString LegacyPcbFileWildcard ()
 
wxString EaglePcbFileWildcard ()
 
wxString PCadPcbFileWildcard ()
 
wxString PcbFileWildcard ()
 
wxString KiCadFootprintLibFileWildcard ()
 
wxString KiCadFootprintLibPathWildcard ()
 
wxString LegacyFootprintLibPathWildcard ()
 
wxString EagleFootprintLibPathWildcard ()
 
wxString GedaPcbFootprintLibFileWildcard ()
 
wxString PageLayoutDescrFileWildcard ()
 
wxString ComponentFileWildcard ()
 
wxString DrillFileWildcard ()
 
wxString SVGFileWildcard ()
 
wxString HtmlFileWildcard ()
 
wxString CsvFileWildcard ()
 
wxString PdfFileWildcard ()
 
wxString PSFileWildcard ()
 
wxString ReportFileWildcard ()
 
wxString FootprintPlaceFileWildcard ()
 
wxString Shapes3DFileWildcard ()
 
wxString IDF3DFileWildcard ()
 
wxString TextFileWildcard ()
 
wxString ModLegacyExportFileWildcard ()
 
wxString ErcFileWildcard ()
 
wxString SpiceLibraryFileWildcard ()
 
wxString SpiceNetlistFileWildcard ()
 
wxString CadstarNetlistFileWildcard ()
 
wxString EquFileWildcard ()
 
wxString ZipFileWildcard ()
 
wxString GencadFileWildcard ()
 
wxString DxfFileWildcard ()
 
wxString GerberJobFileWildcard ()
 
wxString SpecctraDsnFileWildcard ()
 
wxString IpcD356FileWildcard ()
 
wxString WorkbookFileWildcard ()
 
wxString PngFileWildcard ()
 
wxString JpegFileWildcard ()
 

Detailed Description

Definition of file extensions used in Kicad.

Definition in file wildcards_and_files_ext.cpp.

Function Documentation

const std::string ComponentFileExtension ( "cmp"  )

Referenced by AddFileExtListToFilter().

const std::string DrillFileExtension ( "drl"  )

Referenced by AddFileExtListToFilter().

const std::string EagleFootprintLibPathExtension ( "lbr"  )

Referenced by AddFileExtListToFilter().

const std::string FootprintPlaceFileExtension ( "pos"  )

Referenced by AddFileExtListToFilter().

static wxString formatWildcardExt ( const wxString &  aWildcard)
static

Format wildcard extension to support case sensitive file dialogs.

The file extension wildcards of the GTK+ file dialog are case sensitive so using all lower case characters means that only file extensions that are all lower case will show up in the file dialog. The GTK+ file dialog does support regular expressions so the file extension is converted to a regular expression ( sch -> [sS][cC][hH] ) when wxWidgets is built against GTK+. Please make sure you call this function when adding new file wildcards.

Note
When calling wxFileDialog with a default file defined, make sure you include the file extension along with the file name. Otherwise, on GTK+ builds, the file dialog will append the wildcard regular expression as the file extension which is surely not what you want.
Parameters
aWildcardis the extension part of the wild card.
Returns
the build appropriate file dialog wildcard filter.

Definition at line 50 of file wildcards_and_files_ext.cpp.

References Format().

Referenced by AddFileExtListToFilter().

51 {
52  wxString wc;
53 #if defined( __WXGTK__ )
54 
55  for( auto ch : aWildcard )
56  {
57  if( wxIsalpha( ch ) )
58  wc += wxString::Format( "[%c%c]", wxTolower( ch ), wxToupper( ch ) );
59  else
60  wc += ch;
61  }
62 
63  return wc;
64 #else
65  wc = aWildcard;
66 
67  return wc;
68 #endif
69 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205
const std::string GedaPcbFootprintLibFileExtension ( "fp"  )

Referenced by AddFileExtListToFilter().

const std::string GerberFileExtension ( "gbr"  )

Referenced by AddFileExtListToFilter().

const std::string GerberJobFileExtension ( "gbrjob"  )

Referenced by AddFileExtListToFilter().

const std::string HtmlFileExtension ( "html"  )

Referenced by AddFileExtListToFilter().

const std::string IpcD356FileExtension ( "d356"  )

Referenced by AddFileExtListToFilter().

const std::string JpegFileExtension ( "jpg"  )

Referenced by AddFileExtListToFilter().

const std::string KiCadFootprintFileExtension ( "kicad_mod"  )

Referenced by AddFileExtListToFilter().

const std::string KiCadFootprintLibPathExtension ( "pretty"  )

KICAD PLUGIN libpath.

Referenced by AddFileExtListToFilter().

const std::string KiCadLib3DShapesPathExtension ( "3dshapes"  )

3D shapes default libpath

Referenced by AddFileExtListToFilter().

const std::string KiCadPcbFileExtension ( "kicad_pcb"  )

Referenced by AddFileExtListToFilter().

const std::string LegacyFootprintLibPathExtension ( "mod"  )

Referenced by AddFileExtListToFilter().

const std::string LegacyPcbFileExtension ( "brd"  )

Referenced by AddFileExtListToFilter().

const std::string MacrosFileExtension ( "mcr"  )

Referenced by AddFileExtListToFilter().

const std::string NetlistFileExtension ( "net"  )

Referenced by AddFileExtListToFilter().

const std::string PageLayoutDescrFileExtension ( "kicad_wks"  )

Referenced by AddFileExtListToFilter().

const std::string PdfFileExtension ( "pdf"  )

Referenced by AddFileExtListToFilter().

const std::string PngFileExtension ( "png"  )

Referenced by AddFileExtListToFilter().

const std::string ProjectFileExtension ( "pro"  )

Referenced by AddFileExtListToFilter().

const std::string ReportFileExtension ( "rpt"  )

Referenced by AddFileExtListToFilter().

const std::string SchematicBackupFileExtension ( "bak"  )

Referenced by AddFileExtListToFilter().

const std::string SchematicFileExtension ( "sch"  )

Referenced by AddFileExtListToFilter().

const std::string SchematicLibraryFileExtension ( "lib"  )

Referenced by AddFileExtListToFilter().

const std::string SchematicSymbolFileExtension ( "sym"  )

Referenced by AddFileExtListToFilter().

const std::string SpecctraDsnFileExtension ( "dsn"  )

Referenced by AddFileExtListToFilter().

const std::string SVGFileExtension ( "svg"  )

Referenced by AddFileExtListToFilter().

const std::string VrmlFileExtension ( "wrl"  )

Referenced by AddFileExtListToFilter().