pub struct HitTestEntry { /* private fields */ }Expand description
The gesture recognizers and the details their callbacks carry, which a GestureDetector
takes: Flutter’s package:flutter/gestures.dart, which its widget library imports rather than
re-exports.
Data collected during a hit test about a specific HitTestTarget.
Subclass this object to pass additional information from the hit test phase to the event propagation phase.
Implementations§
Source§impl HitTestEntry
impl HitTestEntry
Sourcepub fn new(target: impl HitTestTarget + 'static) -> HitTestEntry
pub fn new(target: impl HitTestTarget + 'static) -> HitTestEntry
Creates a hit test entry.
Sourcepub fn target(&self) -> &(dyn HitTestTarget + 'static)
pub fn target(&self) -> &(dyn HitTestTarget + 'static)
The HitTestTarget encountered during the hit test.
The target as the Rc that holds it, to keep it past the hit test.
Sourcepub fn transform(&self) -> Option<Matrix>
pub fn transform(&self) -> Option<Matrix>
Returns a matrix describing how PointerEvents delivered to this
HitTestEntry should be transformed from the global coordinate space of
the screen to the local coordinate space of target.
See also:
BoxHitTestResult.addWithPaintTransform, which is used during hit testing to build up this transform.
Trait Implementations§
Source§impl Debug for HitTestEntry
impl Debug for HitTestEntry
Source§impl From<BoxHitTestEntry> for HitTestEntry
impl From<BoxHitTestEntry> for HitTestEntry
Source§fn from(entry: BoxHitTestEntry) -> HitTestEntry
fn from(entry: BoxHitTestEntry) -> HitTestEntry
Source§impl From<Rc<dyn HitTestTarget>> for HitTestEntry
An entry for a target that others hold too, such as a span of a paragraph’s text.
impl From<Rc<dyn HitTestTarget>> for HitTestEntry
An entry for a target that others hold too, such as a span of a paragraph’s text.
Source§fn from(target: Rc<dyn HitTestTarget>) -> HitTestEntry
fn from(target: Rc<dyn HitTestTarget>) -> HitTestEntry
Source§impl From<SliverHitTestEntry> for HitTestEntry
impl From<SliverHitTestEntry> for HitTestEntry
Source§fn from(entry: SliverHitTestEntry) -> HitTestEntry
fn from(entry: SliverHitTestEntry) -> HitTestEntry
Auto Trait Implementations§
impl !RefUnwindSafe for HitTestEntry
impl !Send for HitTestEntry
impl !Sync for HitTestEntry
impl !UnwindSafe for HitTestEntry
impl Forget for HitTestEntry
impl Freeze for HitTestEntrywhere
*const RcInner<dyn HitTestTarget> is !null: Freeze,
PhantomData<RcInner<dyn HitTestTarget>>: Freeze,
impl Move for HitTestEntry
impl Unpin for HitTestEntry
impl UnsafeUnpin for HitTestEntrywhere
*const RcInner<dyn HitTestTarget> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn HitTestTarget>>: UnsafeUnpin,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.