pub struct SubMenuBuilder<'a, Data> { /* private fields */ }
Expand description
Builder for a SubMenu
Access through MenuBar::builder
.
Implementations§
Source§impl<'a, Data> SubMenuBuilder<'a, Data>
impl<'a, Data> SubMenuBuilder<'a, Data>
Source§impl<'a, Data: 'static> SubMenuBuilder<'a, Data>
impl<'a, Data: 'static> SubMenuBuilder<'a, Data>
Sourcepub fn push_entry<S: Into<AccessString>, M>(&mut self, label: S, msg: M)
pub fn push_entry<S: Into<AccessString>, M>(&mut self, label: S, msg: M)
Append a MenuEntry
Sourcepub fn entry<S: Into<AccessString>, M>(self, label: S, msg: M) -> Self
pub fn entry<S: Into<AccessString>, M>(self, label: S, msg: M) -> Self
Append a MenuEntry
, chain style
Sourcepub fn push_toggle<M: Debug + 'static>(
&mut self,
label: impl Into<AccessString>,
state_fn: impl Fn(&ConfigCx<'_>, &Data) -> bool + 'static,
msg_fn: impl Fn(bool) -> M + 'static,
)
pub fn push_toggle<M: Debug + 'static>( &mut self, label: impl Into<AccessString>, state_fn: impl Fn(&ConfigCx<'_>, &Data) -> bool + 'static, msg_fn: impl Fn(bool) -> M + 'static, )
Append a MenuToggle
Sourcepub fn toggle<M: Debug + 'static>(
self,
label: impl Into<AccessString>,
state_fn: impl Fn(&ConfigCx<'_>, &Data) -> bool + 'static,
msg_fn: impl Fn(bool) -> M + 'static,
) -> Self
pub fn toggle<M: Debug + 'static>( self, label: impl Into<AccessString>, state_fn: impl Fn(&ConfigCx<'_>, &Data) -> bool + 'static, msg_fn: impl Fn(bool) -> M + 'static, ) -> Self
Append a MenuToggle
, chain style
Sourcepub fn push_separator(&mut self)
pub fn push_separator(&mut self)
Append a Separator
Append a SubMenu
This submenu prefers opens to the right.
Append a SubMenu
, chain style
This submenu prefers opens to the right.
Append a SubMenu
This submenu prefers to open in the specified direction.
Append a SubMenu
, chain style
This submenu prefers to open in the specified direction.
Auto Trait Implementations§
impl<'a, Data> Freeze for SubMenuBuilder<'a, Data>
impl<'a, Data> !RefUnwindSafe for SubMenuBuilder<'a, Data>
impl<'a, Data> !Send for SubMenuBuilder<'a, Data>
impl<'a, Data> !Sync for SubMenuBuilder<'a, Data>
impl<'a, Data> Unpin for SubMenuBuilder<'a, Data>
impl<'a, Data> !UnwindSafe for SubMenuBuilder<'a, Data>
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<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
impl<S, T> CastApprox<T> for Swhere
T: ConvApprox<S>,
Source§fn try_cast_approx(self) -> Result<T, Error>
fn try_cast_approx(self) -> Result<T, Error>
Source§fn cast_approx(self) -> T
fn cast_approx(self) -> T
Source§impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
Source§fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
Source§fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
Source§fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.