21#ifndef KICAD_API_HANDLER_SCH_H
22#define KICAD_API_HANDLER_SCH_H
25#include <api/common/commands/editor_commands.pb.h>
45 return kiapi::common::types::DOCTYPE_SCHEMATIC;
54 const std::string& aClientName,
55 const types::ItemHeader &aHeader,
56 const google::protobuf::RepeatedPtrField<google::protobuf::Any>& aItems,
57 std::function<
void(commands::ItemStatus, google::protobuf::Any)> aItemHandler )
61 const std::string& aClientName )
override;
64 const KIID& aId )
override;
tl::expected< T, ApiResponseStatus > HANDLER_RESULT
Base class for API handlers related to editor frames.
std::unique_ptr< COMMIT > createCommit() override
Override this to create an appropriate COMMIT subclass for the frame in question.
std::optional< EDA_ITEM * > getItemFromDocument(const DocumentSpecifier &aDocument, const KIID &aId) override
HANDLER_RESULT< std::unique_ptr< EDA_ITEM > > createItemForType(KICAD_T aType, EDA_ITEM *aContainer)
kiapi::common::types::DocumentType thisDocumentType() const override
Override this to specify which document type this editor handles.
HANDLER_RESULT< types::ItemRequestStatus > handleCreateUpdateItemsInternal(bool aCreate, const std::string &aClientName, const types::ItemHeader &aHeader, const google::protobuf::RepeatedPtrField< google::protobuf::Any > &aItems, std::function< void(commands::ItemStatus, google::protobuf::Any)> aItemHandler) override
HANDLER_RESULT< commands::GetOpenDocumentsResponse > handleGetOpenDocuments(const HANDLER_CONTEXT< commands::GetOpenDocuments > &aCtx)
bool validateDocumentInternal(const DocumentSpecifier &aDocument) const override
void deleteItemsInternal(std::map< KIID, ItemDeletionStatus > &aItemsToDelete, const std::string &aClientName) override
A base class for most all the KiCad significant classes used in schematics and boards.
Schematic editor (Eeschema) main window.
Base class for any item which can be embedded within the SCHEMATIC container class,...
KICAD_T
The set of class identification values stored in EDA_ITEM::m_structType.