KiCad PCB EDA Suite
wildcards_and_files_ext.cpp File Reference

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...
 
const wxString SchematicSymbolFileExtension ("sym")
 
const wxString SchematicLibraryFileExtension ("lib")
 
const wxString SchematicBackupFileExtension ("bak")
 
const wxString VrmlFileExtension ("wrl")
 
const wxString ProjectFileExtension ("pro")
 
const wxString SchematicFileExtension ("sch")
 
const wxString NetlistFileExtension ("net")
 
const wxString ComponentFileExtension ("cmp")
 
const wxString GerberFileExtension ("gbr")
 
const wxString GerberJobFileExtension ("gbrjob")
 
const wxString HtmlFileExtension (wxT("html"))
 
const wxString LegacyPcbFileExtension ("brd")
 
const wxString KiCadPcbFileExtension ("kicad_pcb")
 
const wxString PageLayoutDescrFileExtension ("kicad_wks")
 
const wxString PdfFileExtension ("pdf")
 
const wxString MacrosFileExtension ("mcr")
 
const wxString DrillFileExtension ("drl")
 
const wxString SVGFileExtension ("svg")
 
const wxString ReportFileExtension ("rpt")
 
const wxString FootprintPlaceFileExtension ("pos")
 
const wxString KiCadLib3DShapesPathExtension ("3dshapes")
 3D shapes default libpath More...
 
const wxString KiCadFootprintLibPathExtension ("pretty")
 KICAD PLUGIN libpath. More...
 
const wxString LegacyFootprintLibPathExtension ("mod")
 
const wxString EagleFootprintLibPathExtension ("lbr")
 
const wxString KiCadFootprintFileExtension ("kicad_mod")
 
const wxString GedaPcbFootprintLibFileExtension ("fp")
 
const wxString SpecctraDsnFileExtension ("dsn")
 
const wxString IpcD356FileExtension ("d356")
 
const wxString AllFilesWildcard (_("All files (*)|*"))
 
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 ()
 

Function Documentation

const wxString AllFilesWildcard ( _("All files (*)|*")  )
const wxString ComponentFileExtension ( "cmp"  )
const wxString DrillFileExtension ( "drl"  )
const wxString EagleFootprintLibPathExtension ( "lbr"  )
const wxString FootprintPlaceFileExtension ( "pos"  )
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 49 of file wildcards_and_files_ext.cpp.

References Format().

Referenced by CadstarNetlistFileWildcard(), ComponentFileWildcard(), CsvFileWildcard(), DrillFileWildcard(), DxfFileWildcard(), EagleFilesWildcard(), EagleFootprintLibPathWildcard(), EaglePcbFileWildcard(), EagleSchematicFileWildcard(), EquFileWildcard(), ErcFileWildcard(), FootprintPlaceFileWildcard(), GedaPcbFootprintLibFileWildcard(), GencadFileWildcard(), GerberFileWildcard(), GerberJobFileWildcard(), HtmlFileWildcard(), IDF3DFileWildcard(), IpcD356FileWildcard(), 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().

50 {
51  wxString wc;
52 #if defined( __WXGTK__ )
53 
54  for( auto ch : aWildcard )
55  {
56  if( wxIsalpha( ch ) )
57  wc += wxString::Format( "[%c%c]", wxTolower( ch ), wxToupper( ch ) );
58  else
59  wc += ch;
60  }
61 
62  return wc;
63 #else
64  wc = aWildcard;
65 
66  return wc;
67 #endif
68 }
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 wxString GedaPcbFootprintLibFileExtension ( "fp"  )
const wxString GerberFileExtension ( "gbr"  )
const wxString GerberJobFileExtension ( "gbrjob"  )
const wxString HtmlFileExtension ( wxT("html")  )
const wxString IpcD356FileExtension ( "d356"  )
const wxString KiCadFootprintFileExtension ( "kicad_mod"  )
const wxString KiCadFootprintLibPathExtension ( "pretty"  )

KICAD PLUGIN libpath.

const wxString KiCadLib3DShapesPathExtension ( "3dshapes"  )

3D shapes default libpath

const wxString KiCadPcbFileExtension ( "kicad_pcb"  )
const wxString LegacyFootprintLibPathExtension ( "mod"  )
const wxString LegacyPcbFileExtension ( "brd"  )
const wxString MacrosFileExtension ( "mcr"  )
const wxString NetlistFileExtension ( "net"  )
const wxString PageLayoutDescrFileExtension ( "kicad_wks"  )
const wxString PdfFileExtension ( "pdf"  )
const wxString ProjectFileExtension ( "pro"  )
const wxString ReportFileExtension ( "rpt"  )
const wxString SchematicBackupFileExtension ( "bak"  )
const wxString SchematicFileExtension ( "sch"  )
const wxString SchematicLibraryFileExtension ( "lib"  )
const wxString SchematicSymbolFileExtension ( "sym"  )
const wxString SpecctraDsnFileExtension ( "dsn"  )
const wxString SVGFileExtension ( "svg"  )
const wxString VrmlFileExtension ( "wrl"  )