pub struct DropdownState {
pub region_idx: usize,
pub param_id: u32,
pub popup_rect: (f32, f32, f32, f32),
pub options: Vec<String>,
pub selected: usize,
pub hover_option: Option<usize>,
pub scroll_offset: usize,
pub visible_count: usize,
}Expand description
State for an open dropdown popup.
Fields§
§region_idx: usizeRegion index of the dropdown widget that is open.
param_id: u32Parameter ID of the open dropdown.
popup_rect: (f32, f32, f32, f32)Popup bounding rect: (x, y, w, h).
options: Vec<String>Option labels.
selected: usizeCurrently selected index.
hover_option: Option<usize>Index under the cursor within the popup.
scroll_offset: usizeFirst visible option index (for scrollable popups).
visible_count: usizeNumber of visible options (may be less than options.len() if clamped).
Auto Trait Implementations§
impl Freeze for DropdownState
impl RefUnwindSafe for DropdownState
impl Send for DropdownState
impl Sync for DropdownState
impl Unpin for DropdownState
impl UnsafeUnpin for DropdownState
impl UnwindSafe for DropdownState
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