pub struct HitRegion {
pub x: f32,
pub y: f32,
pub width: f32,
pub height: f32,
pub on_tap: String,
pub cursor: Cursor,
pub instance: Option<String>,
}Expand description
An absolutely-positioned tappable region, carrying its @tap handler source.
Fields§
§x: f32§y: f32§width: f32§height: f32§on_tap: String§cursor: CursorThe cursor for this region, so the shell can set the pointer shape when
it hovers here. Carried on the hit region because that is the geometry the
shell already hit-tests; a cursor on a non-tappable box is not honored.
instance: Option<String>The component instance this handler was written in, if any. Its state is what the handler reads and writes, and two instances of one component carry identical handler text, so the text alone cannot say which.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HitRegion
impl RefUnwindSafe for HitRegion
impl Send for HitRegion
impl Sync for HitRegion
impl Unpin for HitRegion
impl UnsafeUnpin for HitRegion
impl UnwindSafe for HitRegion
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