21#ifndef KICAD_API_PLUGIN_H
22#define KICAD_API_PLUGIN_H
27#include <nlohmann/json_fwd.hpp>
28#include <nlohmann/json-schema.hpp>
29#include <wx/bmpbndl.h>
30#include <wx/filename.h>
59 bool FromJson(
const nlohmann::json& aJson );
81 std::set<PLUGIN_ACTION_SCOPE>
scopes;
82 std::vector<wxString>
args;
106 const wxString&
Name()
const;
111 const std::vector<PLUGIN_ACTION>&
Actions()
const;
131 const std::unique_ptr<API_PLUGIN>& item2 )
const
133 return item1->Identifier() < item2->Identifier();
145 void error(
const nlohmann::json::json_pointer& ptr,
const nlohmann::json& instance,
146 const std::string& message )
override;
A plugin that is invoked by KiCad and runs as an external process; communicating with KiCad via the I...
const PLUGIN_RUNTIME & Runtime() const
const wxString & Name() const
const std::vector< PLUGIN_ACTION > & Actions() const
friend struct API_PLUGIN_CONFIG
wxString ActionSettingsKey(const PLUGIN_ACTION &aAction) const
const wxString & Identifier() const
std::unique_ptr< API_PLUGIN_CONFIG > m_config
wxString BasePath() const
static bool IsValidIdentifier(const wxString &aIdentifier)
const wxString & Description() const
API_PLUGIN(const wxFileName &aConfigFile, const JSON_SCHEMA_VALIDATOR &aValidator)
std::optional< PLUGIN_ACTION > createActionFromJson(const nlohmann::json &aJson)
void error(const nlohmann::json::json_pointer &ptr, const nlohmann::json &instance, const std::string &message) override
Comparison functor for ensuring API_PLUGINs have unique identifiers.
bool operator()(const std::unique_ptr< API_PLUGIN > &item1, const std::unique_ptr< API_PLUGIN > &item2) const
An action performed by a plugin via the IPC API.
wxBitmapBundle icon_light
const API_PLUGIN & plugin
std::set< PLUGIN_ACTION_SCOPE > scopes
std::vector< wxString > args
PLUGIN_ACTION(const API_PLUGIN &aPlugin)
bool FromJson(const nlohmann::json &aJson)
std::vector< PLUGIN_DEPENDENCY > dependencies