pub trait SDModule: Send + Sync {
    fn name(&self) -> String;
fn components(&self) -> HashMap<String, ComponentDefinition>;
fn add_component(&self, core: CoreHandle, button: &mut Button, name: &str);
fn remove_component(
        &self,
        core: CoreHandle,
        button: &mut Button,
        name: &str
    );
fn component_values(
        &self,
        core: CoreHandle,
        button: &Button,
        name: &str
    ) -> Vec<UIValue>;
fn set_component_value(
        &self,
        core: CoreHandle,
        button: &mut Button,
        name: &str,
        value: Vec<UIValue>
    );
fn listening_for(&self) -> Vec<String>;
fn event(&self, core: CoreHandle, event: SDEvent); fn settings(&self) -> Vec<UIValue> { ... }
fn set_setting(&self, value: Vec<UIValue>) { ... }
fn metadata(&self) -> PluginMetadata { ... } }
Expand description

Module trait

Required methods

Module name

Definition for components that module will be providing

Method for adding components onto buttons

Method for removing components from buttons

Method for letting core know what values component currently has

Method for setting values on components

Specifies which components the module will be receiving events for

Method for handling core events, add EVENTS feature to the plugin metadata to receive events

Provided methods

Current settings state of the plugin

Method for updating plugin settings from UI

Metadata of the module, auto-implemented for plugins from plugin metadata

Implementors