pub struct HitTargetSpec<'a, I> {
pub shape: Option<RoundedCornerShape>,
pub click_actions: I,
pub pointer_inputs: &'a [Rc<dyn Fn(PointerEvent)>],
pub pointer_icon: Option<&'a PointerIcon>,
}Expand description
What a hit target answers with: the shape that narrows its bounds, the handlers it dispatches to, and the pointer icon it asks for while hovered.
Fields§
§shape: Option<RoundedCornerShape>Narrows the target’s rectangle to a rounded shape, so a point in a corner cutout misses it.
click_actions: IClick handlers, invoked on an unconsumed press inside the target.
pointer_inputs: &'a [Rc<dyn Fn(PointerEvent)>]Raw pointer handlers, invoked for every event the target receives.
pointer_icon: Option<&'a PointerIcon>The pointer’s appearance while it hovers this target.
Auto Trait Implementations§
impl<'a, I> !RefUnwindSafe for HitTargetSpec<'a, I>
impl<'a, I> !Send for HitTargetSpec<'a, I>
impl<'a, I> !Sync for HitTargetSpec<'a, I>
impl<'a, I> !UnwindSafe for HitTargetSpec<'a, I>
impl<'a, I> Freeze for HitTargetSpec<'a, I>where
I: Freeze,
impl<'a, I> Unpin for HitTargetSpec<'a, I>where
I: Unpin,
impl<'a, I> UnsafeUnpin for HitTargetSpec<'a, I>where
I: 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
Mutably borrows from an owned value. Read more