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

◆ ComponentFileExtension()

const std::string ComponentFileExtension ( "cmp"  )

◆ DrillFileExtension()

const std::string DrillFileExtension ( "drl"  )

◆ EagleFootprintLibPathExtension()

const std::string EagleFootprintLibPathExtension ( "lbr"  )

◆ FootprintPlaceFileExtension()

const std::string FootprintPlaceFileExtension ( "pos"  )

◆ formatWildcardExt()

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.

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

References Format().

Referenced by AddFileExtListToFilter().

◆ GedaPcbFootprintLibFileExtension()

const std::string GedaPcbFootprintLibFileExtension ( "fp"  )

◆ GerberFileExtension()

const std::string GerberFileExtension ( "gbr"  )

◆ GerberJobFileExtension()

const std::string GerberJobFileExtension ( "gbrjob"  )

◆ HtmlFileExtension()

const std::string HtmlFileExtension ( "html"  )

◆ IpcD356FileExtension()

const std::string IpcD356FileExtension ( "d356"  )

◆ JpegFileExtension()

const std::string JpegFileExtension ( "jpg"  )

◆ KiCadFootprintFileExtension()

const std::string KiCadFootprintFileExtension ( "kicad_mod"  )

◆ KiCadFootprintLibPathExtension()

const std::string KiCadFootprintLibPathExtension ( "pretty"  )

KICAD PLUGIN libpath.

◆ KiCadLib3DShapesPathExtension()

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

3D shapes default libpath

◆ KiCadPcbFileExtension()

const std::string KiCadPcbFileExtension ( "kicad_pcb"  )

◆ LegacyFootprintLibPathExtension()

const std::string LegacyFootprintLibPathExtension ( "mod"  )

◆ LegacyPcbFileExtension()

const std::string LegacyPcbFileExtension ( "brd"  )

◆ MacrosFileExtension()

const std::string MacrosFileExtension ( "mcr"  )

◆ NetlistFileExtension()

const std::string NetlistFileExtension ( "net"  )

◆ PageLayoutDescrFileExtension()

const std::string PageLayoutDescrFileExtension ( "kicad_wks"  )

◆ PdfFileExtension()

const std::string PdfFileExtension ( "pdf"  )

◆ PngFileExtension()

const std::string PngFileExtension ( "png"  )

◆ ProjectFileExtension()

const std::string ProjectFileExtension ( "pro"  )

◆ ReportFileExtension()

const std::string ReportFileExtension ( "rpt"  )

◆ SchematicBackupFileExtension()

const std::string SchematicBackupFileExtension ( "bak"  )

◆ SchematicFileExtension()

const std::string SchematicFileExtension ( "sch"  )

◆ SchematicLibraryFileExtension()

const std::string SchematicLibraryFileExtension ( "lib"  )

◆ SchematicSymbolFileExtension()

const std::string SchematicSymbolFileExtension ( "sym"  )

◆ SpecctraDsnFileExtension()

const std::string SpecctraDsnFileExtension ( "dsn"  )

◆ SVGFileExtension()

const std::string SVGFileExtension ( "svg"  )

◆ VrmlFileExtension()

const std::string VrmlFileExtension ( "wrl"  )