pub struct Menu {
pub target: Key,
pub at: Vec2,
pub origin: OriginId,
pub items: Vec<MenuItem>,
}Expand description
The menu a window has open: its items, where it opened, and what it is about. One per window — opening a second closes the first, the way one selection closes the last.
Fields§
§target: KeyThe node the menu was opened over. Chosen items post their event on it, so an app reads a menu the way it reads a click.
at: Vec2Where it opens, logical viewport px — the press point, which is where every platform puts a context menu.
origin: OriginIdWho asked for it: the host, or the extension whose node it is about. Carried onto the events the items post.
items: Vec<MenuItem>Implementations§
Trait Implementations§
impl StructuralPartialEq for Menu
Auto Trait Implementations§
impl Freeze for Menu
impl RefUnwindSafe for Menu
impl Send for Menu
impl Sync for Menu
impl Unpin for Menu
impl UnsafeUnpin for Menu
impl UnwindSafe for Menu
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