Struct PointerReplay
pub struct PointerReplay { /* private fields */ }Expand description
The pointer’s last position over one surface, and whether the widgets changed under it since.
Implementations§
§impl PointerReplay
impl PointerReplay
pub fn is_resting(&self) -> bool
pub fn is_resting(&self) -> bool
Whether a pointer rests over the surface with nothing changed under it since it moved: only then can a relayout that moves a control under it go unnoticed, so only then is the geometry worth comparing.
pub fn mark_unsettled(&mut self)
pub fn mark_unsettled(&mut self)
The widgets were rebuilt or moved: a control under the still pointer may not know it is there.
pub fn before(&mut self, event: &WindowEvent) -> Option<WindowEvent>
pub fn before(&mut self, event: &WindowEvent) -> Option<WindowEvent>
Observe event before the host dispatches it. Returns the move to
dispatch first when event is a pointer button and the widgets
changed since the pointer last moved. A press starts afresh: a press
whose release never came (the window lost the pointer) is forgotten.
pub fn ends_press(event: &WindowEvent) -> bool
pub fn ends_press(event: &WindowEvent) -> bool
Whether event ends the press, so the host calls
Self::end_press once it has dispatched it.
pub fn end_press(&mut self)
pub fn end_press(&mut self)
A release was dispatched: the press is over, whether or not a control took it.
Trait Implementations§
§impl Debug for PointerReplay
impl Debug for PointerReplay
§impl Default for PointerReplay
impl Default for PointerReplay
§fn default() -> PointerReplay
fn default() -> PointerReplay
Auto Trait Implementations§
impl Freeze for PointerReplay
impl RefUnwindSafe for PointerReplay
impl Send for PointerReplay
impl Sync for PointerReplay
impl Unpin for PointerReplay
impl UnsafeUnpin for PointerReplay
impl UnwindSafe for PointerReplay
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more