pub struct HitTestItem {
pub point_in_viewport: LogicalPosition,
pub point_relative_to_item: LogicalPosition,
pub is_focusable: bool,
pub is_iframe_hit: Option<(DomId, LogicalPosition)>,
}
Fields§
§point_in_viewport: LogicalPosition
The hit point in the coordinate space of the “viewport” of the display item. The viewport is the scroll node formed by the root reference frame of the display item’s pipeline.
point_relative_to_item: LogicalPosition
The coordinates of the original hit test point relative to the origin of this item. This is useful for calculating things like text offsets in the client.
is_focusable: bool
Necessary to easily get the nearest IFrame node
is_iframe_hit: Option<(DomId, LogicalPosition)>
If this hit is an IFrame node, stores the IFrames DomId + the origin of the IFrame
Trait Implementations§
Source§impl Clone for HitTestItem
impl Clone for HitTestItem
Source§fn clone(&self) -> HitTestItem
fn clone(&self) -> HitTestItem
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 HitTestItem
impl Debug for HitTestItem
Source§impl PartialEq for HitTestItem
impl PartialEq for HitTestItem
Source§impl PartialOrd for HitTestItem
impl PartialOrd for HitTestItem
impl Copy for HitTestItem
impl StructuralPartialEq for HitTestItem
Auto Trait Implementations§
impl Freeze for HitTestItem
impl RefUnwindSafe for HitTestItem
impl Send for HitTestItem
impl Sync for HitTestItem
impl Unpin for HitTestItem
impl UnwindSafe for HitTestItem
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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