pub enum UiComponent {
Show 24 variants
Group {
label: String,
children: Vec<UiComponent>,
},
Row {
children: Vec<UiComponent>,
},
Column {
children: Vec<UiComponent>,
},
Tabs {
tabs: Vec<UiTab>,
},
Knob {
label: String,
param_id: u32,
min: f32,
max: f32,
logarithmic: bool,
},
Slider {
label: String,
param_id: u32,
min: f32,
max: f32,
},
Toggle {
label: String,
param_id: u32,
},
Dropdown {
label: String,
param_id: u32,
options: Vec<String>,
},
ButtonGroup {
label: String,
param_id: u32,
options: Vec<String>,
},
ColorPicker {
label: String,
r_param_id: u32,
g_param_id: u32,
b_param_id: u32,
},
HueSlider {
label: String,
param_id: u32,
},
XYPad {
label: String,
x_param_id: u32,
y_param_id: u32,
},
Curves {
label: String,
param_id: u32,
},
AudioScope {
label: String,
source: AudioSource,
},
BeatButton {
label: String,
trigger_id: u32,
division: NoteDivision,
},
ActionButton {
label: String,
action_id: String,
},
TriggerButton {
label: String,
param_id: u32,
},
ModulationSlot {
label: String,
target_param_id: u32,
},
ControlPreview {
label: String,
port_name: String,
history_length: u32,
},
ControlTargetSelector {
label: String,
port_name: String,
},
Label {
text: String,
},
Separator,
Spacer {
height: f32,
},
Custom {
widget_id: String,
props: HashMap<String, String>,
},
}Expand description
UI Component - the AST of the UI DSL
MODs return this structure to define their UI. Host interprets and renders using egui.
Variants§
Group
Grouped section with label
Row
Horizontal row of components
Fields
children: Vec<UiComponent>Column
Vertical column of components
Fields
children: Vec<UiComponent>Tabs
Tabbed sections
Knob
Rotary knob (best for VJ performance)
Slider
Horizontal slider
Toggle
On/off toggle
Dropdown
Dropdown selection
ButtonGroup
Button group (radio button style for VJ)
ColorPicker
Color picker (RGB) - for 3-param use cases
HueSlider
Hue slider (single param) - for WIT ColorPicker (0.0 = red, 1.0 = red wrap)
XYPad
2D XY pad controller
Curves
Bezier curve editor
AudioScope
Audio waveform/spectrum visualizer
BeatButton
Beat-synced trigger button
ActionButton
Action button (one-shot trigger via Action System)
TriggerButton
Trigger button - param-based one-shot (sends 1.0 for one frame, auto-resets to 0.0)
ModulationSlot
Modulation source slot (for patching)
ControlPreview
Control signal preview (waveform display for LFO, envelope, etc.)
Fields
ControlTargetSelector
Control target selector for ControlOutput nodes (LFO, etc.)
Displays a dropdown to select which node/parameter this control output should modulate. The actual connection is managed by the host.
Label
Static label text
Separator
Separator line
Spacer
Spacer
Custom
Custom widget rendered by host
For complex widgets that can’t be expressed in DSL. Host looks up a custom renderer by widget_id.
Implementations§
Source§impl UiComponent
impl UiComponent
Sourcepub fn row(children: Vec<UiComponent>) -> Self
pub fn row(children: Vec<UiComponent>) -> Self
Create a row
Sourcepub fn column(children: Vec<UiComponent>) -> Self
pub fn column(children: Vec<UiComponent>) -> Self
Create a column
Sourcepub fn knob_log(
label: impl Into<String>,
param_id: u32,
min: f32,
max: f32,
) -> Self
pub fn knob_log( label: impl Into<String>, param_id: u32, min: f32, max: f32, ) -> Self
Create a logarithmic knob
Sourcepub fn slider(
label: impl Into<String>,
param_id: u32,
min: f32,
max: f32,
) -> Self
pub fn slider( label: impl Into<String>, param_id: u32, min: f32, max: f32, ) -> Self
Create a slider
Sourcepub fn dropdown(
label: impl Into<String>,
param_id: u32,
options: Vec<String>,
) -> Self
pub fn dropdown( label: impl Into<String>, param_id: u32, options: Vec<String>, ) -> Self
Create a dropdown
Create a button group
Sourcepub fn xy_pad(
label: impl Into<String>,
x_param_id: u32,
y_param_id: u32,
) -> Self
pub fn xy_pad( label: impl Into<String>, x_param_id: u32, y_param_id: u32, ) -> Self
Create an XY pad
Sourcepub fn audio_scope(label: impl Into<String>, source: AudioSource) -> Self
pub fn audio_scope(label: impl Into<String>, source: AudioSource) -> Self
Create an audio scope
Create a beat button
Create an action button (one-shot trigger via Action System)
Create a trigger button (param-based one-shot, auto-resets to 0.0)
Sourcepub fn mod_slot(label: impl Into<String>, target_param_id: u32) -> Self
pub fn mod_slot(label: impl Into<String>, target_param_id: u32) -> Self
Create a modulation slot
Sourcepub fn control_preview(
label: impl Into<String>,
port_name: impl Into<String>,
history_length: u32,
) -> Self
pub fn control_preview( label: impl Into<String>, port_name: impl Into<String>, history_length: u32, ) -> Self
Create a control preview (waveform display for control signals)
Trait Implementations§
Source§impl Clone for UiComponent
impl Clone for UiComponent
Source§fn clone(&self) -> UiComponent
fn clone(&self) -> UiComponent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more