Struct ambient_api::prelude::DropdownSelect
source · pub struct DropdownSelect {
pub content: Element,
pub on_select: Arc<CbDebuggable<dyn Fn(usize) + Sync + Send>>,
pub items: Vec<Element>,
pub inline: bool,
}
Expand description
A dropdown select element. Presents a button next to content
that, when clicked, shows a dropdown with the items in items
.
Fields§
§content: Element
The content (always shown)
on_select: Arc<CbDebuggable<dyn Fn(usize) + Sync + Send>>
The callback to call when an item is selected. Called with the index of the item.
items: Vec<Element>
The items to select from.
inline: bool
Whether or not the button used for the dropdown should be inline or not.
Trait Implementations§
source§impl Clone for DropdownSelect
impl Clone for DropdownSelect
source§fn clone(&self) -> DropdownSelect
fn clone(&self) -> DropdownSelect
Returns a copy of the value. Read more
1.0.0 · 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 DropdownSelect
impl Debug for DropdownSelect
source§impl ElementComponent for DropdownSelect
impl ElementComponent for DropdownSelect
Auto Trait Implementations§
impl !RefUnwindSafe for DropdownSelect
impl Send for DropdownSelect
impl Sync for DropdownSelect
impl Unpin for DropdownSelect
impl !UnwindSafe for DropdownSelect
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
source§impl<T> Downcast for T
impl<T> Downcast for T
source§impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
impl<T> ElementComponentExt for Twhere
T: ElementComponent + 'static,
source§impl<T> ElementComponentName for T
impl<T> ElementComponentName for T
source§fn element_component_name(&self) -> &'static str
fn element_component_name(&self) -> &'static str
Returns the name of the type implementing ElementComponent.