pub struct WindowPoint(/* private fields */);Expand description
Space 1 — a raw pointer position in window coordinates, exactly as the platform delivered it. Nothing has been unwound.
Implementations§
Source§impl WindowPoint
impl WindowPoint
Sourcepub const fn new(p: LogicalPosition) -> Self
pub const fn new(p: LogicalPosition) -> Self
Assert that p is already in this space.
Only correct at a PRODUCER boundary — the place that computed the point and therefore knows which space it is in. Everywhere else, use one of the named conversions instead; that is the entire point of this module.
Sourcepub const fn get(self) -> LogicalPosition
pub const fn get(self) -> LogicalPosition
Drop back to an untyped position.
Only correct at a CONSUMER boundary that documents which space it wants.
Source§impl WindowPoint
impl WindowPoint
Sourcepub const fn to_static_layout(
self,
ancestor_scroll: ScrollOffset,
) -> StaticLayoutPoint
pub const fn to_static_layout( self, ancestor_scroll: ScrollOffset, ) -> StaticLayoutPoint
Map into the DOM’s static layout space by adding back the accumulated
scroll of the node’s ANCESTORS (w → w + A).
Pass an ancestors-only sum (Inclusivity::AncestorsOnly). Passing a
self-inclusive sum here is the classic double-count.
Trait Implementations§
Source§impl Clone for WindowPoint
impl Clone for WindowPoint
Source§fn clone(&self) -> WindowPoint
fn clone(&self) -> WindowPoint
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WindowPoint
Source§impl Debug for WindowPoint
impl Debug for WindowPoint
Source§impl Default for WindowPoint
impl Default for WindowPoint
Source§fn default() -> WindowPoint
fn default() -> WindowPoint
Returns the “default value” for a type. Read more
impl Eq for WindowPoint
Source§impl Hash for WindowPoint
impl Hash for WindowPoint
Source§impl Ord for WindowPoint
impl Ord for WindowPoint
Source§fn cmp(&self, other: &WindowPoint) -> Ordering
fn cmp(&self, other: &WindowPoint) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for WindowPoint
impl PartialEq for WindowPoint
Source§impl PartialOrd for WindowPoint
impl PartialOrd for WindowPoint
impl StructuralPartialEq for WindowPoint
Auto Trait Implementations§
impl Freeze for WindowPoint
impl RefUnwindSafe for WindowPoint
impl Send for WindowPoint
impl Sync for WindowPoint
impl Unpin for WindowPoint
impl UnsafeUnpin for WindowPoint
impl UnwindSafe for WindowPoint
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