Struct druid::menu::MenuEventCtx
source · pub struct MenuEventCtx<'a> { /* private fields */ }
Expand description
This context is available to the callback that is called when a menu item is activated.
Currently, it only allows for submission of Command
s.
Implementations§
source§impl<'a> MenuEventCtx<'a>
impl<'a> MenuEventCtx<'a>
sourcepub fn submit_command(&mut self, cmd: impl Into<Command>)
pub fn submit_command(&mut self, cmd: impl Into<Command>)
Submit a Command
to be handled by the main widget tree.
If the command’s target is Target::Auto
, it will be sent to the menu’s window if the
menu is associated with a window, or to Target::Global
if the menu is not associated
with a window.
See EventCtx::submit_command
for more information.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for MenuEventCtx<'a>
impl<'a> !Send for MenuEventCtx<'a>
impl<'a> !Sync for MenuEventCtx<'a>
impl<'a> Unpin for MenuEventCtx<'a>
impl<'a> !UnwindSafe for MenuEventCtx<'a>
Blanket Implementations§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> RoundFrom<T> for T
impl<T> RoundFrom<T> for T
§fn round_from(x: T) -> T
fn round_from(x: T) -> T
Performs the conversion.
§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere U: RoundFrom<T>,
§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.