pub struct VelocityDragConfig {
pub sensitivity: f64,
pub threshold: i32,
pub offset: f64,
pub allow_modifier_toggle: bool,
pub toggle_modifiers: Modifiers,
}Expand description
Configuration for velocity-based dragging
Fields§
§sensitivity: f64Sensitivity multiplier (higher = more responsive). Default: 1.0
threshold: i32Minimum pixel movement before registering as drag. Default: 1
offset: f64Offset added to velocity calculation (higher = faster minimum speed). Default: 0.0
allow_modifier_toggle: boolWhether user can toggle velocity mode with modifier key. Default: true
toggle_modifiers: ModifiersModifier keys that toggle velocity mode. Default: Ctrl/Cmd
Implementations§
Source§impl VelocityDragConfig
impl VelocityDragConfig
Sourcepub const fn sensitivity(self, sensitivity: f64) -> Self
pub const fn sensitivity(self, sensitivity: f64) -> Self
Set sensitivity (higher = more responsive to mouse speed)
Sourcepub fn threshold(self, threshold: i32) -> Self
pub fn threshold(self, threshold: i32) -> Self
Set the minimum pixel threshold for drag detection
Sourcepub const fn allow_modifier_toggle(self, allow: bool) -> Self
pub const fn allow_modifier_toggle(self, allow: bool) -> Self
Enable/disable modifier key toggle for velocity mode
Sourcepub const fn toggle_modifiers(self, modifiers: Modifiers) -> Self
pub const fn toggle_modifiers(self, modifiers: Modifiers) -> Self
Set which modifier keys toggle velocity mode
Trait Implementations§
Source§impl Clone for VelocityDragConfig
impl Clone for VelocityDragConfig
Source§fn clone(&self) -> VelocityDragConfig
fn clone(&self) -> VelocityDragConfig
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 VelocityDragConfig
impl Debug for VelocityDragConfig
Auto Trait Implementations§
impl Freeze for VelocityDragConfig
impl RefUnwindSafe for VelocityDragConfig
impl Send for VelocityDragConfig
impl Sync for VelocityDragConfig
impl Unpin for VelocityDragConfig
impl UnsafeUnpin for VelocityDragConfig
impl UnwindSafe for VelocityDragConfig
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