74 if(
m_libId.GetLibNickname().empty() )
84 std::unique_ptr<LIB_SYMBOL>
copy = std::make_unique<LIB_SYMBOL>( *
m_symbol );
115 if(
m_libId.GetLibNickname().empty() ||
m_libId.GetLibItemName().empty() )
125 m_symbol = std::make_unique<LIB_SYMBOL>( *loaded );
143 m_symbol = std::make_unique<LIB_SYMBOL>( *loaded );
APP_SETTINGS_BASE is a settings class that should be derived for each standalone KiCad application.
std::unique_ptr< SCH_SCREEN > m_screen
PROJECT & Prj() const override
HEADLESS_SYMBOL_EDITOR_CONTEXT(std::unique_ptr< LIB_SYMBOL > aSymbol, const LIB_ID &aLibId, PROJECT *aProject, APP_SETTINGS_BASE *aSettings, KIWAY *aKiway=nullptr)
std::unique_ptr< TOOL_MANAGER > m_toolManager
bool SaveSymbol() override
Save the current symbol to its library, without any user interaction.
std::unique_ptr< LIB_SYMBOL > m_symbol
bool LoadSymbol(const LIB_ID &aLibId) override
Load a symbol into the editor (activating it for editing); false if not found.
~HEADLESS_SYMBOL_EDITOR_CONTEXT() override
bool SaveSymbolCopy(const wxString &aFileName, bool aOverwrite) override
Save a copy of the current symbol to the given library file, without user interaction.
TOOL_MANAGER * GetToolManager() const override
bool RevertSymbol() override
Reload the current symbol from its library, discarding unsaved changes.
Hold an error message and may be used when throwing exceptions containing meaningful error messages.
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
A logical library item identifier and consists of various portions much like a URI.
Define a library symbol object.
static SYMBOL_LIBRARY_ADAPTER * SymbolLibAdapter(PROJECT *aProject)
Accessor for project symbol library manager adapter.
Container for project specific data.
An interface to the global shared library manager that is schematic-specific and linked to one projec...
LIB_SYMBOL * LoadSymbol(const wxString &aNickname, const wxString &aName)
Load a LIB_SYMBOL having aName from the library given by aNickname.
SAVE_T SaveSymbol(const wxString &aNickname, std::unique_ptr< LIB_SYMBOL > aSymbol, bool aOverwrite=true)
Write aSymbol to an existing library given by aNickname.
bool IsSymbolLibWritable(const wxString &aNickname)
Return true if the library given by aNickname is writable.
bool SaveSymbolCopyToFile(const LIB_SYMBOL &aSymbol, const wxString &aFileName, bool aOverwrite)
Shared implementation of SaveSymbolCopy for all contexts; writes the given symbol to a new library fi...