Struct rat_input::util::MouseFlags
source · pub struct MouseFlags {
pub armed: Option<SystemTime>,
pub drag: bool,
}Expand description
Small helper for handling mouse-events.
Fields§
§armed: Option<SystemTime>§drag: boolImplementations§
source§impl MouseFlags
impl MouseFlags
sourcepub fn do_drag(&self) -> bool
pub fn do_drag(&self) -> bool
Handling mouse drag events for this widget is enabled. It may make sense for a component to track mouse events outside its area. But usually with some limitations. This flag signals that those limits have been met, and drag event should be processed.
sourcepub fn clear_drag(&mut self)
pub fn clear_drag(&mut self)
Clear the do-drag flag.
sourcepub fn reset_trigger(&mut self)
pub fn reset_trigger(&mut self)
Reset the double-click trigger.
sourcepub fn arm_trigger(&mut self)
pub fn arm_trigger(&mut self)
Unconditionally set a new time for the trigger.
sourcepub fn pull_trigger(&mut self, time_out: u64) -> bool
pub fn pull_trigger(&mut self, time_out: u64) -> bool
Pull the trigger, returns true if the action is triggered.
Trait Implementations§
source§impl Clone for MouseFlags
impl Clone for MouseFlags
source§fn clone(&self) -> MouseFlags
fn clone(&self) -> MouseFlags
Returns a copy 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 MouseFlags
impl Debug for MouseFlags
source§impl Default for MouseFlags
impl Default for MouseFlags
source§fn default() -> MouseFlags
fn default() -> MouseFlags
Returns the “default value” for a type. Read more
source§impl PartialEq for MouseFlags
impl PartialEq for MouseFlags
source§fn eq(&self, other: &MouseFlags) -> bool
fn eq(&self, other: &MouseFlags) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for MouseFlags
impl StructuralPartialEq for MouseFlags
Auto Trait Implementations§
impl Freeze for MouseFlags
impl RefUnwindSafe for MouseFlags
impl Send for MouseFlags
impl Sync for MouseFlags
impl Unpin for MouseFlags
impl UnwindSafe for MouseFlags
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