PluginContext.h header

#include <ew/app/PluginContext.h>

Namespace ew::app

PluginContext class

class ew::app::PluginContext

The registration facade handed to Plugin::registerContributions. A plugin calls its add* methods to contribute to the running app; each call copies the value into the host's ContributionRegistry (the concrete implementer). New plugin surfaces are added as new add* methods here – extending this interface does not change the Plugin vtable, so already-built plugins keep loading. The interface is host-implemented; a plugin only ever holds a reference to it, and it exposes no way to read back or mutate other plugins' contributions or host state (capability isolation).

Members

ew::app::PluginContext::PluginContext()=default

Defaulted.

virtual ew::app::PluginContext::~PluginContext()=default

Defaulted.

ew::app::PluginContext::PluginContext(const PluginContext &)=delete

Not copyable.

ew::app::PluginContext::PluginContext(PluginContext &&)=delete

Not movable.

PluginContext & ew::app::PluginContext::operator=(const PluginContext &)=delete

Not copyable.

PluginContext & ew::app::PluginContext::operator=(PluginContext &&)=delete

Not movable.

virtual void ew::app::PluginContext::addTheme(const Theme &theme)=0

Contributes a colour theme; it joins the built-in themes in the theme picker. A contributed theme whose name collides with a built-in (or an earlier contribution) is ignored – built-ins win (see availableThemes).

virtual void ew::app::PluginContext::addPromptCommand(const PromptCommand &command)=0

Contributes a reusable AI command; it joins the built-in and user commands. A command whose name is already present is ignored (see loadPromptCommands).

virtual void ew::app::PluginContext::addPanel(const PluginPanel &panel)=0

Contributes a dock/panel (ABI 2): the host mounts panel as a first-class dock – it shows in the Windows menu and saves in perspectives like any built-in panel – building its widget from the factory with a PluginAppContext, so a plugin can add a whole new window that reads and edits the user's data.

virtual void ew::app::PluginContext::addMenuCommand(const PluginMenuCommand &command)=0

Contributes a menu command (ABI 2): the host adds command to the app's plugin-commands menu; invoking it runs the command with a PluginAppContext.