pub struct EuvDropdownMenuItemProps {
pub label: &'static str,
pub shortcut: &'static str,
pub value: &'static str,
pub disabled: bool,
pub on_select: Option<Rc<dyn Fn(&'static str)>>,
pub open: Signal<bool>,
pub close_on_click: bool,
}Expand description
Props of the euv_dropdown_menu_item component.
A menu item is the leaf of a menu: it carries the label the reader sees, the key hint shown at its trailing edge, and the value handed back when it is chosen.
Fields§
§label: &'static strThe label shown inside the item.
shortcut: &'static strThe key hint shown at the trailing edge of the item.
value: &'static strThe opaque value handed to the select callback.
disabled: boolWhether the item is disabled.
on_select: Option<Rc<dyn Fn(&'static str)>>Optional select callback receiving the chosen value.
open: Signal<bool>The owning root menu’s open state, including for recursive submenu actions. Share this root signal with all action rows; submenu signals control panels only.
close_on_click: boolWhether activation closes the owning menu. Defaults to true.
Implementations§
Source§impl EuvDropdownMenuItemProps
impl EuvDropdownMenuItemProps
pub fn get_label(&self) -> &'static str
pub fn get_mut_label(&mut self) -> &mut &'static str
pub fn set_label(&mut self, val: &'static str) -> &mut Self
pub fn get_shortcut(&self) -> &'static str
pub fn get_mut_shortcut(&mut self) -> &mut &'static str
pub fn set_shortcut(&mut self, val: &'static str) -> &mut Self
pub fn get_value(&self) -> &'static str
pub fn get_mut_value(&mut self) -> &mut &'static str
pub fn set_value(&mut self, val: &'static str) -> &mut Self
pub fn get_disabled(&self) -> bool
pub fn get_mut_disabled(&mut self) -> &mut bool
pub fn set_disabled(&mut self, val: bool) -> &mut Self
pub fn get_on_select(&self) -> Rc<dyn Fn(&'static str) + 'static>
pub fn try_get_on_select(&self) -> &Option<Rc<dyn Fn(&'static str) + 'static>>
pub fn get_mut_on_select( &mut self, ) -> &mut Option<Rc<dyn Fn(&'static str) + 'static>>
pub fn set_on_select( &mut self, val: Option<Rc<dyn Fn(&'static str) + 'static>>, ) -> &mut Self
pub fn get_open(&self) -> &Signal<bool>
pub fn get_mut_open(&mut self) -> &mut Signal<bool>
pub fn set_open(&mut self, val: Signal<bool>) -> &mut Self
pub fn get_close_on_click(&self) -> bool
pub fn get_mut_close_on_click(&mut self) -> &mut bool
pub fn set_close_on_click(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for EuvDropdownMenuItemProps
impl Clone for EuvDropdownMenuItemProps
Source§impl Debug for EuvDropdownMenuItemProps
impl Debug for EuvDropdownMenuItemProps
Source§impl Default for EuvDropdownMenuItemProps
Default construction for EuvDropdownMenuItemProps.
impl Default for EuvDropdownMenuItemProps
Default construction for EuvDropdownMenuItemProps.
Source§fn default() -> Self
fn default() -> Self
Constructs a default EuvDropdownMenuItemProps value.
Auto Trait Implementations§
impl !RefUnwindSafe for EuvDropdownMenuItemProps
impl !Send for EuvDropdownMenuItemProps
impl !Sync for EuvDropdownMenuItemProps
impl !UnwindSafe for EuvDropdownMenuItemProps
impl Forget for EuvDropdownMenuItemProps
impl Freeze for EuvDropdownMenuItemProps
impl Move for EuvDropdownMenuItemProps
impl Unpin for EuvDropdownMenuItemProps
impl UnsafeUnpin for EuvDropdownMenuItemProps
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