21#ifndef KICAD_API_PLUGIN_H
22#define KICAD_API_PLUGIN_H
27#include <nlohmann/json_fwd.hpp>
28#include <wx/bmpbndl.h>
29#include <wx/filename.h>
68 bool FromJson(
const nlohmann::json& aJson );
92 std::set<PLUGIN_ACTION_SCOPE>
scopes;
93 std::vector<wxString>
args;
114 static bool IsValidIdentifier(
const wxString& aIdentifier );
116 const wxString& Identifier()
const;
117 const wxString& Name()
const;
118 const wxString& Description()
const;
120 wxString BasePath()
const;
122 const std::vector<PLUGIN_ACTION>& Actions()
const;
124 wxString ActionSettingsKey(
const PLUGIN_ACTION& aAction )
const;
129 std::optional<PLUGIN_ACTION> createActionFromJson(
const nlohmann::json& aJson );
142 const std::unique_ptr<API_PLUGIN>& item2 )
const
144 return item1->Identifier() < item2->Identifier();
A plugin that is invoked by KiCad and runs as an external process; communicating with KiCad via the I...
std::unique_ptr< API_PLUGIN_CONFIG > m_config
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 (not to be confused with ACTION_PLUGIN,...
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