pub struct BORDER;Expand description
Coordinates nested borders and corner-radius.
Implementations§
Source§impl BORDER
impl BORDER
Sourcepub fn border_offsets(&self) -> PxSideOffsets
pub fn border_offsets(&self) -> PxSideOffsets
Gets the accumulated border offsets on the outside of the current border set on the current widget.
This is only valid to call during layout.
Sourcepub fn inner_offsets(&self) -> PxSideOffsets
pub fn inner_offsets(&self) -> PxSideOffsets
Gets the accumulated border offsets including the current border.
Sourcepub fn border_radius(&self) -> PxCornerRadius
pub fn border_radius(&self) -> PxCornerRadius
Gets the corner radius for the border at the current context.
This value is influenced by CORNER_RADIUS_VAR, CORNER_RADIUS_FIT_VAR and all contextual borders.
Sourcepub fn inner_radius(&self) -> PxCornerRadius
pub fn inner_radius(&self) -> PxCornerRadius
Gets the corner radius for the inside of the current border at the current context.
Sourcepub fn outer_radius(&self) -> PxCornerRadius
pub fn outer_radius(&self) -> PxCornerRadius
Gets the corner radius for the outside of the outer border of the current widget.
Sourcepub fn fill_bounds(&self) -> (PxRect, PxCornerRadius)
pub fn fill_bounds(&self) -> (PxRect, PxCornerRadius)
Gets the bounds and corner radius for the widget fill content.
Must be called during layout in FILL nesting group.
This value is influenced by CORNER_RADIUS_VAR, CORNER_RADIUS_FIT_VAR and BORDER_ALIGN_VAR.
Sourcepub fn measure_border(
&self,
offsets: PxSideOffsets,
f: impl FnOnce() -> PxSize,
) -> PxSize
pub fn measure_border( &self, offsets: PxSideOffsets, f: impl FnOnce() -> PxSize, ) -> PxSize
Measure a border node, adding the offsets to the context for the f call.
Sourcepub fn layout_border(&self, offsets: PxSideOffsets, f: impl FnOnce())
pub fn layout_border(&self, offsets: PxSideOffsets, f: impl FnOnce())
Measure a border node, adding the offsets to the context for the f call.
Sourcepub fn with_corner_radius<R>(&self, f: impl FnOnce() -> R) -> R
pub fn with_corner_radius<R>(&self, f: impl FnOnce() -> R) -> R
Indicates a boundary point where the CORNER_RADIUS_VAR backing context changes during layout.
The variable must have been just rebound before this call, the corner_radius property implements this method.
Note that the corner radius is not set during measure.
Sourcepub fn border_layout(&self) -> (PxRect, PxSideOffsets)
pub fn border_layout(&self) -> (PxRect, PxSideOffsets)
Gets the computed border rect and side offsets for the border visual.
This is only valid to call in the border visual node during layout and render.
Sourcepub fn with_border_layout(
&self,
rect: PxRect,
offsets: PxSideOffsets,
f: impl FnOnce(),
)
pub fn with_border_layout( &self, rect: PxRect, offsets: PxSideOffsets, f: impl FnOnce(), )
Sets the border layout for the context of f.
Auto Trait Implementations§
impl Freeze for BORDER
impl RefUnwindSafe for BORDER
impl Send for BORDER
impl Sync for BORDER
impl Unpin for BORDER
impl UnwindSafe for BORDER
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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