53#include <wx/filedlg.h>
73 auto libSelectedCondition =
78 LIB_ID sel = editFrame->GetTreeLIBID();
88 auto libInferredCondition =
93 LIB_ID sel = editFrame->GetTreeLIBID();
100 auto symbolSelectedCondition =
105 LIB_ID sel = editFrame->GetTargetLibId();
112 auto derivedSymbolSelectedCondition =
117 LIB_ID sel = editFrame->GetTargetLibId();
131 auto relatedSymbolSelectedCondition =
136 LIB_ID sel = editFrame->GetTargetLibId();
152 auto multiSymbolSelectedCondition =
190 auto canOpenExternally =
197 wxString libName = editFrame->GetTargetLibId().GetLibNickname();
204 auto isPackedLibraryCondition =
210 wxString libName = editFrame->GetTargetLibId().GetLibNickname();
216 std::optional<LIBRARY_TABLE_ROW*> row = adapter->
GetRow( libName );
223 return wxFileName::FileExists( uri );
229 auto isUnpackedLibraryCondition =
235 wxString libName = editFrame->GetTargetLibId().GetLibNickname();
241 std::optional<LIBRARY_TABLE_ROW*> row = adapter->
GetRow( libName );
248 return wxFileName::DirExists( uri );
258 ctxMenu.AddSeparator( 10 );
259 ctxMenu.AddItem(
ACTIONS::save, symbolSelectedCondition || libInferredCondition, 10 );
265 ctxMenu.AddItem(
ACTIONS::revert, symbolSelectedCondition || libInferredCondition, 10 );
267 ctxMenu.AddSeparator( 20 );
271 ctxMenu.AddSeparator( 100 );
278 ctxMenu.AddSeparator( 120 );
284 ctxMenu.AddSeparator( 200 );
290 ctxMenu.AddItem(
ACTIONS::openDirectory, canOpenExternally && ( symbolSelectedCondition || libSelectedCondition ), 200 );
292 ctxMenu.AddSeparator( 300 );
317 wxString libFile = *aEvent.
Parameter<wxString*>();
364 wxString::Format(
_(
"Failed to load symbol %s from "
385 if( libName.IsEmpty() )
387 msg.Printf(
_(
"No symbol library selected." ) );
388 m_frame->ShowInfoBarError( msg );
394 msg.Printf(
_(
"Symbol library '%s' not found." ), libName );
395 m_frame->ShowInfoBarError( msg );
401 msg.Printf(
_(
"Symbol library '%s' is not writable." ), libName );
402 m_frame->ShowInfoBarError( msg );
467 std::optional<wxString> libItemName =
470 wxCHECK( libItemName, 0 );
472 wxFileName fileName( *libItemName );
474 wxString filePath = wxEmptyString;
475 wxString explorerCommand;
478 explorerCommand = cfg->m_System.file_explorer;
480 if( explorerCommand.IsEmpty() )
482 filePath = fileName.GetFullPath().BeforeLast( wxFileName::GetPathSeparator() );
484 if( !filePath.IsEmpty() && wxDirExists( filePath ) )
490 if( !explorerCommand.EndsWith(
"%F" ) )
492 wxMessageBox(
_(
"Missing/malformed file explorer argument '%F' in common settings." ) );
496 filePath = fileName.GetFullPath();
497 filePath.Replace( wxS(
"\"" ), wxS(
"_" ) );
499 wxString fileArg =
'"' + filePath +
'"';
501 explorerCommand.Replace( wxT(
"%F" ), fileArg );
503 if( !explorerCommand.IsEmpty() )
504 wxExecute( explorerCommand );
518 if( textEditorName.IsEmpty() )
520 wxMessageBox(
_(
"No text editor selected in KiCad. Please choose one." ) );
529 std::optional<wxString> optUri =
532 wxCHECK( optUri, 0 );
534 wxString tempFName = ( *optUri ).wc_str();
536 if( !tempFName.IsEmpty() )
537 ExecuteFile( textEditorName, tempFName,
nullptr,
false );
555 bool hasWritableLibs =
false;
560 const wxString& libName = sel.GetLibNickname();
563 msg.Printf(
_(
"Symbol library '%s' not found." ), libName );
565 msg.Printf(
_(
"Symbol library '%s' is not writable." ), libName );
567 hasWritableLibs =
true;
571 m_frame->ShowInfoBarError( msg );
573 if( !hasWritableLibs )
595 if( !sel.
IsValid() && !isPasteAction )
598 msg.Printf(
_(
"No symbol selected" ) );
599 m_frame->ShowInfoBarError( msg );
607 msg.Printf(
_(
"Symbol library '%s' not found." ), libName );
608 m_frame->ShowInfoBarError( msg );
614 msg.Printf(
_(
"Symbol library '%s' is not writable." ), libName );
615 m_frame->ShowInfoBarError( msg );
635 wxString oldName = libId.GetLibItemName();
643 [&](
const wxString& aNewName )
647 if( newName.IsEmpty() )
649 wxMessageBox(
_(
"Symbol must have a name." ) );
656 msg.Printf(
_(
"Symbol '%s' already exists in library '%s'." ),
661 wxOK | wxCANCEL | wxICON_WARNING );
663 errorDlg.SetOKLabel(
_(
"Overwrite" ) );
674 if( newName == oldName )
684 bool overwritingCurrentSymbol =
false;
702 if( overwritingCurrentSymbol )
728 wxDataViewItem treeItem = libMgr.
GetAdapter()->FindItem( libId );
751 m_frame->GetCanvas()->Refresh();
764 m_frame->GetCanvas()->Refresh();
778 cfg->m_SyncPinEdit = !cfg->m_SyncPinEdit;
795 m_frame->GetCanvas()->Refresh();
811 m_frame->GetCanvas()->Refresh();
827 m_frame->GetCanvas()->Refresh();
842 wxMessageBox(
_(
"No symbol to export" ) );
846 wxFileName fn( symbol->
GetName() );
849 wxString projectPath = wxPathOnly(
m_frame->Prj().GetProjectFullName() );
851 wxFileDialog dlg( editFrame,
_(
"Export View as PNG" ), projectPath, fn.GetFullName(),
856 if( dlg.ShowModal() == wxID_OK && !dlg.GetPath().IsEmpty() )
864 wxMessageBox( wxString::Format(
_(
"Can't save file '%s'." ), dlg.GetPath() ) );
888 const wxString title =
_(
"Export for Older KiCad Version" );
892 std::optional<LIBRARY_TABLE_ROW*> row = adapter ? adapter->
GetRow( libName ) : std::nullopt;
896 wxMessageBox(
_(
"Select a library first." ), title, wxOK | wxICON_ERROR, editFrame );
904 && wxMessageBox(
_(
"A library editor has unsaved changes. The export uses the last saved "
905 "library files. Continue?" ),
906 title, wxYES_NO | wxICON_WARNING, editFrame )
942 wxMessageBox(
_(
"No symbol to export" ) );
946 wxFileName fn( symbol->
GetName() );
949 wxString pro_dir = wxPathOnly(
m_frame->Prj().GetProjectFullName() );
951 wxString fullFileName = wxFileSelector(
_(
"SVG File Name" ), pro_dir, fn.GetFullName(),
956 if( !fullFileName.IsEmpty() )
977 wxMessageBox(
_(
"No symbol to flatten" ) );
982 std::unique_ptr<LIB_SYMBOL> flatSymbol = symbol->
Flatten();
983 wxCHECK_MSG( flatSymbol, 0,
_(
"Failed to flatten symbol" ) );
987 wxMessageBox(
_(
"Failed to update library with flattened symbol" ) );
991 wxDataViewItem treeItem = libMgr.
GetAdapter()->FindItem( symId );
1002 int unit, bodyStyle;
1020 unit = viewerFrame->
GetUnit();
1039 if( blocking_dialog )
1041 blocking_dialog->Raise();
1072 const int deltaUnit = aEvent.
Parameter<
int>();
1075 const int newUnit = ( ( editFrame->
GetUnit() - 1 + deltaUnit + nUnits ) % nUnits ) + 1;
1077 editFrame->
SetUnit( newUnit );
1086 viewerFrame->SelectPreviousSymbol();
1095 viewerFrame->SelectNextSymbol();
1105 SCOPE scope = SCOPE::SCOPE_LIBRARY;
1108 scope = SCOPE::SCOPE_RELATED_SYMBOLS;
1132 wxArrayString labels;
1135 labels.Add( entry.key.AfterFirst(
':' ) );
1137 const int count =
static_cast<int>( labels.GetCount() );
1139 const int next = aForward ? ( active + 1 ) % count : ( active - 1 + count ) % count;
1141 popup->
Popup(
_(
"Switch to Tab" ), labels,
next );
1188 wxCHECK( editFrame, 0 );
1192 if( currentLib.IsEmpty() )
1194 editFrame->
ShowInfoBarError(
_(
"Select a library to compare against a file." ) );
1198 wxFileDialog dlg( editFrame,
_(
"Choose Library to Compare With" ), wxEmptyString,
1200 wxFD_OPEN | wxFD_FILE_MUST_EXIST );
1202 if( dlg.ShowModal() != wxID_OK )
1205 wxFileName otherFn( dlg.GetPath() );
1206 otherFn.MakeAbsolute();
1211 _(
"Select a KiCad symbol library file (.kicad_sym)." ) );
1215 const wxString otherPath = otherFn.GetFullPath();
1220 wxArrayString names;
1225 for(
const wxString&
name : names )
1228 beforeMap.emplace( sym->GetName(), sym );
1231 std::vector<std::unique_ptr<LIB_SYMBOL>> afterStorage;
1237 afterStorage = std::move( loaded.first );
1238 afterMap = std::move( loaded.second );
1243 otherPath, ioe.
What() ) );
1246 catch(
const std::exception& e )
1250 wxString::FromUTF8( e.what() ) ) );
static TOOL_ACTION openWithTextEditor
static TOOL_ACTION revert
static TOOL_ACTION exportForOlderVersion
static TOOL_ACTION addLibrary
static TOOL_ACTION openDirectory
static TOOL_ACTION saveAll
static TOOL_ACTION showProperties
static TOOL_ACTION newLibrary
static TOOL_ACTION ddAddLibrary
static const ADVANCED_CFG & GetCfg()
Get the singleton instance's config, which is shared by all consumers.
File-compare dialog (Phase 7).
void DrawChosenLibraryItem(LIBRARY_ITEM_DRAWER aDraw)
Draw only the library item named by the chosen change, since the outlines of a whole library pile up ...
void ShowInfoBarError(const wxString &aErrorMsg, bool aShowCloseButton=false, INFOBAR_MESSAGE_TYPE aType=INFOBAR_MESSAGE_TYPE::GENERIC)
Show the WX_INFOBAR displayed on the top of the canvas with a message and an error icon on the left o...
HOTKEY_CYCLE_POPUP * GetHotkeyPopup()
bool SaveCanvasImageToFile(const wxString &aFileName, BITMAP_TYPE aBitmapType)
Save the current view as an image file.
virtual void CreateHotkeyPopup()
virtual void ToggleProperties()
virtual void SetParent(EDA_ITEM *aParent)
const std::vector< ENTRY > & Entries() const
The tab strip plus the single shared GAL canvas.
void AdvanceTab(bool aForward)
const EDITOR_TABS_MODEL & Model() const
AUTOPLACE_FIELDS m_AutoplaceFields
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
virtual const wxString What() const
A composite of Problem() and Where()
wxString m_libraryPath
The .kicad_sym library to convert.
wxString m_outputLibraryPath
Where to write the converted copy.
Diff two .kicad_sym symbol libraries.
DOCUMENT_DIFF Diff() override
Produce a DOCUMENT_DIFF of the inputs the concrete differ was constructed with.
static std::pair< std::vector< std::unique_ptr< LIB_SYMBOL > >, SYMBOL_MAP > LoadLibrary(const wxString &aPath)
Convenience: load a .kicad_sym path into a SYMBOL_MAP using SCH_IO_KICAD_SEXPR::EnumerateSymbolLib.
std::map< wxString, const LIB_SYMBOL * > SYMBOL_MAP
Library content is a map of (canonical_name -> LIB_SYMBOL*).
Helper class to create more flexible dialogs, including 'do not show again' checkbox handling.
void UpdateAllItems(int aUpdateFlags)
Update all items in the view according to the given flags.
PROJECT & Prj() const
Return a reference to the PROJECT associated with this KIWAY.
KIWAY & Kiway() const
Return a reference to the KIWAY that this object has an opportunity to participate in.
wxWindow * GetBlockingDialog()
Gets the window pointer to the blocking dialog (to send it signals)
Module editor specific tools.
bool RenameLibrary(const wxString &aTitle, const wxString &aName, std::function< bool(const wxString &aNewName)> aValidator)
void AddContextMenuItems(CONDITIONAL_MENU *aMenu)
std::optional< LIBRARY_TABLE_ROW * > GetRow(const wxString &aNickname, LIBRARY_TABLE_SCOPE aScope=LIBRARY_TABLE_SCOPE::BOTH) const
Like LIBRARY_MANAGER::GetRow but filtered to the LIBRARY_TABLE_TYPE of this adapter.
static wxString ExpandURI(const wxString &aShortURI, const PROJECT &aProject)
std::optional< wxString > GetFullURI(LIBRARY_TABLE_TYPE aType, const wxString &aNickname, bool aSubstituted=false)
Return the full location specifying URI for the LIB, either in original UI form or in environment var...
A logical library item identifier and consists of various portions much like a URI.
bool IsValid() const
Check if this LID_ID is valid.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
Symbol library management helper that is specific to the symbol library editor frame.
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > & GetAdapter()
Return the adapter object that provides the stored data.
Define a library symbol object.
const LIB_ID & GetLibId() const override
wxString GetName() const override
SCH_FIELD & GetValueField()
int GetUnitCount() const override
std::unique_ptr< LIB_SYMBOL > Flatten() const
Return a flattened symbol inheritance to the caller.
virtual void SetName(const wxString &aName)
virtual const wxString & GetTextEditor(bool aCanShowFileChooser=true)
Return the path to the preferred text editor application.
virtual LIBRARY_MANAGER & GetLibraryManager() const
static SYMBOL_LIBRARY_ADAPTER * SymbolLibAdapter(PROJECT *aProject)
Accessor for project symbol library manager adapter.
static TOOL_ACTION editSymbol
static TOOL_ACTION importSymbol
static TOOL_ACTION newSymbol
static TOOL_ACTION saveLibraryAsPacked
static TOOL_ACTION saveLibraryAs
static TOOL_ACTION previousSymbol
static TOOL_ACTION showRelatedLibFieldsTable
static TOOL_ACTION editLibSymbolWithLibEdit
static TOOL_ACTION saveLibraryAsUnpacked
static TOOL_ACTION pasteSymbol
static TOOL_ACTION exportSymbolAsSVG
static TOOL_ACTION renameSymbol
static TOOL_ACTION duplicateSymbol
static TOOL_ACTION closeSymbolTab
static TOOL_ACTION cutSymbol
static TOOL_ACTION compareLibraryWithFile
static TOOL_ACTION saveSymbolCopyAs
static TOOL_ACTION nextUnit
static TOOL_ACTION showElectricalTypes
static TOOL_ACTION flattenSymbol
static TOOL_ACTION placeSymbol
static TOOL_ACTION showHiddenFields
static TOOL_ACTION nextSymbol
static TOOL_ACTION prevSymbolTab
static TOOL_ACTION showHiddenPins
static TOOL_ACTION showPinNumbers
static TOOL_ACTION exportSymbolView
static TOOL_ACTION showLibFieldsTable
static TOOL_ACTION copySymbol
static TOOL_ACTION symbolProperties
static TOOL_ACTION toggleSyncedPinsMode
static TOOL_ACTION deleteSymbol
static TOOL_ACTION nextSymbolTab
static TOOL_ACTION togglePinAltIcons
static TOOL_ACTION exportSymbol
static TOOL_ACTION previousUnit
static TOOL_ACTION deriveFromExistingSymbol
static TOOL_ACTION addSymbolToSchematic
static TOOL_ACTION saveSymbolAs
SCH_RENDER_SETTINGS * GetRenderSettings()
EESCHEMA_SETTINGS * eeconfig() const
Schematic editor (Eeschema) main window.
SCH_SCREEN * GetScreen() const override
Return a pointer to a BASE_SCREEN or one of its derivatives.
SCH_SHEET_PATH & GetCurrentSheet() const
virtual const wxString & GetText() const override
Return the string associated with the text object.
void SetText(const wxString &aText) override
bool m_ShowPinsElectricalType
void AutoplaceFields(SCH_SCREEN *aScreen, AUTOPLACE_ALGO aAlgo) override
Automatically orient all the fields in the symbol.
int PreviousSymbol(const TOOL_EVENT &aEvent)
int ToggleSyncedPinsMode(const TOOL_EVENT &aEvent)
int Save(const TOOL_EVENT &aEvt)
int PrevTab(const TOOL_EVENT &aEvent)
int EditSymbol(const TOOL_EVENT &aEvent)
int ExportView(const TOOL_EVENT &aEvent)
int ShowElectricalTypes(const TOOL_EVENT &aEvent)
int FlattenSymbol(const TOOL_EVENT &aEvent)
int OpenDirectory(const TOOL_EVENT &aEvent)
int RenameSymbol(const TOOL_EVENT &newName)
int DuplicateSymbol(const TOOL_EVENT &aEvent)
int ToggleHiddenPins(const TOOL_EVENT &aEvent)
int ShowLibraryTable(const TOOL_EVENT &aEvent)
int AddLibrary(const TOOL_EVENT &aEvent)
int AddSymbol(const TOOL_EVENT &aEvent)
int CloseTab(const TOOL_EVENT &aEvent)
int TogglePinAltIcons(const TOOL_EVENT &aEvent)
int ChangeUnit(const TOOL_EVENT &aEvent)
int Revert(const TOOL_EVENT &aEvent)
int ToggleHiddenFields(const TOOL_EVENT &aEvent)
int OpenWithTextEditor(const TOOL_EVENT &aEvent)
int ExportForOlderVersion(const TOOL_EVENT &aEvent)
int ExportSymbol(const TOOL_EVENT &aEvent)
int NextTab(const TOOL_EVENT &aEvent)
int NextSymbol(const TOOL_EVENT &aEvent)
void setTransitions() override
Set up handlers for various events.
int ToggleProperties(const TOOL_EVENT &aEvent)
bool Init() override
Init() is called once upon a registration of the tool.
int EditLibrarySymbol(const TOOL_EVENT &aEvent)
int CompareLibraryWithFile(const TOOL_EVENT &aEvent)
Diff the currently-open symbol library against another .kicad_sym file.
int ExportSymbolAsSVG(const TOOL_EVENT &aEvent)
int ShowPinNumbers(const TOOL_EVENT &aEvent)
int DdAddLibrary(const TOOL_EVENT &aEvent)
int AddSymbolToSchematic(const TOOL_EVENT &aEvent)
int CutCopyDelete(const TOOL_EVENT &aEvent)
The symbol library editor main window.
void SaveAll()
Save all modified symbols and libraries.
void DeleteSymbolFromLibrary()
bool IsLibraryTreeShown() const override
void RenameSymbolTab(const LIB_ID &aOldId, const LIB_ID &aNewId)
Update the open tab for aOldId, if any, to the renamed symbol aNewId so its label and key track the r...
bool IsCurrentSymbol(const LIB_ID &aLibId) const
Return true if aLibId is an alias for the editor screen symbol.
void SVGPlotSymbol(const wxString &aFullFileName)
Create the SVG print file for the current edited symbol.
EDITOR_TABS_PANEL * GetTabsPanel() const
The tab strip fronting the shared canvas, or nullptr before it is mounted.
LIB_ID GetTreeLIBID(int *aUnit=nullptr) const
Return the LIB_ID of the library or symbol selected in the symbol tree.
void FocusOnLibId(const LIB_ID &aLibID)
void SaveLibraryAs(SAVE_LIBRARY_AS aSaveType=SAVE_LIBRARY_AS::NEW)
Save the currently selected library to a new file.
void Save()
Save the selected symbol or library.
void LoadSymbol(const wxString &aLibrary, const wxString &aSymbol, int Unit)
int GetTreeSelectionCount() const
bool IsSymbolFromSchematic() const
SYMBOL_EDITOR_SETTINGS * GetSettings() const
void DuplicateSymbol(bool aFromClipboard)
Insert a duplicate symbol.
void SetCurSymbol(LIB_SYMBOL *aSymbol, bool aUpdateZoom)
Take ownership of aSymbol and notes that it is the one currently being edited.
std::vector< LIB_ID > GetSelectedLibIds() const
LIB_SYMBOL * GetCurSymbol() const
Return the current symbol being edited or NULL if none selected.
LIB_ID GetTargetLibId() const override
Return either the symbol selected in the symbol tree (if context menu is active) or the symbol on the...
void UpdateMsgPanel() override
Redraw the message panel.
void CreateNewSymbol(const wxString &newName=wxEmptyString)
Create a new symbol in the selected library.
void CopySymbolToClipboard()
LIB_SYMBOL_LIBRARY_MANAGER & GetLibManager()
void SaveSymbolCopyAs(bool aOpenCopy)
Save the currently selected symbol to a new name and/or location.
void UpdateLibraryTree(const wxDataViewItem &aTreeItem, LIB_SYMBOL *aSymbol)
Update a symbol node in the library tree.
void OnModify() override
Must be called after a schematic change in order to set the "modify" flag of the current symbol.
bool IsContentModified() const override
Get if any symbols or libraries have been modified but not saved.
void ToggleLibraryTree() override
An interface to the global shared library manager that is schematic-specific and linked to one projec...
bool IsLibraryReadOnly(const wxString &aLibrary) const
Return true if the library is stored in a read-only file.
bool LibraryExists(const wxString &aLibrary, bool aCheckEnabled=false) const
Return true if library exists.
LIB_SYMBOL * GetBufferedSymbol(const wxString &aSymbolName, const wxString &aLibrary)
Return the symbol copy from the buffer.
bool SymbolNameInUse(const wxString &aName, const wxString &aLibrary)
Return true if the symbol name is already in use in the specified library.
bool IsLibraryModified(const wxString &aLibrary) const
Return true if library has unsaved modifications.
LIB_SYMBOL * GetSymbol(const wxString &aSymbolName, const wxString &aLibrary) const
Return either an alias of a working LIB_SYMBOL copy, or alias of the original symbol if there is no w...
bool RemoveSymbol(const wxString &aSymbolName, const wxString &aLibrary)
Remove the symbol from the symbol buffer.
bool UpdateSymbolAfterRename(LIB_SYMBOL *aSymbol, const wxString &aOldSymbolName, const wxString &aLibrary)
Update the symbol buffer with a new version of the symbol when the name has changed.
void SetSymbolModified(const wxString &aSymbolName, const wxString &aLibrary)
void GetSymbolNames(const wxString &aLibName, wxArrayString &aSymbolNames, SYMBOL_NAME_FILTER aFilter=SYMBOL_NAME_FILTER::ALL)
bool SymbolExists(const wxString &aSymbolName, const wxString &aLibrary) const
Return true if symbol with a specific alias exists in library (either original one or buffered).
bool UpdateSymbol(LIB_SYMBOL *aSymbol, const wxString &aLibrary)
Update the symbol buffer with a new version of the symbol.
bool HasDerivedSymbols(const wxString &aSymbolName, const wxString &aLibraryName)
Check whether any symbol inherits from aSymbolName, without building the list of names.
Symbol library viewer main window.
LIB_SYMBOL * GetSelectedSymbol() const
void DisplayErrorMessage(wxWindow *aParent, const wxString &aText, const wxString &aExtraInfo)
Display an error message with aMessage.
void DisplayError(wxWindow *aParent, const wxString &aText)
Display an error or warning message box with aMessage.
This file is part of the common library.
void RunExportForOlderVersion(EDA_BASE_FRAME *aFrame, const DOWNGRADE_EXPORT_RUNNER &aRun)
bool RunDowngradeJob(KIWAY &aKiway, KIWAY::FACE_T aFace, JOB_T &aJob, const DOWNGRADE_EXPORT_PASS &aPass, DOWNGRADE_EXPORT_RESULT &aResult)
Fill in the parts of a downgrade job that every editor sets the same way, run it, and hand back its r...
LIB_FIELDS_EDITOR_GRID_DATA_MODEL::SCOPE SCOPE
@ FRAME_SCH_SYMBOL_EDITOR
int ExecuteFile(const wxString &aEditorName, const wxString &aFileName, wxProcess *aCallback, bool aFileForKicad)
Call the executable file aEditorName with the parameter aFileName.
static const std::string KiCadSymbolLibFileExtension
static const std::string SVGFileExtension
static wxString PngFileWildcard()
static wxString SVGFileWildcard()
static wxString KiCadSymbolLibFileWildcard()
bool LaunchExternal(const wxString &aPath)
Launches the given file or folder in the host OS.
void ShowSymbolPair(WIDGET_DIFF_CANVAS &aCanvas, const SYM_LIB_DIFFER::SYMBOL_MAP &aBefore, const SYM_LIB_DIFFER::SYMBOL_MAP &aAfter, const wxString &aName)
Draw the symbol aName as it is in aBefore and aAfter.
@ REPAINT
Item needs to be redrawn.
@ GEOMETRY
Position or shape has changed.
@ LAYERS
Layers have changed.
PGM_BASE & Pgm()
The global program "get" accessor.
wxString UnescapeString(const wxString &aSource)
wxString EscapeString(const wxString &aSource, ESCAPE_CONTEXT aContext)
The Escape/Unescape routines use HTML-entity-reference-style encoding to handle characters which are:...
What one pass of an export is asked to do.
bool m_dryRun
Classify only, write nothing.
wxString m_folder
Destination, empty on a dry run.
What the flow needs back from a pass.
The full set of changes between two parsed documents of one type.
@ NEW
Save to a new library in the original symbol library format.
@ UNPACKED
Save a packed symbol library to the unpacked format.
@ PACKED
Save an unpacked symbol library to the packed format.
static void showTabSwitcher(SYMBOL_EDIT_FRAME *aFrame, bool aForward)
wxString result
Test unit parsing edge cases and error handling.
Definition of file extensions used in Kicad.