Skip to main content

Crate aura_editor

Crate aura_editor 

Source
Expand description

AURA host-facing Editor layer.

AuraSlintEditor adapts a Slint component (living on the aura_baseview window stack) to aura_core::editor::Editor, so format wrappers (CLAP / VST3 / LV2) can parent it into a host window.

Window/platform/renderers stay in aura-baseview (re-exported here); only the host adapter couples to aura-core.

§Example

ⓘ
use aura_editor::AuraSlintEditor;

fn editor(_params: Arc<MyParams>) -> Option<Box<dyn Editor>> {
    Some(
        AuraSlintEditor::new(
            (800, 600),
            |ctx| {
                let ui = MyPluginUi::new().unwrap();
                // wire ui callbacks → ctx.bridge / ctx.params …
                ui
            },
            |ui, ctx| {
                // per-frame: push host param values into the component
            },
        )
        .into_editor(),
    )
}

Modules§

baseview_slint_window_adapter
open_gl_interface
platform
Slint platform registration for baseview.
scale
Shared content-scale + size handoff for HiDPI / multi-monitor.
slint_window
translate
typed
Typed editor layer: LxPluginContext<P> + LxSlintEditor<P, C> with UI zoom.
ui_zoom
Product UI zoom (75% / 100% / 125%) — separate from host HiDPI scale.

Structs§

AuraSlintEditor
Slint-based editor implementing aura_core::editor::Editor.
EditorScale
Live content-scale factor shared between the Editor adapter and the baseview window handler.
InitError
Soft-fail error when a renderer backend (OpenGL / wgpu) cannot start. Returned to the host instead of panicking.
SizePolicy
Size / scale policy handed to the window handler at open.
SlintParentedWindow
A parented Slint window together with its native widget handle.

Functions§

fit_size
Clamp a host logical size into [min, max].
pack_size
Pack (width, height) into a u64 for atomic handoff. 0 = none.
to_physical_px
Convert logical points → physical pixels (round-to-nearest, min 1).
unpack_size

Type Aliases§

BuildFn
Build closure: creates the Slint component and wires UI callbacks. Called once when the host opens the editor.
GlInitError
Kept for compatibility; same type as InitError.
RequestResizeFn
Host resize request: (logical_w, logical_h) -> accepted.
SyncFn
Per-frame sync closure: pushes host parameter values into the component.