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: Point
Point in the anchor widget.
origin: Point
Point 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§impl IntoVar<AnchorTransform> for AnchorOffset
impl IntoVar<AnchorTransform> for AnchorOffset
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 Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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