Skip to main content

SelectionGesture

Trait SelectionGesture 

Source
pub trait SelectionGesture: 'static {
    // Required method
    fn edit(&self, context: &SelectionGestureContext) -> SelectionEdit;
}
Expand description

How a press or a navigation command edits the selection. Called once per gesture on the UI thread. Space toggles and Cmd/Ctrl+A selects all whatever it says.

The default is StandardSelectionGesture, the Windows and macOS conventions with Excel’s “navigation selects”. Others are plausible: as AG Grid (navigation only moves the focus, Keep, and Space selects), as Finder (Shift adds a range), or touch (a press toggles).

Required Methods§

Source

fn edit(&self, context: &SelectionGestureContext) -> SelectionEdit

The edit the gesture makes.

Implementors§