#[non_exhaustive]pub struct ContextMenuEvent {
pub position: Point<Points>,
pub page_position: Point<Points>,
pub modifiers: Modifiers,
pub pointer_type: Option<PointerType>,
}Expand description
Where a context menu was asked for (EventKind::ContextMenu), in
points.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.position: Point<Points>Position in the view, its transforms undone: the pointer’s, or, when
no pointer asked (ContextMenuEvent::pointer_type is None), the
view’s bottom-start corner (crate::input::context_menu_anchor).
page_position: Point<Points>Position in the root view the view is in (the surface, or its
modal): where Menu.popup opens a menu.
modifiers: ModifiersThe modifier keys held.
pointer_type: Option<PointerType>The pointer that asked for the menu (the DOM’s pointerType), or
None when none did: the keyboard (Shift+F10, the Menu key) or an
assistive technology’s “show menu” action, which a menu answers
with the keyboard focus on its first item.
Implementations§
Source§impl ContextMenuEvent
impl ContextMenuEvent
Sourcepub fn new(
position: Point<Points>,
page_position: Point<Points>,
modifiers: Modifiers,
pointer_type: Option<PointerType>,
) -> Self
pub fn new( position: Point<Points>, page_position: Point<Points>, modifiers: Modifiers, pointer_type: Option<PointerType>, ) -> Self
A context menu asked for at position in the view and
page_position in its root view, with modifiers held, by
pointer_type (None: the keyboard or an assistive technology).