50 return m_frame->GetToolManager();
60 return m_frame->GetCurrentFileName();
65 return m_frame->CanAcceptApiCommands();
70 return m_frame->GetCurrentSheet();
91 wxFileName fn =
m_frame->Prj().AbsolutePath(
m_frame->Schematic().GetFileName() );
93 if( fn.GetFullPath().IsEmpty() || !wxFileExists( fn.GetFullPath() ) )
96 if(
m_frame->GetCurrentSheet().Last() != &
m_frame->Schematic().Root() )
105 screen->SetContentModified(
false );
108 return m_frame->OpenProjectFiles( std::vector<wxString>( 1, fn.GetFullPath() ),
KICTL_REVERT );
118 return std::make_shared<SCH_EDIT_FRAME_CONTEXT>( aFrame );
A minimalistic software bus for communications between various DLLs/DSOs (DSOs) within the same KiCad...
Container for project specific data.
Holds all the data relating to one schematic.
static TOOL_ACTION changeSheet
An interface for the frame surface that the SCH API handlers need; to enable headless mode.
std::optional< SCH_SHEET_PATH > GetCurrentSheet() const override
SCHEMATIC * GetSchematic() const override
bool CanAcceptApiCommands() const override
PROJECT & Prj() const override
bool SaveSchematicCopy(const wxString &aFileName, bool aCreateProject) override
bool RevertToSaved() override
KIWAY * GetKiway() const override
bool SaveSchematic() override
wxString GetCurrentFileName() const override
SCH_EDIT_FRAME_CONTEXT(SCH_EDIT_FRAME *aFrame)
bool SaveSchematicAs(const wxString &aFileName) override
Save the schematic to a new path and change the active schematic/project.
TOOL_MANAGER * GetToolManager() const override
Schematic editor (Eeschema) main window.
Container class that holds multiple SCH_SCREEN objects in a hierarchy.
Handle access to a stack of flattened SCH_SHEET objects by way of a path for creating a flattened sch...
#define KICTL_REVERT
reverting to a previously-saved (KiCad) file.
bool SaveSchematic(SCHEMATIC &aSchematic, PROJECT &aProject)
Save every screen in the hierarchy to its current path, then update the project file.
bool SaveSchematicCopy(SCHEMATIC &aSchematic, PROJECT &aProject, const wxString &aFileName, bool aCreateProject)
Save the root schematic to aFileName without changing the open document.
std::shared_ptr< SCH_CONTEXT > CreateSchFrameContext(SCH_EDIT_FRAME *aFrame)