pub trait RowDragGesture<R: GridRow>: 'static {
// Required method
fn is_drag_press(&self, press: &RowDragPressContext<'_, R>) -> bool;
// Provided methods
fn threshold(&self) -> Pixels { ... }
fn is_enabled(&self) -> bool { ... }
}Expand description
Which presses on the rows may become a row drag. A press that may starts
no drag-selection; past Self::threshold the drag starts, carrying the
command scope of the pressed row. Asked once per press.
The default is NoRowDrag: rows do not drag. SelectedRowsDrag is
the built-in alternative, LiveGrid’s two-phase gesture.
Required Methods§
Sourcefn is_drag_press(&self, press: &RowDragPressContext<'_, R>) -> bool
fn is_drag_press(&self, press: &RowDragPressContext<'_, R>) -> bool
Returns true if press may become a row drag.
Provided Methods§
Sourcefn threshold(&self) -> Pixels
fn threshold(&self) -> Pixels
How far the pointer travels from the press before the drag starts. Default: 10 px.
Sourcefn is_enabled(&self) -> bool
fn is_enabled(&self) -> bool
Returns false if no press ever drags: the grid then installs no drag listeners at all. Default: true.