![]() |
KiCad PCB EDA Suite
|
Macros | |
#define | PcbFileExtension KiCadPcbFileExtension |
Functions | |
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 reference extensions. 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... | |
wxString | formatWildcardExt (const wxString &aWildcard) |
Format wildcard extension to support case sensitive file dialogs. More... | |
bool | IsProtelExtension (const wxString &ext) |
#define PcbFileExtension KiCadPcbFileExtension |
Definition at line 135 of file wildcards_and_files_ext.h.
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).
aExts | is the list of exts to add to the filter. Do not include the leading dot. Empty means "allow all files". |
Definition at line 82 of file wildcards_and_files_ext.cpp.
References filter, and formatWildcardExt().
Referenced by AllFilesWildcard(), AllProjectFilesWildcard(), AllSchematicFilesWildcard(), AllSymbolLibFilesWildcard(), AltiumCircuitMakerPcbFileWildcard(), AltiumCircuitStudioPcbFileWildcard(), AltiumDesignerPcbFileWildcard(), AltiumSchematicFileWildcard(), AskLoadBoardFileName(), BOOST_AUTO_TEST_CASE(), CadstarArchiveFilesWildcard(), CadstarNetlistFileWildcard(), CadstarPcbArchiveFileWildcard(), CadstarSchematicArchiveFileWildcard(), CsvFileWildcard(), DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP(), DrawingSheetFileWildcard(), DrillFileWildcard(), DxfFileWildcard(), EagleFilesWildcard(), EagleFootprintLibPathWildcard(), EaglePcbFileWildcard(), EagleSchematicFileWildcard(), EquFileWildcard(), ErcFileWildcard(), BOARD_EDITOR_CONTROL::ExportNetlist(), FabmasterPcbFileWildcard(), FootprintAssignmentFileWildcard(), FootprintPlaceFileWildcard(), GedaPcbFootprintLibFileWildcard(), GencadFileWildcard(), GerberFileWildcard(), GerberJobFileWildcard(), HotkeyFileWildcard(), HtmlFileWildcard(), IDF3DFileWildcard(), FIELDS_GRID_TABLE< SCH_FIELD >::initGrid(), IpcD356FileWildcard(), JpegFileWildcard(), KiCadFootprintLibFileWildcard(), KiCadFootprintLibPathWildcard(), KiCadSchematicFileWildcard(), KiCadSymbolLibFileWildcard(), LegacyFootprintLibPathWildcard(), LegacyPcbFileWildcard(), LegacyProjectFileWildcard(), LegacySchematicFileWildcard(), LegacySymbolLibFileWildcard(), GERBVIEW_FRAME::LoadGerberFiles(), ModLegacyExportFileWildcard(), NetlistFileWildcard(), DIALOG_IMPORT_GFX::onBrowseFiles(), DIALOG_NET_INSPECTOR::onReport(), PCadPcbFileWildcard(), PcbFileWildcard(), PdfFileWildcard(), PngFileWildcard(), ProjectFileWildcard(), PSFileWildcard(), ReportFileWildcard(), SchematicSymbolFileWildcard(), Shapes3DFileWildcard(), SpecctraDsnFileWildcard(), SpecctraSessionFileWildcard(), SpiceLibraryFileWildcard(), SpiceNetlistFileWildcard(), SVGFileWildcard(), TextFileWildcard(), WorkbookFileWildcard(), and ZipFileWildcard().
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 reference extensions.
This function uses the C++ regular expression functionality to perform the comparison, so the reference extensions can be regular expressions of their own right. This means that partial searches can be made, for example ^g.* can be used to see if the first character of the extension is g. The reference extensions are concatenated together as alternatives when doing the evaluation (e.g. (dxf|svg|^g.*) ).
aExtension | is the extension to test |
aReference | is a vector containing the extensions to test against |
aCaseSensitive | says if the comparison should be case sensitive or not |
Definition at line 36 of file wildcards_and_files_ext.cpp.
Referenced by BOOST_AUTO_TEST_CASE(), and GRAPHICS_IMPORT_MGR::GetPluginByExt().
wxString formatWildcardExt | ( | const wxString & | aWildcard | ) |
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.
aWildcard | is the extension part of the wild card. |
Definition at line 60 of file wildcards_and_files_ext.cpp.
References Format().
Referenced by AddFileExtListToFilter(), AskLoadBoardFileName(), GRAPHICS_IMPORT_PLUGIN::GetWildcards(), and SCH_EDIT_FRAME::OnImportProject().
bool IsProtelExtension | ( | const wxString & | ext | ) |
Definition at line 173 of file wildcards_and_files_ext.cpp.
Referenced by SAVE_AS_TRAVERSER::OnFile().
const std::string ArchiveFileExtension |
const std::string BackupFileSuffix |
Referenced by SCH_EDIT_FRAME::CheckForAutoSaveFile(), SAVE_AS_TRAVERSER::OnFile(), and SCH::IFACE::SaveFileAs().
const std::string DesignRulesFileExtension |
const std::string DrawingSheetFileExtension |
Definition at line 152 of file wildcards_and_files_ext.h.
Referenced by PROJECT_TEMPLATE::CreateProject(), PL_EDITOR_FRAME::Files_io(), PROJECT_TREE_PANE::GetFileExt(), BM2CMP_FRAME::OnExportLogo(), and SAVE_AS_TRAVERSER::OnFile().
const std::string DrillFileExtension |
const std::string EagleFootprintLibPathExtension |
Referenced by IO_MGR::GuessPluginTypeFromLibPath().
const std::string EquFileExtension |
const std::string FootprintAssignmentFileExtension |
const std::string FootprintPlaceFileExtension |
Referenced by DIALOG_GEN_FOOTPRINT_POSITION::CreateAsciiFiles(), and PROJECT_TREE_PANE::GetFileExt().
const std::string GedaPcbFootprintLibFileExtension |
Referenced by fileTypes(), GPCB_FPL_CACHE::GetTimestamp(), IO_MGR::GuessPluginTypeFromLibPath(), and GPCB_FPL_CACHE::Load().
const std::string GerberFileExtension |
Referenced by PLACEFILE_GERBER_WRITER::GetPlaceFileName(), and SAVE_AS_TRAVERSER::OnFile().
const std::string GerberJobFileExtension |
const std::string HotkeyFileExtension |
const std::string HtmlFileExtension |
Referenced by PROJECT_TREE_PANE::GetFileExt().
const std::string IpcD356FileExtension |
Referenced by PCB_EDIT_FRAME::GenD356File().
const std::string JpegFileExtension |
Referenced by EDA_3D_VIEWER_FRAME::takeScreenshot().
const std::string KiCadFootprintFileExtension |
Referenced by FOOTPRINT_EDIT_FRAME::ExportFootprint(), BM2CMP_FRAME::exportPcbnewFormat(), fileTypes(), PCB_PLUGIN::FootprintExists(), GPCB_PLUGIN::FootprintLibDelete(), PCB_PLUGIN::FootprintLibDelete(), PCB_PLUGIN::FootprintSave(), PROJECT_TREE_PANE::GetFileExt(), FP_CACHE::GetTimestamp(), FP_CACHE::Load(), and SAVE_AS_TRAVERSER::OnFile().
const std::string KiCadFootprintLibPathExtension |
const std::string KiCadPcbFileExtension |
Referenced by AskSaveBoardFileName(), KICAD_MANAGER_FRAME::CreateNewProject(), PCB_EDIT_FRAME::doAutoSave(), GERBVIEW_CONTROL::ExportToPcbnew(), PCB_EDIT_FRAME::Files_io_from_id(), PROJECT_TREE_PANE::GetFileExt(), LoadBoard(), loadKicadProject(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnIdle(), PCB_EDIT_FRAME::SavePcbCopy(), and PCB_EDIT_FRAME::SavePcbFile().
const std::string KiCadSchematicFileExtension |
Referenced by TEST_SCH_SHEET_LIST_FIXTURE::buildFullPath(), KICAD_MANAGER_FRAME::CreateNewProject(), SCH_DRAWING_TOOLS::DrawSheet(), PROJECT_TREE_PANE::GetFileExt(), getSchematicFile(), SCH_IO_MGR::GuessPluginTypeFromSchPath(), SCH_EDIT_FRAME::importFile(), FIELDS_GRID_TABLE< SCH_FIELD >::initGrid(), SCH_ALTIUM_PLUGIN::Load(), SCH_EAGLE_PLUGIN::Load(), loadKicadProject(), SCH_EAGLE_PLUGIN::loadSheet(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(), CADSTAR_SCH_ARCHIVE_LOADER::loadSheets(), SCH_EDIT_FRAME::NewProject(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnIdle(), DIALOG_SHEET_PROPERTIES::onSheetFilenameChanged(), SCH_ALTIUM_PLUGIN::ParseFileName(), PCB_EDIT_FRAME::RunEeschema(), SCH_EDITOR_CONTROL::SaveCurrSheetCopyAs(), SCH::IFACE::SaveFileAs(), SCH_EDIT_FRAME::SaveProject(), KICAD_MANAGER_FRAME::SchFileName(), FIELDS_GRID_TABLE< SCH_FIELD >::SetValue(), PCB_EDIT_FRAME::TestStandalone(), DIALOG_FIELD_PROPERTIES::TransferDataFromWindow(), and DIALOG_SHEET_PROPERTIES::TransferDataFromWindow().
const std::string KiCadSymbolLibFileExtension |
Referenced by SYMBOL_EDIT_FRAME::AddLibraryFile(), BM2CMP_FRAME::exportEeschemaFormat(), SYMBOL_EDIT_FRAME::ExportSymbol(), PROJECT_TREE_PANE::GetFileExt(), SCH_ALTIUM_PLUGIN::getLibFileName(), SCH_EAGLE_PLUGIN::getLibFileName(), SCH_IO_MGR::GuessPluginTypeFromLibPath(), SYMBOL_EDIT_FRAME::ImportSymbol(), CADSTAR_SCH_ARCHIVE_PLUGIN::Load(), SAVE_AS_TRAVERSER::OnFile(), SCH::IFACE::SaveFileAs(), and SYMBOL_EDIT_FRAME::saveLibrary().
const std::string LegacyFootprintLibPathExtension |
Referenced by IO_MGR::GuessPluginTypeFromLibPath(), and SAVE_AS_TRAVERSER::OnFile().
const std::string LegacyPcbFileExtension |
Referenced by KICAD_MANAGER_FRAME::CreateNewProject(), PROJECT_TREE_PANE::GetFileExt(), LoadBoard(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnIdle(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), SCH_EDIT_FRAME::OnOpenPcbnew(), KICAD_MANAGER_FRAME::PcbLegacyFileName(), and PCB_EDIT_FRAME::SavePcbFile().
const std::string LegacyProjectFileExtension |
Referenced by KICAD_MANAGER_FRAME::CreateNewProject(), PROJECT_TEMPLATE::CreateProject(), PROJECT_TEMPLATE::GetDestinationFiles(), PROJECT_TREE_PANE::GetFileExt(), PROJECT_FILE::getLegacyFileExt(), getProjects(), SETTINGS_MANAGER::LoadProject(), SAVE_AS_TRAVERSER::OnFile(), PGM_KICAD::OnPgmInit(), SCH_EDIT_FRAME::OpenProjectFiles(), and PROJECT_TREE_PANE::ReCreateTreePrj().
const std::string LegacySchematicFileExtension |
Referenced by PROJECT_TREE_PANE::GetFileExt(), SCH_IO_MGR::GuessPluginTypeFromSchPath(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnIdle(), KICAD_MANAGER_FRAME::OnImportEagleFiles(), PCB_EDIT_FRAME::RunEeschema(), SCH::IFACE::SaveFileAs(), KICAD_MANAGER_FRAME::SchLegacyFileName(), and PCB_EDIT_FRAME::TestStandalone().
const std::string LegacySymbolDocumentFileExtension |
Referenced by DIALOG_SYMBOL_REMAP::backupProject(), SAVE_AS_TRAVERSER::OnFile(), and SCH::IFACE::SaveFileAs().
const std::string LegacySymbolLibFileExtension |
Referenced by DIALOG_SYMBOL_REMAP::backupProject(), SYMBOL_LIBS::CacheName(), SCH_EDIT_FRAME::CreateArchiveLibraryCacheFile(), PROJECT_TREE_PANE::GetFileExt(), GetRescueLibraryFileName(), SCH_IO_MGR::GuessPluginTypeFromLibPath(), SYMBOL_EDIT_FRAME::ImportSymbol(), SYMBOL_LIBS::LoadAllLibraries(), SAVE_AS_TRAVERSER::OnFile(), SCH_EDIT_FRAME::OpenProjectFiles(), and SCH::IFACE::SaveFileAs().
const std::string MacrosFileExtension |
const std::string NetlistFileExtension |
const std::string PdfFileExtension |
Referenced by PROJECT_TREE_PANE::GetFileExt().
const std::string PngFileExtension |
Referenced by EDA_3D_VIEWER_FRAME::takeScreenshot().
const std::string ProjectFileExtension |
Referenced by KICAD_MANAGER_FRAME::CreateNewProject(), PROJECT_TEMPLATE::CreateProject(), PROJECT_TEMPLATE::GetDestinationFiles(), PROJECT_TREE_PANE::GetFileExt(), PROJECT_FILE::getFileExt(), getProjects(), KICAD_MANAGER_FRAME::ImportNonKiCadProject(), LoadBoard(), loadKicadProject(), SETTINGS_MANAGER::LoadProject(), TEST_SCH_SHEET_LIST_FIXTURE::loadSchematic(), TEST_NETLISTS_FIXTURE::loadSchematic(), NewBoard(), KICAD_MANAGER_CONTROL::NewFromTemplate(), KICAD_MANAGER_CONTROL::NewProject(), DIALOG_BOARD_SETUP::OnAuxiliaryAction(), DIALOG_SCH_IMPORT_SETTINGS::OnBrowseClicked(), SAVE_AS_TRAVERSER::OnFile(), KICAD_MANAGER_FRAME::OnIdle(), SCH_EDIT_FRAME::OnImportProject(), PGM_KICAD::OnPgmInit(), PCB_EDIT_FRAME::OpenProjectFiles(), SCH_EDIT_FRAME::OpenProjectFiles(), PROJECT_TREE_PANE::ReCreateTreePrj(), PROJECT_FILE::SaveAs(), SaveBoard(), PCB_EDIT_FRAME::SavePcbCopy(), PCB_EDIT_FRAME::SavePcbFile(), SCH_EDIT_FRAME::SaveProject(), SCH_EDIT_FRAME::SaveProjectSettings(), PROJECT_FILE::SaveToFile(), and PROJECT::setProjectFullName().
const std::string ProjectLocalSettingsFileExtension |
const std::string ReportFileExtension |
const std::string SchematicBackupFileExtension |
const std::string SchematicSymbolFileExtension |
Referenced by SAVE_AS_TRAVERSER::OnFile(), and SCH::IFACE::SaveFileAs().
const std::string SpecctraDsnFileExtension |
Referenced by BOARD_EDITOR_CONTROL::ExportSpecctraDSN().
const std::string SpecctraSessionFileExtension |
Referenced by BOARD_EDITOR_CONTROL::ImportSpecctraSession().
const std::string SVGFileExtension |
const std::string TextFileExtension |
Referenced by PANEL_HOTKEYS_EDITOR::dumpHotkeys(), and PROJECT_TREE_PANE::GetFileExt().
const std::string VrmlFileExtension |
const std::string WorkbookFileExtension |
Referenced by SIM_PLOT_FRAME::getDefaultFilename(), and SIM_PLOT_FRAME::saveWorkbook().