pub struct DoubleClickReset {
pub enabled: bool,
pub default_value: f64,
pub double_click_time: f64,
/* private fields */
}Expand description
Double-click to reset functionality
Fields§
§enabled: boolWhether double-click reset is enabled
default_value: f64The default value to reset to
double_click_time: f64Time window for double-click detection (seconds)
Implementations§
Source§impl DoubleClickReset
impl DoubleClickReset
Sourcepub const fn default_value(self, value: f64) -> Self
pub const fn default_value(self, value: f64) -> Self
Set the default value to reset to
Sourcepub const fn double_click_time(self, seconds: f64) -> Self
pub const fn double_click_time(self, seconds: f64) -> Self
Set the double-click time window
Sourcepub fn on_click(&mut self, current_time: f64) -> bool
pub fn on_click(&mut self, current_time: f64) -> bool
Handle a click and return true if it was a double-click
current_time should be the current time in seconds
Sourcepub const fn reset_value(&self) -> f64
pub const fn reset_value(&self) -> f64
Get the value to reset to
Trait Implementations§
Source§impl Clone for DoubleClickReset
impl Clone for DoubleClickReset
Source§fn clone(&self) -> DoubleClickReset
fn clone(&self) -> DoubleClickReset
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 moreAuto Trait Implementations§
impl Freeze for DoubleClickReset
impl RefUnwindSafe for DoubleClickReset
impl Send for DoubleClickReset
impl Sync for DoubleClickReset
impl Unpin for DoubleClickReset
impl UnsafeUnpin for DoubleClickReset
impl UnwindSafe for DoubleClickReset
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