pub struct MenuFlyout { /* private fields */ }Expand description
Persistent owner of a collection displayed by a MenuFlyoutPresenter.
Keep the MenuFlyout for as long as its flyout (see as_flyout) is in use: the flyout’s
closures name the menu without keeping it.
Implementations§
Source§impl MenuFlyout
impl MenuFlyout
Sourcepub fn new(app: &mut App, items: Vec<MenuFlyoutItem>) -> Ref<Self>
pub fn new(app: &mut App, items: Vec<MenuFlyoutItem>) -> Ref<Self>
Creates a root menu; checked values follow the kit’s owner-state convention.
Sourcepub fn as_flyout(self: Handle<Self>, app: &App) -> &Ref<Flyout>
pub fn as_flyout(self: Handle<Self>, app: &App) -> &Ref<Flyout>
Returns the shared flyout object for DropDownButton, placement and lifecycle callbacks.
Call .handle() to use it, or .clone() to keep it.
Sourcepub fn items(self: Handle<Self>, app: &mut App, items: Vec<MenuFlyoutItem>)
pub fn items(self: Handle<Self>, app: &mut App, items: Vec<MenuFlyoutItem>)
Replaces the item configuration while preserving keyed item state.
Sourcepub fn show_at(self: Handle<Self>, app: &mut App, target: BuildContext)
pub fn show_at(self: Handle<Self>, app: &mut App, target: BuildContext)
Shows from a context beneath FlyoutTarget.
Sourcepub fn show_at_with_options(
self: Handle<Self>,
app: &mut App,
target: BuildContext,
options: FlyoutShowOptions,
)
pub fn show_at_with_options( self: Handle<Self>, app: &mut App, target: BuildContext, options: FlyoutShowOptions, )
Shows with per-opening placement and input policy.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for MenuFlyout
impl !Send for MenuFlyout
impl !Sync for MenuFlyout
impl !UnwindSafe for MenuFlyout
impl Forget for MenuFlyout
impl Freeze for MenuFlyoutwhere
NonZero<u32>: Freeze,
PhantomData<fn() -> Flyout>: Freeze,
*const RcInner<Keep> is !null: Freeze,
PhantomData<RcInner<Keep>>: Freeze,
*const u8 is !null: Freeze,
PhantomData<MenuFlyoutItem>: Freeze,
PhantomData<fn() -> MenuFlyoutPresenterState>: Freeze,
PhantomData<fn() -> MenuFlyout>: Freeze,
PhantomData<fn() -> MenuItemState>: Freeze,
*const RcInner<dyn Fn(&mut App, Handle<MenuFlyout>, &KeyEvent) -> KeyEventResult> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&mut App, Handle<MenuFlyout>, &KeyEvent) -> KeyEventResult>>: Freeze,
impl Move for MenuFlyout
impl Unpin for MenuFlyout
impl UnsafeUnpin for MenuFlyoutwhere
NonZeroU32Inner: UnsafeUnpin,
PhantomData<fn() -> Flyout>: UnsafeUnpin,
*const RcInner<Keep> is !null: UnsafeUnpin,
PhantomData<RcInner<Keep>>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<MenuFlyoutItem>: UnsafeUnpin,
PhantomData<fn() -> MenuFlyoutPresenterState>: UnsafeUnpin,
PhantomData<fn() -> MenuFlyout>: UnsafeUnpin,
PhantomData<fn() -> MenuItemState>: UnsafeUnpin,
*const RcInner<dyn Fn(&mut App, Handle<MenuFlyout>, &KeyEvent) -> KeyEventResult> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&mut App, Handle<MenuFlyout>, &KeyEvent) -> KeyEventResult>>: UnsafeUnpin,
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