pub struct GridWidget {
pub col: u32,
pub row: u32,
pub col_span: u32,
pub row_span: u32,
pub param_id: u32,
pub label: &'static str,
pub widget: Option<WidgetKind>,
pub param_id_y: Option<u32>,
pub meter_ids: Option<Vec<u32>>,
}Expand description
A widget placed in a grid layout.
Fields§
§col: u32Grid column (0-indexed, or AUTO for auto-flow).
row: u32Grid row (0-indexed, or AUTO for auto-flow).
col_span: u32Columns spanned (default 1).
row_span: u32Rows spanned (default 1).
param_id: u32Parameter ID (or first meter ID for meters).
label: &'static strDisplay label.
widget: Option<WidgetKind>Widget type override. None = auto-detect from param range.
param_id_y: Option<u32>Second param for XY pad (Y axis).
meter_ids: Option<Vec<u32>>Multiple meter IDs for multi-channel level meter.
Implementations§
Source§impl GridWidget
impl GridWidget
pub fn knob(param_id: impl Into<u32>, label: &'static str) -> GridWidget
pub fn slider(param_id: impl Into<u32>, label: &'static str) -> GridWidget
pub fn toggle(param_id: impl Into<u32>, label: &'static str) -> GridWidget
pub fn selector(param_id: impl Into<u32>, label: &'static str) -> GridWidget
pub fn dropdown(param_id: impl Into<u32>, label: &'static str) -> GridWidget
pub fn meter(ids: &[u32], label: &'static str) -> GridWidget
pub fn xy_pad( param_x: impl Into<u32>, param_y: impl Into<u32>, label: &'static str, ) -> GridWidget
Sourcepub fn cols(self, n: u32) -> GridWidget
pub fn cols(self, n: u32) -> GridWidget
Set the column span.
Sourcepub fn rows(self, n: u32) -> GridWidget
pub fn rows(self, n: u32) -> GridWidget
Set the row span.
Sourcepub fn at(self, col: u32, row: u32) -> GridWidget
pub fn at(self, col: u32, row: u32) -> GridWidget
Set explicit grid position (overrides auto-flow for this widget).
Trait Implementations§
Source§impl Clone for GridWidget
impl Clone for GridWidget
Source§fn clone(&self) -> GridWidget
fn clone(&self) -> GridWidget
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GridWidget
impl Debug for GridWidget
Source§impl From<GridWidget> for Section
impl From<GridWidget> for Section
Source§fn from(w: GridWidget) -> Section
fn from(w: GridWidget) -> Section
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for GridWidget
impl RefUnwindSafe for GridWidget
impl Send for GridWidget
impl Sync for GridWidget
impl Unpin for GridWidget
impl UnsafeUnpin for GridWidget
impl UnwindSafe for GridWidget
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