truce-iced 1.0.5

Iced GUI backend for truce plugins
docs.rs failed to build truce-iced-1.0.5
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: truce-iced-1.0.4

truce-iced

Iced GUI backend for truce audio plugins.

Overview

Provides an alternative GUI backend using Iced's retained-mode widget toolkit with its Elm-inspired architecture. Use this when you want a declarative, message-driven UI with Iced's layout engine and widget ecosystem.

AutoPlugin can auto-generate a parameter UI from a GridLayout, while IcedPlugin gives full control for custom designs.

Key types

  • IcedEditor -- the Editor implementation
  • IcedPlugin -- trait for defining a fully custom iced UI (view, update, message)
  • AutoPlugin -- auto-generated UI from parameter definitions and GridLayout

Usage

struct MyIcedUi;

impl<P: Params> IcedPlugin<P> for MyIcedUi {
    type Message = MyMessage;

    fn new(params: Arc<P>) -> Self { /* build initial model */ }

    fn view<'a>(&'a self, params: &'a ParamCache<P>) -> Element<'a, Message<MyMessage>> {
        // Build your iced widget tree here
    }

    fn update(
        &mut self,
        message: Message<MyMessage>,
        params: &ParamCache<P>,
        ctx: &PluginContext<P>,
    ) -> Task<Message<MyMessage>> {
        // Handle messages
        Task::none()
    }
}

Part of truce. Docs.