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;
55 const types::ItemHeader &aHeader,
56 const google::protobuf::RepeatedPtrField<google::protobuf::Any>& aItems,
57 std::function<
void(commands::ItemStatus, google::protobuf::Any)> aItemHandler )
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)
HANDLER_RESULT< commands::GetOpenDocumentsResponse > handleGetOpenDocuments(commands::GetOpenDocuments &aMsg, const HANDLER_CONTEXT &aCtx)
void deleteItemsInternal(std::map< KIID, ItemDeletionStatus > &aItemsToDelete, const HANDLER_CONTEXT &aCtx) override
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 HANDLER_CONTEXT &aCtx, const types::ItemHeader &aHeader, const google::protobuf::RepeatedPtrField< google::protobuf::Any > &aItems, std::function< void(commands::ItemStatus, google::protobuf::Any)> aItemHandler) override
bool validateDocumentInternal(const DocumentSpecifier &aDocument) const 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.