pub trait ContextMenuGesture: 'static {
// Required method
fn opens_menu(&self, context: &ContextMenuGestureContext) -> bool;
}Expand description
Which press opens the context menu. Called once per press on the UI
thread, on the body and on the header; the ShowContextMenu Action
opens the menu whatever it says.
On the body, a press that opens the menu first edits the selection as
GestureInput::ContextPointer through the SelectionGesture; any
other primary-button press is a GestureInput::Pointer press. On the
header it opens the column’s menu instead of sorting or resizing.
The default is StandardContextMenuGesture. Others are plausible: the
right button only, so a Ctrl+click on macOS is a plain press; Ctrl+click
on every platform; no pointer menu at all, only the keyboard’s.
Required Methods§
Returns true if the press opens the context menu.