pub struct AnchorOffset {
pub place: Point,
pub origin: Point,
}Expand description
Represents two points that position a layer widget with its anchor widget.
The place point is layout in the anchor widget bounds, the origin point is layout in the layer widget bounds,
the layer widget is offset so that the origin point aligns with the place point.
Fields§
§place: PointPoint in the anchor widget.
origin: PointPoint in the layer widget.
Implementations§
Source§impl AnchorOffset
impl AnchorOffset
Sourcepub fn in_top() -> Self
pub fn in_top() -> Self
Layer widget is horizontally centered on the anchor widget and the top edge aligns.
Sourcepub fn in_bottom() -> Self
pub fn in_bottom() -> Self
Layer widget is horizontally centered on the anchor widget and the bottom edge aligns.
Sourcepub fn in_left() -> Self
pub fn in_left() -> Self
Layer widget is vertically centered on the anchor widget and the left edge aligns.
Sourcepub fn in_right() -> Self
pub fn in_right() -> Self
Layer widget is vertically centered on the anchor widget and the right edge aligns.
Sourcepub fn in_top_left() -> Self
pub fn in_top_left() -> Self
Layer widget top-left corner aligns with the anchor widget top-left corner.
Sourcepub fn in_top_right() -> Self
pub fn in_top_right() -> Self
Layer widget top-right corner aligns with the anchor widget top-right corner.
Sourcepub fn in_bottom_left() -> Self
pub fn in_bottom_left() -> Self
Layer widget bottom-left corner aligns with the anchor widget bottom-left corner.
Sourcepub fn in_bottom_right() -> Self
pub fn in_bottom_right() -> Self
Layer widget bottom-right corner aligns with the anchor widget bottom-right corner.
Sourcepub fn out_top() -> Self
pub fn out_top() -> Self
Layer widget is horizontally centered on the anchor widget and its bottom edge aligns with the anchors top edge.
Sourcepub fn out_bottom() -> Self
pub fn out_bottom() -> Self
Layer widget is horizontally centered on the anchor widget and its top edge aligns with the anchors bottom edge.
Sourcepub fn out_left() -> Self
pub fn out_left() -> Self
Layer widget is vertically centered on the anchor widget and its right edge aligns with the anchors left edge.
Sourcepub fn out_right() -> Self
pub fn out_right() -> Self
Layer widget is vertically centered on the anchor widget and its left edge aligns with the anchors right edge.
Sourcepub fn out_top_left() -> Self
pub fn out_top_left() -> Self
Layer widget bottom-right corner aligns with anchor widget top-left corner.
Sourcepub fn out_top_right() -> Self
pub fn out_top_right() -> Self
Layer widget bottom-left corner aligns with anchor widget top-right corner.
Sourcepub fn out_bottom_left() -> Self
pub fn out_bottom_left() -> Self
Layer widget top-right corner aligns with anchor widget bottom-left corner.
Sourcepub fn out_bottom_right() -> Self
pub fn out_bottom_right() -> Self
Layer widget bottom-right corner aligns with anchor widget top-left corner.
Sourcepub fn out_top_in_left() -> Self
pub fn out_top_in_left() -> Self
Layer widget bottom-left corner aligns with anchor widget top-left corner.
Sourcepub fn out_top_in_right() -> Self
pub fn out_top_in_right() -> Self
Layer widget bottom-right corner aligns with anchor widget top-right corner.
Sourcepub fn out_bottom_in_left() -> Self
pub fn out_bottom_in_left() -> Self
Layer widget top-left corner aligns with anchor widget bottom-left corner.
Sourcepub fn out_bottom_in_right() -> Self
pub fn out_bottom_in_right() -> Self
Layer widget top-right corner aligns with anchor widget bottom-right corner.
Sourcepub fn out_left_in_top() -> Self
pub fn out_left_in_top() -> Self
Layer widget top-right corner aligns with anchor widget top-left corner.
Sourcepub fn out_left_in_bottom() -> Self
pub fn out_left_in_bottom() -> Self
Layer widget bottom-right corner aligns with anchor widget bottom-left corner.
Sourcepub fn out_right_in_top() -> Self
pub fn out_right_in_top() -> Self
Layer widget top-left corner aligns with anchor widget top-right corner.
Sourcepub fn out_right_in_bottom() -> Self
pub fn out_right_in_bottom() -> Self
Layer widget bottom-left corner aligns with anchor widget bottom-right corner.
Trait Implementations§
Source§impl Clone for AnchorOffset
impl Clone for AnchorOffset
Source§fn clone(&self) -> AnchorOffset
fn clone(&self) -> AnchorOffset
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AnchorOffset
impl Debug for AnchorOffset
Source§impl<'de> Deserialize<'de> for AnchorOffset
impl<'de> Deserialize<'de> for AnchorOffset
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<AnchorOffset> for AnchorMode
impl From<AnchorOffset> for AnchorMode
Source§fn from(inner_offset: AnchorOffset) -> Self
fn from(inner_offset: AnchorOffset) -> Self
Transform InnerOffset, all else default.
Source§impl From<AnchorOffset> for AnchorTransform
impl From<AnchorOffset> for AnchorTransform
Source§fn from(inner_offset: AnchorOffset) -> Self
fn from(inner_offset: AnchorOffset) -> Self
InnerOffset.
Source§impl IntoVar<AnchorMode> for AnchorOffset
impl IntoVar<AnchorMode> for AnchorOffset
Source§fn into_var(self) -> Var<AnchorMode>
fn into_var(self) -> Var<AnchorMode>
Transform InnerOffset, all else default.
Source§impl<P: Into<Point>, O: Into<Point>> IntoVar<AnchorOffset> for (P, O)
impl<P: Into<Point>, O: Into<Point>> IntoVar<AnchorOffset> for (P, O)
Source§fn into_var(self) -> Var<AnchorOffset>
fn into_var(self) -> Var<AnchorOffset>
(place, origin).
Source§impl IntoVar<AnchorTransform> for AnchorOffset
impl IntoVar<AnchorTransform> for AnchorOffset
Source§fn into_var(self) -> Var<AnchorTransform>
fn into_var(self) -> Var<AnchorTransform>
InnerOffset.
Source§impl PartialEq for AnchorOffset
impl PartialEq for AnchorOffset
Source§impl Serialize for AnchorOffset
impl Serialize for AnchorOffset
Source§impl Transitionable for AnchorOffset
impl Transitionable for AnchorOffset
Source§fn lerp(self, to: &Self, step: EasingStep) -> Self
fn lerp(self, to: &Self, step: EasingStep) -> Self
self -> to by step.impl IntoValue<AnchorMode> for AnchorOffset
impl<P: Into<Point>, O: Into<Point>> IntoValue<AnchorOffset> for (P, O)
impl IntoValue<AnchorTransform> for AnchorOffset
impl StructuralPartialEq for AnchorOffset
Auto Trait Implementations§
impl Freeze for AnchorOffset
impl RefUnwindSafe for AnchorOffset
impl Send for AnchorOffset
impl Sync for AnchorOffset
impl Unpin for AnchorOffset
impl UnwindSafe for AnchorOffset
Blanket Implementations§
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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