pub trait ContextMenuBinExt: 'static {
// Required methods
fn has_context_menu(&self) -> bool;
fn set_has_context_menu(&self, has_context_menu: bool);
fn popover(&self) -> Option<PopoverMenu>;
fn set_popover(&self, popover: Option<PopoverMenu>);
fn child(&self) -> Option<Widget>;
fn set_child(&self, child: Option<&impl IsA<Widget>>);
fn menu_opened(&self);
}
Required Methods§
Whether this widget has a context menu.
Set whether this widget has a context menu.
Sourcefn popover(&self) -> Option<PopoverMenu>
fn popover(&self) -> Option<PopoverMenu>
Get the PopoverMenu
used in the context menu.
Sourcefn set_popover(&self, popover: Option<PopoverMenu>)
fn set_popover(&self, popover: Option<PopoverMenu>)
Set the PopoverMenu
used in the context menu.
Called when the menu was requested to open but before the menu is shown.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.