pub struct KnobDef {
pub param_id: u32,
pub label: &'static str,
pub widget: Option<WidgetKind>,
pub span: u32,
pub param_id_y: Option<u32>,
pub meter_ids: Option<Vec<u32>>,
}Expand description
A widget definition for the layout - either explicit type or auto-detected.
Fields§
§param_id: u32§label: &'static str§widget: Option<WidgetKind>Explicit widget type override. None = auto-detect from param range.
span: u32How many grid columns this widget spans. Default = 1.
param_id_y: Option<u32>Second parameter ID for XY pad (Y axis). Ignored for other widgets.
meter_ids: Option<Vec<u32>>Multiple meter IDs for multi-channel level meter. Ignored for other widgets.
Implementations§
Source§impl KnobDef
impl KnobDef
Sourcepub fn knob(param_id: impl Into<u32>, label: &'static str) -> Self
pub fn knob(param_id: impl Into<u32>, label: &'static str) -> Self
Knob (default for continuous params, auto-detected anyway).
Sourcepub fn selector(param_id: impl Into<u32>, label: &'static str) -> Self
pub fn selector(param_id: impl Into<u32>, label: &'static str) -> Self
Selector (click-to-cycle for enum params).
Sourcepub fn dropdown(param_id: impl Into<u32>, label: &'static str) -> Self
pub fn dropdown(param_id: impl Into<u32>, label: &'static str) -> Self
Dropdown list (click to open a popup showing all options).
Sourcepub fn meter(ids: &[u32], label: &'static str) -> Self
pub fn meter(ids: &[u32], label: &'static str) -> Self
Level meter with one or more channels (display-only, reads from Plugin::get_meter()).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KnobDef
impl RefUnwindSafe for KnobDef
impl Send for KnobDef
impl Sync for KnobDef
impl Unpin for KnobDef
impl UnsafeUnpin for KnobDef
impl UnwindSafe for KnobDef
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more