|
KiCad PCB EDA Suite
|
#include <api_handler_sch.h>
Public Member Functions | |
| API_HANDLER_SCH (SCH_EDIT_FRAME *aFrame) | |
| API_HANDLER_SCH (std::shared_ptr< SCH_CONTEXT > aContext, SCH_EDIT_FRAME *aFrame=nullptr) | |
| API_RESULT | Handle (ApiRequest &aMsg) |
| Attempt to handle the given API request, if a handler exists in this class for the message. | |
Protected Types | |
| typedef std::function< HANDLER_RESULT< ApiResponse >(ApiRequest &)> | REQUEST_HANDLER |
| A handler for outer messages (envelopes) that will unpack to inner messages and call a specific handler function. | |
Protected Member Functions | |
| std::optional< ApiResponseStatus > | checkForHeadless (const std::string &aCommandName) const |
| std::unique_ptr< COMMIT > | createCommit () override |
| Override this to create an appropriate COMMIT subclass for the frame in question. | |
| kiapi::common::types::DocumentType | thisDocumentType () const override |
| Override this to specify which document type this editor handles. | |
| const EDA_IU_SCALE & | getIuScale () const override |
| Returns the internal-unit scale that the concrete editor uses. | |
| tl::expected< bool, ApiResponseStatus > | validateDocumentInternal (const DocumentSpecifier &aDocument) const override |
| std::optional< SCH_ITEM * > | getItemById (const KIID &aId, SCH_SHEET_PATH *aPathOut=nullptr) const |
| HANDLER_RESULT< std::unique_ptr< EDA_ITEM > > | createItemForType (KICAD_T aType, EDA_ITEM *aContainer) |
| 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 |
| void | deleteItemsInternal (std::map< KIID, ItemDeletionStatus > &aItemsToDelete, const std::string &aClientName) override |
| std::optional< EDA_ITEM * > | getItemFromDocument (const DocumentSpecifier &aDocument, const KIID &aId) override |
| std::optional< TITLE_BLOCK * > | getTitleBlock (const DocumentSpecifier &aDocument) override |
| std::optional< PAGE_INFO > | getPageSettings (const DocumentSpecifier &aDocument) override |
| bool | setPageSettings (const DocumentSpecifier &aDocument, const PAGE_INFO &aPageInfo) override |
| wxString | getDrawingSheetFileName () override |
| void | setDrawingSheetFileName (const wxString &aFileName) override |
| void | onModified () override |
| SCH_CONTEXT * | context () const |
| TOOL_MANAGER * | toolManager () const |
| PROJECT & | project () const |
| HANDLER_RESULT< commands::GetDocumentModifiedStateResponse > | handleGetDocumentModifiedState (const HANDLER_CONTEXT< commands::GetDocumentModifiedState > &aCtx) override |
| HANDLER_RESULT< std::optional< KIID > > | validateItemHeaderDocument (const kiapi::common::types::ItemHeader &aHeader) |
| If the header is valid, returns the item container. | |
| HANDLER_RESULT< bool > | validateDocument (const DocumentSpecifier &aDocument) |
| virtual std::optional< ApiResponseStatus > | checkForBusy () |
| Checks if the editor can accept commands. | |
| HANDLER_RESULT< commands::BeginCommitResponse > | handleBeginCommit (const HANDLER_CONTEXT< commands::BeginCommit > &aCtx) |
| HANDLER_RESULT< commands::EndCommitResponse > | handleEndCommit (const HANDLER_CONTEXT< commands::EndCommit > &aCtx) |
| COMMIT * | getCurrentCommit (const std::string &aClientName) |
| virtual void | pushCurrentCommit (const std::string &aClientName, const wxString &aMessage) |
| HANDLER_RESULT< commands::CreateItemsResponse > | handleCreateItems (const HANDLER_CONTEXT< commands::CreateItems > &aCtx) |
| HANDLER_RESULT< commands::UpdateItemsResponse > | handleUpdateItems (const HANDLER_CONTEXT< commands::UpdateItems > &aCtx) |
| HANDLER_RESULT< commands::DeleteItemsResponse > | handleDeleteItems (const HANDLER_CONTEXT< commands::DeleteItems > &aCtx) |
| HANDLER_RESULT< commands::HitTestResponse > | handleHitTest (const HANDLER_CONTEXT< commands::HitTest > &aCtx) |
| HANDLER_RESULT< types::TitleBlockInfo > | handleGetTitleBlockInfo (const HANDLER_CONTEXT< commands::GetTitleBlockInfo > &aCtx) |
| HANDLER_RESULT< google::protobuf::Empty > | handleSetTitleBlockInfo (const HANDLER_CONTEXT< commands::SetTitleBlockInfo > &aCtx) |
| HANDLER_RESULT< types::PageSettings > | handleGetPageSettings (const HANDLER_CONTEXT< commands::GetPageSettings > &aCtx) |
| HANDLER_RESULT< types::PageSettings > | handleSetPageSettings (const HANDLER_CONTEXT< commands::SetPageSettings > &aCtx) |
| template<class RequestType, class ResponseType, class HandlerType> | |
| void | registerHandler (HANDLER_RESULT< ResponseType >(HandlerType::*aHandler)(const HANDLER_CONTEXT< RequestType > &)) |
| Registers an API command handler for the given message types. | |
Static Protected Member Functions | |
| static std::vector< KICAD_T > | parseRequestedItemTypes (const google::protobuf::RepeatedField< int > &aTypes) |
Protected Attributes | |
| std::map< std::string, std::pair< KIID, std::unique_ptr< COMMIT > > > | m_commits |
| std::set< std::string > | m_activeClients |
| EDA_BASE_FRAME * | m_frame |
| std::map< std::string, REQUEST_HANDLER > | m_handlers |
| Maps type name (without the URL prefix) to a handler method. | |
Static Protected Attributes | |
| static const wxString | m_defaultCommitMessage = _( "Modification from API" ) |
Private Member Functions | |
| HANDLER_RESULT< google::protobuf::Empty > | handleSaveDocument (const HANDLER_CONTEXT< commands::SaveDocument > &aCtx) |
| HANDLER_RESULT< google::protobuf::Empty > | handleSaveCopyOfDocument (const HANDLER_CONTEXT< commands::SaveCopyOfDocument > &aCtx) |
| HANDLER_RESULT< google::protobuf::Empty > | handleRevertDocument (const HANDLER_CONTEXT< commands::RevertDocument > &aCtx) |
| HANDLER_RESULT< commands::SavedDocumentResponse > | handleSaveDocumentToString (const HANDLER_CONTEXT< commands::SaveDocumentToString > &aCtx) |
| HANDLER_RESULT< commands::SavedSelectionResponse > | handleSaveSelectionToString (const HANDLER_CONTEXT< commands::SaveSelectionToString > &aCtx) |
| HANDLER_RESULT< commands::CreateItemsResponse > | handleParseAndCreateItemsFromString (const HANDLER_CONTEXT< commands::ParseAndCreateItemsFromString > &aCtx) |
| HANDLER_RESULT< commands::GetOpenDocumentsResponse > | handleGetOpenDocuments (const HANDLER_CONTEXT< commands::GetOpenDocuments > &aCtx) |
| HANDLER_RESULT< commands::GetItemsResponse > | handleGetItems (const HANDLER_CONTEXT< commands::GetItems > &aCtx) |
| HANDLER_RESULT< commands::GetItemsResponse > | handleGetItemsById (const HANDLER_CONTEXT< commands::GetItemsById > &aCtx) |
| HANDLER_RESULT< commands::SelectionResponse > | handleGetSelection (const HANDLER_CONTEXT< commands::GetSelection > &aCtx) |
| HANDLER_RESULT< Empty > | handleClearSelection (const HANDLER_CONTEXT< commands::ClearSelection > &aCtx) |
| HANDLER_RESULT< commands::SelectionResponse > | handleAddToSelection (const HANDLER_CONTEXT< commands::AddToSelection > &aCtx) |
| HANDLER_RESULT< commands::SelectionResponse > | handleRemoveFromSelection (const HANDLER_CONTEXT< commands::RemoveFromSelection > &aCtx) |
| HANDLER_RESULT< types::RunJobResponse > | handleRunSchematicJobExportSvg (const HANDLER_CONTEXT< kiapi::schematic::jobs::RunSchematicJobExportSvg > &aCtx) |
| HANDLER_RESULT< types::RunJobResponse > | handleRunSchematicJobExportDxf (const HANDLER_CONTEXT< kiapi::schematic::jobs::RunSchematicJobExportDxf > &aCtx) |
| HANDLER_RESULT< types::RunJobResponse > | handleRunSchematicJobExportPdf (const HANDLER_CONTEXT< kiapi::schematic::jobs::RunSchematicJobExportPdf > &aCtx) |
| HANDLER_RESULT< types::RunJobResponse > | handleRunSchematicJobExportPs (const HANDLER_CONTEXT< kiapi::schematic::jobs::RunSchematicJobExportPs > &aCtx) |
| HANDLER_RESULT< types::RunJobResponse > | handleRunSchematicJobExportPng (const HANDLER_CONTEXT< kiapi::schematic::jobs::RunSchematicJobExportPng > &aCtx) |
| HANDLER_RESULT< types::RunJobResponse > | handleRunSchematicJobExportNetlist (const HANDLER_CONTEXT< kiapi::schematic::jobs::RunSchematicJobExportNetlist > &aCtx) |
| HANDLER_RESULT< types::RunJobResponse > | handleRunSchematicJobExportBOM (const HANDLER_CONTEXT< kiapi::schematic::jobs::RunSchematicJobExportBOM > &aCtx) |
| HANDLER_RESULT< kiapi::schematic::commands::SchematicHierarchyResponse > | handleGetSchematicHierarchy (const HANDLER_CONTEXT< kiapi::schematic::commands::GetSchematicHierarchy > &aCtx) |
| void | packSheetInstance (kiapi::schematic::types::SheetInstance *aInstance, SCH_SHEET_PATH &aPath, SCH_SHEET *aSheet) |
| bool | packSchItem (google::protobuf::Any &aOut, SCH_ITEM *aItem, const SCH_SHEET_PATH &aPath) |
Serializes a schematic item into aOut, using path-aware packing for symbols and sheets. | |
| HANDLER_RESULT< kiapi::schematic::commands::SchematicNetlistResponse > | handleGetSchematicNetlist (const HANDLER_CONTEXT< kiapi::schematic::commands::GetSchematicNetlist > &aCtx) |
| HANDLER_RESULT< commands::CrossProbeAnnounceResponse > | handleCrossProbeAnnounce (const HANDLER_CONTEXT< commands::CrossProbeAnnounce > &aCtx) |
| HANDLER_RESULT< commands::SyncSelectionResponse > | handleSyncSelection (const HANDLER_CONTEXT< commands::SyncSelection > &aCtx) |
| HANDLER_RESULT< commands::HighlightNetsResponse > | handleHighlightNets (const HANDLER_CONTEXT< commands::HighlightNets > &aCtx) |
| HANDLER_RESULT< commands::VariantsResponse > | handleGetVariants (const HANDLER_CONTEXT< commands::GetVariants > &aCtx) |
| HANDLER_RESULT< Empty > | handleAddVariant (const HANDLER_CONTEXT< commands::AddVariant > &aCtx) |
| HANDLER_RESULT< Empty > | handleDeleteVariant (const HANDLER_CONTEXT< commands::DeleteVariant > &aCtx) |
| HANDLER_RESULT< Empty > | handleRenameVariant (const HANDLER_CONTEXT< commands::RenameVariant > &aCtx) |
| HANDLER_RESULT< Empty > | handleCopyVariant (const HANDLER_CONTEXT< commands::CopyVariant > &aCtx) |
| HANDLER_RESULT< Empty > | handleSetVariantDescription (const HANDLER_CONTEXT< commands::SetVariantDescription > &aCtx) |
| HANDLER_RESULT< Empty > | handleSetCurrentVariant (const HANDLER_CONTEXT< commands::SetCurrentVariant > &aCtx) |
| HANDLER_RESULT< commands::CurrentVariantResponse > | handleGetCurrentVariant (const HANDLER_CONTEXT< commands::GetCurrentVariant > &aCtx) |
| HANDLER_RESULT< commands::ExpandTextVariablesResponse > | handleExpandTextVariables (const HANDLER_CONTEXT< commands::ExpandTextVariables > &aCtx) |
| HANDLER_RESULT< kiapi::common::commands::PlaceFromLibraryResponse > | handlePlaceSymbolFromLibrary (const HANDLER_CONTEXT< kiapi::schematic::commands::PlaceSymbolFromLibrary > &aCtx) |
| SCHEMATIC * | schematic () const |
| SCH_EDIT_FRAME * | frame () const |
| void | filterValidSchTypes (std::set< KICAD_T > &aTypeList) |
| SCH_SCREEN * | resolveScreenFromDocument (const DocumentSpecifier &aDocument) const |
| Returns the sheet path's screen when one is given and it is found, or null. | |
| template<typename MessageType> | |
| bool | tryUnpack (ApiRequest &aRequest, ApiResponse &aReply, MessageType &aDest) |
Private Attributes | |
| std::shared_ptr< SCH_CONTEXT > | m_context |
Static Private Attributes | |
| static std::set< KICAD_T > | s_allowedTypes |
Definition at line 46 of file api_handler_sch.h.
|
protectedinherited |
A handler for outer messages (envelopes) that will unpack to inner messages and call a specific handler function.
Definition at line 76 of file api_handler.h.
| API_HANDLER_SCH::API_HANDLER_SCH | ( | SCH_EDIT_FRAME * | aFrame | ) |
Definition at line 121 of file api_handler_sch.cpp.
References API_HANDLER_SCH(), and CreateSchFrameContext().
Referenced by API_HANDLER_SCH().
| API_HANDLER_SCH::API_HANDLER_SCH | ( | std::shared_ptr< SCH_CONTEXT > | aContext, |
| SCH_EDIT_FRAME * | aFrame = nullptr ) |
Definition at line 127 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::API_HANDLER_EDITOR(), handleAddToSelection(), handleAddVariant(), handleClearSelection(), handleCopyVariant(), handleCrossProbeAnnounce(), handleDeleteVariant(), handleExpandTextVariables(), handleGetCurrentVariant(), handleGetItems(), handleGetItemsById(), handleGetOpenDocuments(), API_HANDLER_EDITOR::handleGetPageSettings(), handleGetSchematicHierarchy(), handleGetSchematicNetlist(), handleGetSelection(), handleGetVariants(), handleHighlightNets(), handlePlaceSymbolFromLibrary(), handleRemoveFromSelection(), handleRenameVariant(), handleRevertDocument(), handleRunSchematicJobExportBOM(), handleRunSchematicJobExportDxf(), handleRunSchematicJobExportNetlist(), handleRunSchematicJobExportPdf(), handleRunSchematicJobExportPng(), handleRunSchematicJobExportPs(), handleRunSchematicJobExportSvg(), handleSaveCopyOfDocument(), handleSaveDocument(), handleSaveDocumentToString(), handleSaveSelectionToString(), handleSetCurrentVariant(), API_HANDLER_EDITOR::handleSetPageSettings(), handleSetVariantDescription(), handleSyncSelection(), m_context, move, and API_HANDLER::registerHandler().
|
protectedvirtualinherited |
Checks if the editor can accept commands.
Definition at line 218 of file api_handler_editor.cpp.
References m_frame.
Referenced by API_HANDLER_PCB::handleAddEmbeddedFiles(), API_HANDLER_BOARD::handleAddToSelection(), API_HANDLER_SCH::handleAddToSelection(), API_HANDLER_PCB::handleAddVariant(), API_HANDLER_SCH::handleAddVariant(), handleBeginCommit(), API_HANDLER_BOARD::handleClearSelection(), API_HANDLER_SCH::handleClearSelection(), API_HANDLER_PCB::handleCopyVariant(), API_HANDLER_SCH::handleCopyVariant(), handleCreateItems(), handleDeleteItems(), API_HANDLER_PCB::handleDeleteVariant(), API_HANDLER_SCH::handleDeleteVariant(), handleEndCommit(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_BOARD::handleGetBoundingBox(), API_HANDLER_PCB::handleGetConnectedItems(), API_HANDLER_FOOTPRINT::handleGetItems(), API_HANDLER_PCB::handleGetItems(), API_HANDLER_SCH::handleGetItems(), API_HANDLER_BOARD::handleGetItemsById(), API_HANDLER_SCH::handleGetItemsById(), API_HANDLER_PCB::handleGetItemsByNet(), API_HANDLER_PCB::handleGetItemsByNetClass(), API_HANDLER_SCH::handleGetSchematicNetlist(), API_HANDLER_PCB::handleGetVariants(), API_HANDLER_SCH::handleGetVariants(), handleHitTest(), API_HANDLER_PCB::handleImportNetlist(), API_HANDLER_PCB::handleInjectDrcError(), API_HANDLER_BOARD::handleInteractiveMoveItems(), API_HANDLER_BOARD::handleParseAndCreateItemsFromString(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), API_HANDLER_PCB::handleRefillZones(), API_HANDLER_BOARD::handleRemoveFromSelection(), API_HANDLER_SCH::handleRemoveFromSelection(), API_HANDLER_PCB::handleRenameVariant(), API_HANDLER_SCH::handleRenameVariant(), API_HANDLER_FOOTPRINT::handleRevertDocument(), API_HANDLER_PCB::handleRevertDocument(), API_HANDLER_SCH::handleRevertDocument(), API_HANDLER_BOARD::handleRunAction(), API_HANDLER_PCB::handleRunBoardJobExport3D(), API_HANDLER_PCB::handleRunBoardJobExportDrill(), API_HANDLER_PCB::handleRunBoardJobExportDxf(), API_HANDLER_PCB::handleRunBoardJobExportGencad(), API_HANDLER_PCB::handleRunBoardJobExportGerbers(), API_HANDLER_PCB::handleRunBoardJobExportIpc2581(), API_HANDLER_PCB::handleRunBoardJobExportIpcD356(), API_HANDLER_PCB::handleRunBoardJobExportODB(), API_HANDLER_PCB::handleRunBoardJobExportPdf(), API_HANDLER_PCB::handleRunBoardJobExportPng(), API_HANDLER_PCB::handleRunBoardJobExportPosition(), API_HANDLER_PCB::handleRunBoardJobExportPs(), API_HANDLER_PCB::handleRunBoardJobExportRender(), API_HANDLER_PCB::handleRunBoardJobExportStats(), API_HANDLER_PCB::handleRunBoardJobExportSvg(), API_HANDLER_SCH::handleRunSchematicJobExportBOM(), API_HANDLER_SCH::handleRunSchematicJobExportDxf(), API_HANDLER_SCH::handleRunSchematicJobExportNetlist(), API_HANDLER_SCH::handleRunSchematicJobExportPdf(), API_HANDLER_SCH::handleRunSchematicJobExportPng(), API_HANDLER_SCH::handleRunSchematicJobExportPs(), API_HANDLER_SCH::handleRunSchematicJobExportSvg(), API_HANDLER_PCB::handleSaveCopyOfDocument(), API_HANDLER_SCH::handleSaveCopyOfDocument(), API_HANDLER_PCB::handleSaveDocument(), API_HANDLER_SCH::handleSaveDocument(), API_HANDLER_BOARD::handleSetActiveLayer(), API_HANDLER_PCB::handleSetBoardEditorAppearanceSettings(), API_HANDLER_PCB::handleSetBoardOrigin(), API_HANDLER_PCB::handleSetBoardPlotSettings(), API_HANDLER_PCB::handleSetCurrentVariant(), API_HANDLER_SCH::handleSetCurrentVariant(), API_HANDLER_PCB::handleSetEmbeddedFiles(), API_HANDLER_PCB::handleSetVariantDescription(), API_HANDLER_SCH::handleSetVariantDescription(), API_HANDLER_BOARD::handleSetVisibleLayers(), handleUpdateItems(), and API_HANDLER_FOOTPRINT::validateAndGetFootprint().
|
protected |
Definition at line 216 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::m_frame.
Referenced by handleAddToSelection(), handleClearSelection(), handleGetSelection(), handleHighlightNets(), handleRemoveFromSelection(), handleSaveSelectionToString(), and handleSyncSelection().
|
inlineprotected |
Definition at line 96 of file api_handler_sch.h.
References m_context.
Referenced by handleRevertDocument(), handleSaveCopyOfDocument(), handleSaveDocument(), project(), and toolManager().
|
overrideprotectedvirtual |
Override this to create an appropriate COMMIT subclass for the frame in question.
Implements API_HANDLER_EDITOR.
Definition at line 194 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::m_frame, and toolManager().
|
protected |
Definition at line 922 of file api_handler_sch.cpp.
References CreateItemForType(), EDA_ITEM::GetFriendlyName(), s_allowedTypes, SCH_PIN_T, SCH_SHEET_T, and SCH_SYMBOL_T.
Referenced by handleCreateUpdateItemsInternal().
|
overrideprotectedvirtual |
Implements API_HANDLER_EDITOR.
Definition at line 1300 of file api_handler_sch.cpp.
References _, API_HANDLER_EDITOR::getCurrentCommit(), SCHEMATIC::Hierarchy(), API_HANDLER_EDITOR::m_activeClients, path, API_HANDLER_EDITOR::pushCurrentCommit(), COMMIT::Remove(), SCH_SHEET_LIST::ResolveItem(), s_allowedTypes, schematic(), and EDA_ITEM::Type().
|
private |
Definition at line 577 of file api_handler_sch.cpp.
References s_allowedTypes.
Referenced by handleGetItems().
|
private |
Definition at line 210 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::m_frame.
Referenced by handleAddToSelection(), handleAddVariant(), handleClearSelection(), handleCopyVariant(), handleCreateUpdateItemsInternal(), handleDeleteVariant(), handleHighlightNets(), handlePlaceSymbolFromLibrary(), handleRemoveFromSelection(), handleRenameVariant(), handleSaveSelectionToString(), handleSetCurrentVariant(), handleSyncSelection(), onModified(), and setDrawingSheetFileName().
|
protectedinherited |
Definition at line 154 of file api_handler_editor.cpp.
References createCommit(), and m_commits.
Referenced by API_HANDLER_BOARD::deleteItemsInternal(), API_HANDLER_SCH::deleteItemsInternal(), API_HANDLER_BOARD::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_PCB::handleInjectDrcError(), API_HANDLER_BOARD::handleInteractiveMoveItems(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), and API_HANDLER_SCH::handlePlaceSymbolFromLibrary().
|
overrideprotectedvirtual |
Reimplemented from API_HANDLER_EDITOR.
Definition at line 1396 of file api_handler_sch.cpp.
References BASE_SCREEN::m_DrawingSheetFileName.
|
protected |
Definition at line 258 of file api_handler_sch.cpp.
References SCHEMATIC::RefreshHierarchy(), SCHEMATIC::ResolveItem(), and schematic().
Referenced by handleAddToSelection(), and handleRemoveFromSelection().
|
overrideprotectedvirtual |
Implements API_HANDLER_EDITOR.
Definition at line 1329 of file api_handler_sch.cpp.
References SCHEMATIC::Hierarchy(), SCH_SHEET_LIST::ResolveItem(), schematic(), and API_HANDLER_EDITOR::validateDocument().
|
inlineoverrideprotectedvirtual |
Returns the internal-unit scale that the concrete editor uses.
API wire coordinates are always in nanometers, so this scale drives conversion to the editor's native IU. Defaults to pcbIUScale; schematic-like editors must override.
Reimplemented from API_HANDLER_EDITOR.
Definition at line 62 of file api_handler_sch.h.
References schIUScale.
|
overrideprotectedvirtual |
Reimplemented from API_HANDLER_EDITOR.
Definition at line 1374 of file api_handler_sch.cpp.
References resolveScreenFromDocument().
|
overrideprotectedvirtual |
Reimplemented from API_HANDLER_EDITOR.
Definition at line 1365 of file api_handler_sch.cpp.
References resolveScreenFromDocument().
|
inherited |
Attempt to handle the given API request, if a handler exists in this class for the message.
| aMsg | is a request to attempt to handle |
Definition at line 30 of file api_handler.cpp.
References m_handlers.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 824 of file api_handler_sch.cpp.
References SELECTION_TOOL::AddItemsToSel(), API_HANDLER_EDITOR::checkForBusy(), checkForHeadless(), frame(), getItemById(), SCH_SELECTION_TOOL::GetSelection(), m_context, packSchItem(), HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateItemHeaderDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 2439 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), frame(), GetDefaultVariantName(), API_HANDLER_EDITOR::m_frame, kiapi::common::MakeResponseStatus(), name, HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), SCH_EDIT_FRAME::UpdateVariantSelectionCtrl(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 50 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, createCommit(), m_activeClients, m_commits, HANDLER_CONTEXT< RequestMessageType >::Request, and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
private |
Definition at line 800 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), checkForHeadless(), frame(), m_context, HANDLER_CONTEXT< RequestMessageType >::Request, ACTIONS::selectionClear, and API_HANDLER_EDITOR::validateItemHeaderDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 2578 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), frame(), GetDefaultVariantName(), API_HANDLER_EDITOR::m_frame, kiapi::common::MakeResponseStatus(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), toolManager(), SCH_EDIT_FRAME::UpdateVariantSelectionCtrl(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 235 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, handleCreateUpdateItemsInternal(), HANDLER_CONTEXT< RequestMessageType >::Request, and result.
Referenced by API_HANDLER_EDITOR().
|
overrideprotectedvirtual |
Implements API_HANDLER_EDITOR.
Definition at line 986 of file api_handler_sch.cpp.
References _, COMMIT::Add(), SCH_SYMBOL::AddHierarchicalReference(), SCH_SHEET::AddInstance(), ApplySheetInstance(), ApplySymbolInstance(), createItemForType(), frame(), API_HANDLER_EDITOR::getCurrentCommit(), SCHEMATIC::GetCurrentScreen(), SCH_SCREEN::GetFileName(), SCH_SHEET_LIST::GetNextPageNumber(), SCH_SHEET::GetScreen(), SCH_SHEET_LIST::GetSheetPathByKIIDPath(), group, SCHEMATIC::Hierarchy(), SCH_ITEM::IsConnectable(), SCH_SHEET_PATH::LastScreen(), LOCAL_CLEANUP, API_HANDLER_EDITOR::m_activeClients, m_context, API_HANDLER_EDITOR::m_frame, COMMIT::Modify(), PackSheet(), PackSymbol(), path, API_HANDLER_EDITOR::pushCurrentCommit(), SCH_EDIT_FRAME::RecalculateConnections(), SCH_SHEET_PATH::ResolveItem(), result, SCH_SHEET_T, SCH_SYMBOL_T, schematic(), SERIALIZABLE::Serialize(), SCH_ITEM::SetConnectivityDirty(), SCH_SHEET::SetScreen(), SCH_ITEM::SwapItemData(), SCH_SHEET_LIST::TestForRecursion(), EDA_ITEM::Type(), kiapi::common::TypeNameFromAny(), UnpackSheet(), kiapi::common::UnpackSheetPath(), UnpackSymbol(), and API_HANDLER_EDITOR::validateItemHeaderDocument().
|
private |
Definition at line 1874 of file api_handler_sch.cpp.
References CROSS_PROBE_CLIENT::RegisterPeer(), HANDLER_CONTEXT< RequestMessageType >::Request, and traceApi.
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 289 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, deleteItemsInternal(), HANDLER_CONTEXT< RequestMessageType >::Request, result, and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
private |
Definition at line 2473 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), frame(), SCH_BASE_FRAME::GetCanvas(), GetDefaultVariantName(), API_HANDLER_EDITOR::m_frame, kiapi::common::MakeResponseStatus(), name, EDA_DRAW_PANEL_GAL::Refresh(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), SCH_EDIT_FRAME::SetCurrentVariant(), toolManager(), SCH_EDIT_FRAME::UpdateVariantSelectionCtrl(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 88 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, m_activeClients, m_commits, pushCurrentCommit(), HANDLER_CONTEXT< RequestMessageType >::Request, and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
private |
Definition at line 2370 of file api_handler_sch.cpp.
References ExpandEnvVarSubstitutions(), ExpandTextVars(), INTERNAL, m_context, path, project(), HANDLER_CONTEXT< RequestMessageType >::Request, SCHEMATIC::ResolveTextVar(), schematic(), text, kiapi::common::UnpackSheetPath(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 2700 of file api_handler_sch.cpp.
References EMBEDDED_FILES::IsEmpty(), kiapi::common::MakeResponseStatus(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
overrideprotectedvirtual |
Reimplemented from API_HANDLER_EDITOR.
Definition at line 538 of file api_handler_sch.cpp.
References SCH_SHEET_LIST::GetSheetPathByKIIDPath(), SCHEMATIC::Hierarchy(), path, SCHEMATIC::RefreshHierarchy(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), kiapi::common::UnpackSheetPath(), and API_HANDLER_EDITOR::validateDocument().
|
private |
Definition at line 587 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), filterValidSchTypes(), SCH_SHEET_LIST::GetSheetPathByKIIDPath(), SCHEMATIC::Hierarchy(), SCH_SCREEN::Items(), NO_RECURSE, packSchItem(), API_HANDLER_EDITOR::parseRequestedItemTypes(), path, HANDLER_CONTEXT< RequestMessageType >::Request, s_allowedTypes, SCH_GROUP_T, schematic(), EDA_ITEM::Type(), kiapi::common::UnpackSheetPath(), and API_HANDLER_EDITOR::validateItemHeaderDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 678 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), SCH_SHEET_LIST::GetSheetPathByKIIDPath(), SCHEMATIC::Hierarchy(), PackSheet(), PackSymbol(), HANDLER_CONTEXT< RequestMessageType >::Request, SCH_SHEET_LIST::ResolveItem(), s_allowedTypes, SCH_SHEET_T, SCH_SYMBOL_T, schematic(), SERIALIZABLE::Serialize(), EDA_ITEM::Type(), kiapi::common::UnpackSheetPath(), and API_HANDLER_EDITOR::validateItemHeaderDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 508 of file api_handler_sch.cpp.
References m_context, kiapi::common::PackProject(), kiapi::common::PackSheetPath(), path, and HANDLER_CONTEXT< RequestMessageType >::Request.
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 499 of file api_handler_editor.cpp.
References getDrawingSheetFileName(), getPageSettings(), PAGE_INFO::GetSizeIU(), PAGE_INFO::GetType(), PAGE_INFO::IsCustom(), PAGE_INFO::IsPortrait(), kiapi::common::PackVector2(), pcbIUScale, HANDLER_CONTEXT< RequestMessageType >::Request, ToProtoEnum(), and validateDocument().
Referenced by API_HANDLER_PCB::API_HANDLER_PCB(), and API_HANDLER_SCH::API_HANDLER_SCH().
|
private |
Definition at line 1762 of file api_handler_sch.cpp.
References SCH_SHEET_PATH::ComparePageNum(), SCHEMATIC::GetTopLevelSheets(), packSheetInstance(), path, SCH_SHEET_PATH::push_back(), SCHEMATIC::RefreshHierarchy(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1802 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), SCHEMATIC::ConnectionGraph(), CONNECTION_SUBGRAPH::GetDriverConnection(), CONNECTION_SUBGRAPH::GetDriverPriority(), CONNECTION_GRAPH::GetNetMap(), SCH_CONNECTION::IsBus(), kiapi::common::PackSheetPath(), API_HANDLER_EDITOR::parseRequestedItemTypes(), CONNECTION_SUBGRAPH::PIN, HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 762 of file api_handler_sch.cpp.
References checkForHeadless(), filter, SCH_SELECTION_TOOL::GetSelection(), m_context, packSchItem(), API_HANDLER_EDITOR::parseRequestedItemTypes(), path, HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateItemHeaderDocument().
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 410 of file api_handler_editor.cpp.
References TITLE_BLOCK::GetComment(), TITLE_BLOCK::GetCompany(), TITLE_BLOCK::GetDate(), TITLE_BLOCK::GetRevision(), TITLE_BLOCK::GetTitle(), getTitleBlock(), HANDLER_CONTEXT< RequestMessageType >::Request, and validateDocument().
Referenced by API_HANDLER_EDITOR().
|
private |
Definition at line 2413 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), kiapi::common::MakeResponseStatus(), name, HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 2337 of file api_handler_sch.cpp.
References CROSS_PROBING_SETTINGS::auto_highlight, checkForHeadless(), HANDLER_CONTEXT< RequestMessageType >::ClientName, SCH_BASE_FRAME::eeconfig(), frame(), SCH_EDIT_FRAME::HandleRemoteNetHighlight(), kiapi::common::KiwayClientName, APP_SETTINGS_BASE::m_CrossProbing, HANDLER_CONTEXT< RequestMessageType >::Request, and kiapi::common::StandaloneCrossProbeClientName.
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 338 of file api_handler_editor.cpp.
References checkForBusy(), getItemFromDocument(), getIuScale(), HANDLER_CONTEXT< RequestMessageType >::Request, scale, kiapi::common::UnpackVector2(), and validateItemHeaderDocument().
Referenced by API_HANDLER_EDITOR().
|
private |
|
private |
Definition at line 2717 of file api_handler_sch.cpp.
References _, COMMIT::Add(), SCH_REFERENCE_LIST::AddItem(), SCH_REFERENCE::AlwaysAnnotate(), annotate, KIID_PATH::AsString(), AUTOPLACE_AUTO, API_HANDLER_EDITOR::checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, LIB_ID::Format(), frame(), FromProtoEnum(), API_HANDLER_EDITOR::getCurrentCommit(), SCH_SHEET_LIST::GetSheetPathByKIIDPath(), SCH_SHEET_LIST::GetSymbols(), LIB_SYMBOL::GetUnitCount(), SCHEMATIC::Hierarchy(), LIB_ID::IsValid(), SCH_SHEET_PATH::LastScreen(), SYMBOL_LIBRARY_ADAPTER::LoadSymbol(), API_HANDLER_EDITOR::m_activeClients, m_context, PackSymbol(), path, project(), API_HANDLER_EDITOR::pushCurrentCommit(), SCH_REFERENCE_LIST::ReannotateByOptions(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), schIUScale, SCH_REFERENCE_LIST::SetRefDesTracker(), SCH_REFERENCE_LIST::SortByReferenceOnly(), SYMBOL_FILTER_ALL, PROJECT_SCH::SymbolLibAdapter(), kiapi::common::UnpackLibId(), kiapi::common::UnpackSheetPath(), kiapi::common::UnpackVector2(), SCH_REFERENCE_LIST::UpdateAnnotation(), API_HANDLER_EDITOR::validateItemHeaderDocument(), and UTF8::wx_str().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 874 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), checkForHeadless(), frame(), getItemById(), SCH_SELECTION_TOOL::GetSelection(), m_context, packSchItem(), SELECTION_TOOL::RemoveItemsFromSel(), HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateItemHeaderDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 2520 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), frame(), GetDefaultVariantName(), API_HANDLER_EDITOR::m_frame, kiapi::common::MakeResponseStatus(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), toolManager(), SCH_EDIT_FRAME::UpdateVariantSelectionCtrl(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 401 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), context(), API_HANDLER_EDITOR::m_commits, HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1640 of file api_handler_sch.cpp.
References ALL, API_HANDLER_EDITOR::checkForBusy(), ExecuteSchematicJob(), JOB_EXPORT_BOM::m_bomFmtPresetName, JOB_EXPORT_BOM::m_bomPresetName, m_context, JOB_EXPORT_BOM::m_excludeDNP, JOB_EXPORT_BOM::m_fieldDelimiter, JOB_EXPORT_BOM::m_fieldsGroupBy, JOB_EXPORT_BOM::m_fieldsLabels, JOB_EXPORT_BOM::m_fieldsOrdered, JOB_EXPORT_BOM::m_filename, JOB_EXPORT_BOM::m_filterScope, JOB_EXPORT_BOM::m_filterString, JOB_EXPORT_BOM::m_groupSymbols, JOB_EXPORT_BOM::m_includeByteOrderMark, JOB_EXPORT_BOM::m_keepLineBreaks, JOB_EXPORT_BOM::m_keepTabs, JOB_EXPORT_BOM::m_refDelimiter, JOB_EXPORT_BOM::m_refRangeDelimiter, JOB_EXPORT_BOM::m_sortAsc, JOB_EXPORT_BOM::m_sortField, JOB_EXPORT_BOM::m_stringDelimiter, JOB_EXPORT_BOM::m_variantNames, REFERENCE, HANDLER_CONTEXT< RequestMessageType >::Request, JOB::SetConfiguredOutputPath(), API_HANDLER_EDITOR::validateDocument(), and VISIBLE.
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1485 of file api_handler_sch.cpp.
References applySchematicPlotSettings(), API_HANDLER_EDITOR::checkForBusy(), ExecuteSchematicJob(), m_context, HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1606 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), ExecuteSchematicJob(), JOB_EXPORT_SCH_NETLIST::format, FromProtoEnum(), m_context, JOB_EXPORT_SCH_NETLIST::m_filename, JOB_EXPORT_SCH_NETLIST::m_variantNames, HANDLER_CONTEXT< RequestMessageType >::Request, JOB::SetConfiguredOutputPath(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1511 of file api_handler_sch.cpp.
References applySchematicPlotSettings(), API_HANDLER_EDITOR::checkForBusy(), ExecuteSchematicJob(), m_context, HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1564 of file api_handler_sch.cpp.
References applySchematicPlotSettings(), API_HANDLER_EDITOR::checkForBusy(), ExecuteSchematicJob(), m_context, MAX_PNG_DPI, MIN_PNG_DPI, HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1539 of file api_handler_sch.cpp.
References applySchematicPlotSettings(), API_HANDLER_EDITOR::checkForBusy(), ExecuteSchematicJob(), m_context, HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 1460 of file api_handler_sch.cpp.
References applySchematicPlotSettings(), API_HANDLER_EDITOR::checkForBusy(), ExecuteSchematicJob(), m_context, HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 344 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), context(), FILEEXT::KiCadSchematicFileExtension, project(), HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 321 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), context(), HANDLER_CONTEXT< RequestMessageType >::Request, and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 439 of file api_handler_sch.cpp.
References SCH_IO_KICAD_SEXPR::FormatSchematicToFormatter(), SCH_SHEET::GetScreen(), STRING_FORMATTER::GetString(), SCHEMATIC::GetTopLevelSheet(), KICAD_FORMAT::Prettify(), HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 472 of file api_handler_sch.cpp.
References checkForHeadless(), SCH_IO_KICAD_SEXPR::Format(), frame(), SCH_EDIT_FRAME::GetCurrentSheet(), SCH_SELECTION_TOOL::GetSelection(), STRING_FORMATTER::GetString(), TOOL_MANAGER::GetTool(), KICAD_FORMAT::Prettify(), schematic(), and toolManager().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 2664 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), frame(), API_HANDLER_EDITOR::m_frame, kiapi::common::MakeResponseStatus(), name, HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), SCH_EDIT_FRAME::SetCurrentVariant(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 533 of file api_handler_editor.cpp.
References FromProtoEnum(), getDrawingSheetFileName(), getPageSettings(), PAGE_INFO::GetSizeIU(), PAGE_INFO::GetType(), PAGE_INFO::IsCustom(), PAGE_INFO::IsPortrait(), onModified(), kiapi::common::PackVector2(), pcbIUScale, HANDLER_CONTEXT< RequestMessageType >::Request, PAGE_INFO::SetCustomHeightMils(), PAGE_INFO::SetCustomWidthMils(), setDrawingSheetFileName(), setPageSettings(), PAGE_INFO::SetType(), ToProtoEnum(), kiapi::common::UnpackVector2(), User, validateDocument(), VECTOR2< T >::x, and VECTOR2< T >::y.
Referenced by API_HANDLER_PCB::API_HANDLER_PCB(), and API_HANDLER_SCH::API_HANDLER_SCH().
|
protectedinherited |
Definition at line 450 of file api_handler_editor.cpp.
References getTitleBlock(), onModified(), HANDLER_CONTEXT< RequestMessageType >::Request, TITLE_BLOCK::SetComment(), TITLE_BLOCK::SetCompany(), TITLE_BLOCK::SetDate(), TITLE_BLOCK::SetRevision(), TITLE_BLOCK::SetTitle(), and validateDocument().
Referenced by API_HANDLER_EDITOR().
|
private |
Definition at line 2636 of file api_handler_sch.cpp.
References API_HANDLER_EDITOR::checkForBusy(), GetDefaultVariantName(), kiapi::common::MakeResponseStatus(), name, HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), and API_HANDLER_EDITOR::validateDocument().
Referenced by API_HANDLER_SCH().
|
private |
Definition at line 2266 of file api_handler_sch.cpp.
References checkForHeadless(), SCH_BASE_FRAME::eeconfig(), findItemsFromSyncSelection(), frame(), TOOL_MANAGER::GetTool(), TOOLS_HOLDER::GetToolManager(), APP_SETTINGS_BASE::m_CrossProbing, CROSS_PROBING_SETTINGS::on_selection, HANDLER_CONTEXT< RequestMessageType >::Request, schematic(), SCH_EDIT_FRAME::SetSyncingSelection(), SCH_EDIT_FRAME::StartCrossProbeFlash(), and traceCrossProbeFlash.
Referenced by API_HANDLER_SCH().
|
protectedinherited |
Definition at line 262 of file api_handler_editor.cpp.
References checkForBusy(), HANDLER_CONTEXT< RequestMessageType >::ClientName, handleCreateUpdateItemsInternal(), HANDLER_CONTEXT< RequestMessageType >::Request, and result.
Referenced by API_HANDLER_EDITOR().
|
overrideprotectedvirtual |
Reimplemented from API_HANDLER_EDITOR.
Definition at line 1412 of file api_handler_sch.cpp.
References frame(), SCHEMATIC::GetCurrentScreen(), API_HANDLER_EDITOR::m_frame, SCH_EDIT_FRAME::OnModify(), schematic(), and BASE_SCREEN::SetContentModified().
|
private |
Serializes a schematic item into aOut, using path-aware packing for symbols and sheets.
Returns false if the item could not be packed (e.g. a symbol/sheet missing instance data).
Definition at line 228 of file api_handler_sch.cpp.
References PackSheet(), PackSymbol(), SCH_SHEET_T, SCH_SYMBOL_T, SERIALIZABLE::Serialize(), and EDA_ITEM::Type().
Referenced by handleAddToSelection(), handleGetItems(), handleGetSelection(), and handleRemoveFromSelection().
|
private |
Definition at line 1714 of file api_handler_sch.cpp.
References SCH_SHEET_PATH::ComparePageNum(), SCH_SCREEN::GetFileName(), SCH_SHEET::GetFileName(), SCH_SHEET_PATH::GetPageNumber(), SCH_SHEET::GetScreen(), SCH_SCREEN::GetSheets(), SCH_SHEET::GetShownName(), INTERNAL, packSheetInstance(), kiapi::common::PackSheetPath(), SCH_SHEET_PATH::pop_back(), and SCH_SHEET_PATH::push_back().
Referenced by handleGetSchematicHierarchy(), and packSheetInstance().
|
staticprotectedinherited |
Definition at line 393 of file api_handler_editor.cpp.
References FromProtoEnum(), and TYPE_NOT_INIT.
Referenced by API_HANDLER_SCH::handleGetItems(), API_HANDLER_SCH::handleGetSchematicNetlist(), and API_HANDLER_SCH::handleGetSelection().
|
inlineprotected |
Definition at line 100 of file api_handler_sch.h.
References context(), and SCH_CONTEXT::Prj().
Referenced by handleExpandTextVariables(), handlePlaceSymbolFromLibrary(), and handleSaveCopyOfDocument().
|
protectedvirtualinherited |
Reimplemented in API_HANDLER_BOARD.
Definition at line 166 of file api_handler_editor.cpp.
References m_activeClients, m_commits, and API_HANDLER::m_defaultCommitMessage.
Referenced by API_HANDLER_SCH::deleteItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), handleEndCommit(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), and API_HANDLER_BOARD::pushCurrentCommit().
|
inlineprotectedinherited |
Registers an API command handler for the given message types.
When an API request matching the given type comes in, the handler will be called and its response will be packed into an envelope for sending back to the API client.
If the given message does not unpack into the request type, an envelope is returned with status AS_BAD_REQUEST, which probably indicates corruption in the message.
| RequestType | is a protobuf message type containing a command |
| ResponseType | is a protobuf message type containing a command response |
| HandlerType | is the implied type of the API_HANDLER subclass |
| aHandler | is the handler function for the given request and response types |
Definition at line 93 of file api_handler.h.
References HANDLER_CONTEXT< RequestMessageType >::ClientName, m_handlers, HANDLER_CONTEXT< RequestMessageType >::Request, and tryUnpack().
Referenced by API_HANDLER_BOARD::API_HANDLER_BOARD(), API_HANDLER_COMMON::API_HANDLER_COMMON(), API_HANDLER_EDITOR::API_HANDLER_EDITOR(), API_HANDLER_FOOTPRINT::API_HANDLER_FOOTPRINT(), API_HANDLER_LIBRARIES::API_HANDLER_LIBRARIES(), API_HANDLER_PCB::API_HANDLER_PCB(), and API_HANDLER_SCH::API_HANDLER_SCH().
|
private |
Returns the sheet path's screen when one is given and it is found, or null.
Otherwise, returns the editor's current sheet (or root sheet in headless mode).
Definition at line 1343 of file api_handler_sch.cpp.
References m_context, path, schematic(), and kiapi::common::UnpackSheetPath().
Referenced by getPageSettings(), getTitleBlock(), and setPageSettings().
|
private |
Definition at line 203 of file api_handler_sch.cpp.
References m_context.
Referenced by deleteItemsInternal(), getItemById(), getItemFromDocument(), handleAddVariant(), handleCopyVariant(), handleCreateUpdateItemsInternal(), handleDeleteVariant(), handleExpandTextVariables(), handleGetCurrentVariant(), handleGetDocumentModifiedState(), handleGetItems(), handleGetItemsById(), handleGetSchematicHierarchy(), handleGetSchematicNetlist(), handleGetVariants(), handlePlaceSymbolFromLibrary(), handleRenameVariant(), handleSaveDocumentToString(), handleSaveSelectionToString(), handleSetCurrentVariant(), handleSetVariantDescription(), handleSyncSelection(), onModified(), resolveScreenFromDocument(), setDrawingSheetFileName(), and validateDocumentInternal().
|
overrideprotectedvirtual |
Reimplemented from API_HANDLER_EDITOR.
Definition at line 1402 of file api_handler_sch.cpp.
References frame(), SCH_EDIT_FRAME::LoadDrawingSheet(), BASE_SCREEN::m_DrawingSheetFileName, API_HANDLER_EDITOR::m_frame, SCHEMATIC_SETTINGS::m_SchDrawingSheetFileName, schematic(), and SCHEMATIC::Settings().
|
overrideprotectedvirtual |
Reimplemented from API_HANDLER_EDITOR.
Definition at line 1383 of file api_handler_sch.cpp.
References resolveScreenFromDocument().
|
inlineoverrideprotectedvirtual |
Override this to specify which document type this editor handles.
Implements API_HANDLER_EDITOR.
Definition at line 57 of file api_handler_sch.h.
|
inlineprotected |
Definition at line 98 of file api_handler_sch.h.
References context(), and SCH_CONTEXT::GetToolManager().
Referenced by createCommit(), handleCopyVariant(), handleDeleteVariant(), handleRenameVariant(), and handleSaveSelectionToString().
|
inlineprivateinherited |
Definition at line 136 of file api_handler.h.
Referenced by registerHandler().
|
protectedinherited |
Definition at line 180 of file api_handler_editor.cpp.
References validateDocumentInternal().
Referenced by API_HANDLER_BOARD::getItemFromDocument(), API_HANDLER_SCH::getItemFromDocument(), API_HANDLER_PCB::handleAddEmbeddedFiles(), API_HANDLER_PCB::handleAddVariant(), API_HANDLER_SCH::handleAddVariant(), API_HANDLER_BOARD::handleCheckPadstackPresenceOnLayers(), API_HANDLER_PCB::handleCopyVariant(), API_HANDLER_SCH::handleCopyVariant(), API_HANDLER_PCB::handleDeleteVariant(), API_HANDLER_SCH::handleDeleteVariant(), API_HANDLER_BOARD::handleExpandTextVariables(), API_HANDLER_SCH::handleExpandTextVariables(), API_HANDLER_BOARD::handleGetActiveLayer(), API_HANDLER_PCB::handleGetBoardDesignRules(), API_HANDLER_BOARD::handleGetBoardEnabledLayers(), API_HANDLER_PCB::handleGetBoardLayerByName(), API_HANDLER_PCB::handleGetBoardLayerName(), API_HANDLER_PCB::handleGetBoardOrigin(), API_HANDLER_PCB::handleGetBoardPlotSettings(), API_HANDLER_PCB::handleGetCurrentVariant(), API_HANDLER_SCH::handleGetCurrentVariant(), API_HANDLER_PCB::handleGetCustomDesignRules(), handleGetDocumentModifiedState(), API_HANDLER_PCB::handleGetDocumentModifiedState(), API_HANDLER_SCH::handleGetDocumentModifiedState(), API_HANDLER_PCB::handleGetEmbeddedFiles(), API_HANDLER_BOARD::handleGetGraphicsDefaults(), API_HANDLER_PCB::handleGetNets(), API_HANDLER_BOARD::handleGetPadShapeAsPolygon(), handleGetPageSettings(), API_HANDLER_SCH::handleGetSchematicHierarchy(), API_HANDLER_SCH::handleGetSchematicNetlist(), API_HANDLER_BOARD::handleGetStackup(), handleGetTitleBlockInfo(), API_HANDLER_PCB::handleGetVariants(), API_HANDLER_SCH::handleGetVariants(), API_HANDLER_BOARD::handleGetVisibleLayers(), API_HANDLER_PCB::handleImportNetlist(), API_HANDLER_PCB::handleInjectDrcError(), API_HANDLER_BOARD::handleInteractiveMoveItems(), API_HANDLER_BOARD::handleParseAndCreateItemsFromString(), API_HANDLER_PCB::handleRefillZones(), API_HANDLER_PCB::handleRenameVariant(), API_HANDLER_SCH::handleRenameVariant(), API_HANDLER_FOOTPRINT::handleRevertDocument(), API_HANDLER_PCB::handleRevertDocument(), API_HANDLER_SCH::handleRevertDocument(), API_HANDLER_PCB::handleRunBoardJobExport3D(), API_HANDLER_PCB::handleRunBoardJobExportDrill(), API_HANDLER_PCB::handleRunBoardJobExportDxf(), API_HANDLER_PCB::handleRunBoardJobExportGencad(), API_HANDLER_PCB::handleRunBoardJobExportGerbers(), API_HANDLER_PCB::handleRunBoardJobExportIpc2581(), API_HANDLER_PCB::handleRunBoardJobExportIpcD356(), API_HANDLER_PCB::handleRunBoardJobExportODB(), API_HANDLER_PCB::handleRunBoardJobExportPdf(), API_HANDLER_PCB::handleRunBoardJobExportPng(), API_HANDLER_PCB::handleRunBoardJobExportPosition(), API_HANDLER_PCB::handleRunBoardJobExportPs(), API_HANDLER_PCB::handleRunBoardJobExportRender(), API_HANDLER_PCB::handleRunBoardJobExportStats(), API_HANDLER_PCB::handleRunBoardJobExportSvg(), API_HANDLER_SCH::handleRunSchematicJobExportBOM(), API_HANDLER_SCH::handleRunSchematicJobExportDxf(), API_HANDLER_SCH::handleRunSchematicJobExportNetlist(), API_HANDLER_SCH::handleRunSchematicJobExportPdf(), API_HANDLER_SCH::handleRunSchematicJobExportPng(), API_HANDLER_SCH::handleRunSchematicJobExportPs(), API_HANDLER_SCH::handleRunSchematicJobExportSvg(), API_HANDLER_PCB::handleSaveCopyOfDocument(), API_HANDLER_SCH::handleSaveCopyOfDocument(), API_HANDLER_PCB::handleSaveDocument(), API_HANDLER_SCH::handleSaveDocument(), API_HANDLER_BOARD::handleSaveDocumentToString(), API_HANDLER_SCH::handleSaveDocumentToString(), API_HANDLER_BOARD::handleSetActiveLayer(), API_HANDLER_PCB::handleSetBoardDesignRules(), API_HANDLER_PCB::handleSetBoardEnabledLayers(), API_HANDLER_PCB::handleSetBoardOrigin(), API_HANDLER_PCB::handleSetBoardPlotSettings(), API_HANDLER_PCB::handleSetCurrentVariant(), API_HANDLER_SCH::handleSetCurrentVariant(), API_HANDLER_PCB::handleSetCustomDesignRules(), API_HANDLER_PCB::handleSetEmbeddedFiles(), handleSetPageSettings(), handleSetTitleBlockInfo(), API_HANDLER_PCB::handleSetVariantDescription(), API_HANDLER_SCH::handleSetVariantDescription(), API_HANDLER_BOARD::handleSetVisibleLayers(), API_HANDLER_FOOTPRINT::validateAndGetFootprint(), and validateItemHeaderDocument().
|
overrideprotectedvirtual |
Implements API_HANDLER_EDITOR.
Definition at line 273 of file api_handler_sch.cpp.
References PROJECT::GetProjectName(), PROJECT::GetProjectPath(), m_context, path, schematic(), and kiapi::common::UnpackSheetPath().
|
protectedinherited |
If the header is valid, returns the item container.
Definition at line 189 of file api_handler_editor.cpp.
References result, thisDocumentType(), validateDocument(), and validateDocumentInternal().
Referenced by API_HANDLER_BOARD::handleAddToSelection(), API_HANDLER_SCH::handleAddToSelection(), handleBeginCommit(), API_HANDLER_BOARD::handleClearSelection(), API_HANDLER_SCH::handleClearSelection(), API_HANDLER_BOARD::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), handleDeleteItems(), handleEndCommit(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_BOARD::handleGetBoundingBox(), API_HANDLER_PCB::handleGetConnectedItems(), API_HANDLER_FOOTPRINT::handleGetItems(), API_HANDLER_PCB::handleGetItems(), API_HANDLER_SCH::handleGetItems(), API_HANDLER_BOARD::handleGetItemsById(), API_HANDLER_SCH::handleGetItemsById(), API_HANDLER_PCB::handleGetItemsByNet(), API_HANDLER_PCB::handleGetItemsByNetClass(), API_HANDLER_BOARD::handleGetSelection(), API_HANDLER_SCH::handleGetSelection(), handleHitTest(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), API_HANDLER_BOARD::handleRemoveFromSelection(), and API_HANDLER_SCH::handleRemoveFromSelection().
|
protectedinherited |
Definition at line 150 of file api_handler_editor.h.
Referenced by API_HANDLER_BOARD::deleteItemsInternal(), API_HANDLER_SCH::deleteItemsInternal(), handleBeginCommit(), API_HANDLER_BOARD::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), handleEndCommit(), API_HANDLER_BOARD::handleFlipItems(), API_HANDLER_PCB::handlePlaceFootprintFromLibrary(), API_HANDLER_SCH::handlePlaceSymbolFromLibrary(), and pushCurrentCommit().
|
protectedinherited |
Definition at line 148 of file api_handler_editor.h.
Referenced by getCurrentCommit(), handleBeginCommit(), handleEndCommit(), API_HANDLER_PCB::handleRevertDocument(), API_HANDLER_SCH::handleRevertDocument(), and pushCurrentCommit().
|
private |
Definition at line 216 of file api_handler_sch.h.
Referenced by API_HANDLER_SCH(), context(), handleAddToSelection(), handleClearSelection(), handleCreateUpdateItemsInternal(), handleExpandTextVariables(), handleGetOpenDocuments(), handleGetSelection(), handlePlaceSymbolFromLibrary(), handleRemoveFromSelection(), handleRunSchematicJobExportBOM(), handleRunSchematicJobExportDxf(), handleRunSchematicJobExportNetlist(), handleRunSchematicJobExportPdf(), handleRunSchematicJobExportPng(), handleRunSchematicJobExportPs(), handleRunSchematicJobExportSvg(), resolveScreenFromDocument(), schematic(), and validateDocumentInternal().
|
staticprotectedinherited |
Definition at line 131 of file api_handler.h.
Referenced by API_HANDLER_EDITOR::pushCurrentCommit().
|
protectedinherited |
Definition at line 152 of file api_handler_editor.h.
Referenced by API_HANDLER_EDITOR(), checkForBusy(), API_HANDLER_BOARD::checkForHeadless(), API_HANDLER_SCH::checkForHeadless(), API_HANDLER_BOARD::createCommit(), API_HANDLER_SCH::createCommit(), API_HANDLER_FOOTPRINT::frame(), API_HANDLER_PCB::frame(), API_HANDLER_SCH::frame(), API_HANDLER_BOARD::handleAddToSelection(), API_HANDLER_SCH::handleAddVariant(), API_HANDLER_BOARD::handleClearSelection(), API_HANDLER_SCH::handleCopyVariant(), API_HANDLER_SCH::handleCreateUpdateItemsInternal(), API_HANDLER_SCH::handleDeleteVariant(), API_HANDLER_BOARD::handleGetActiveLayer(), handleGetDocumentModifiedState(), API_HANDLER_BOARD::handleRemoveFromSelection(), API_HANDLER_SCH::handleRenameVariant(), API_HANDLER_BOARD::handleSetActiveLayer(), API_HANDLER_SCH::handleSetCurrentVariant(), API_HANDLER_BOARD::handleSetVisibleLayers(), API_HANDLER_SCH::onModified(), and API_HANDLER_SCH::setDrawingSheetFileName().
|
protectedinherited |
Maps type name (without the URL prefix) to a handler method.
Definition at line 129 of file api_handler.h.
Referenced by Handle(), and registerHandler().
|
staticprivate |
Definition at line 76 of file api_handler_sch.h.
Referenced by createItemForType(), deleteItemsInternal(), filterValidSchTypes(), handleGetItems(), and handleGetItemsById().