pub struct DragConfig {
pub threshold_cells: u16,
pub start_delay_ms: u64,
pub cancel_on_escape: bool,
}Expand description
Configuration for drag gesture detection.
Controls how mouse movement is interpreted as a drag versus a click.
Fields§
§threshold_cells: u16Minimum movement in cells before a drag starts (default: 3).
start_delay_ms: u64Delay in milliseconds before drag starts (default: 0).
A non-zero delay requires the user to hold the mouse button for this long before movement triggers a drag.
cancel_on_escape: boolWhether pressing Escape cancels an active drag (default: true).
Implementations§
Source§impl DragConfig
impl DragConfig
Sourcepub fn with_threshold(self, cells: u16) -> Self
pub fn with_threshold(self, cells: u16) -> Self
Create a config with custom threshold.
Sourcepub fn with_delay(self, ms: u64) -> Self
pub fn with_delay(self, ms: u64) -> Self
Create a config with start delay.
Sourcepub fn no_escape_cancel(self) -> Self
pub fn no_escape_cancel(self) -> Self
Create a config where Escape does not cancel drags.
Trait Implementations§
Source§impl Clone for DragConfig
impl Clone for DragConfig
Source§fn clone(&self) -> DragConfig
fn clone(&self) -> DragConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DragConfig
impl Debug for DragConfig
Auto Trait Implementations§
impl Freeze for DragConfig
impl RefUnwindSafe for DragConfig
impl Send for DragConfig
impl Sync for DragConfig
impl Unpin for DragConfig
impl UnwindSafe for DragConfig
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