pub struct BorderBoxLocal(/* private fields */);Expand description
Space 3 — relative to a node’s static BORDER-box origin, own scroll NOT applied.
This is what WebRender reports as point_relative_to_item: azul
pushes a scroll container’s hit rect BEFORE its scroll frame, so the
point WR subtracts the rect from is in the parent’s (unscrolled) space.
It is also the space the public CallbackInfo::get_cursor_relative_to_node
promises, which is why widgets that divide by the node’s border-box
width (sliders, split panes, colour wheels, map panning) are correct
against it.
Implementations§
Source§impl BorderBoxLocal
impl BorderBoxLocal
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 BorderBoxLocal
impl BorderBoxLocal
Sourcepub const fn to_static_layout(
self,
border_box_origin: LogicalPosition,
) -> StaticLayoutPoint
pub const fn to_static_layout( self, border_box_origin: LogicalPosition, ) -> StaticLayoutPoint
Back to the DOM’s static layout space (w + A − P → w + A).
Sourcepub const fn to_content_box_local(self, inset: ContentInset) -> ContentBoxLocal
pub const fn to_content_box_local(self, inset: ContentInset) -> ContentBoxLocal
Step in from the border box to the content box (… − P → … − P − E).
Trait Implementations§
Source§impl Clone for BorderBoxLocal
impl Clone for BorderBoxLocal
Source§fn clone(&self) -> BorderBoxLocal
fn clone(&self) -> BorderBoxLocal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more