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 new(point: Point) -> AnchorOffset
pub fn new(point: Point) -> AnchorOffset
New place and origin points from same point.
Sourcepub fn in_top() -> AnchorOffset
pub fn in_top() -> AnchorOffset
Layer widget is horizontally centered on the anchor widget and the top edge aligns.
Sourcepub fn in_bottom() -> AnchorOffset
pub fn in_bottom() -> AnchorOffset
Layer widget is horizontally centered on the anchor widget and the bottom edge aligns.
Sourcepub fn in_left() -> AnchorOffset
pub fn in_left() -> AnchorOffset
Layer widget is vertically centered on the anchor widget and the left edge aligns.
Sourcepub fn in_right() -> AnchorOffset
pub fn in_right() -> AnchorOffset
Layer widget is vertically centered on the anchor widget and the right edge aligns.
Sourcepub fn in_top_left() -> AnchorOffset
pub fn in_top_left() -> AnchorOffset
Layer widget top-left corner aligns with the anchor widget top-left corner.
Sourcepub fn in_top_right() -> AnchorOffset
pub fn in_top_right() -> AnchorOffset
Layer widget top-right corner aligns with the anchor widget top-right corner.
Sourcepub fn in_bottom_left() -> AnchorOffset
pub fn in_bottom_left() -> AnchorOffset
Layer widget bottom-left corner aligns with the anchor widget bottom-left corner.
Sourcepub fn in_bottom_right() -> AnchorOffset
pub fn in_bottom_right() -> AnchorOffset
Layer widget bottom-right corner aligns with the anchor widget bottom-right corner.
Sourcepub fn center() -> AnchorOffset
pub fn center() -> AnchorOffset
Layer widget is centered on the anchor widget.
Sourcepub fn out_top() -> AnchorOffset
pub fn out_top() -> AnchorOffset
Layer widget is horizontally centered on the anchor widget and its bottom edge aligns with the anchors top edge.
Sourcepub fn out_bottom() -> AnchorOffset
pub fn out_bottom() -> AnchorOffset
Layer widget is horizontally centered on the anchor widget and its top edge aligns with the anchors bottom edge.
Sourcepub fn out_left() -> AnchorOffset
pub fn out_left() -> AnchorOffset
Layer widget is vertically centered on the anchor widget and its right edge aligns with the anchors left edge.
Sourcepub fn out_right() -> AnchorOffset
pub fn out_right() -> AnchorOffset
Layer widget is vertically centered on the anchor widget and its left edge aligns with the anchors right edge.
Sourcepub fn out_top_left() -> AnchorOffset
pub fn out_top_left() -> AnchorOffset
Layer widget bottom-right corner aligns with anchor widget top-left corner.
Sourcepub fn out_top_right() -> AnchorOffset
pub fn out_top_right() -> AnchorOffset
Layer widget bottom-left corner aligns with anchor widget top-right corner.
Sourcepub fn out_bottom_left() -> AnchorOffset
pub fn out_bottom_left() -> AnchorOffset
Layer widget top-right corner aligns with anchor widget bottom-left corner.
Sourcepub fn out_bottom_right() -> AnchorOffset
pub fn out_bottom_right() -> AnchorOffset
Layer widget bottom-right corner aligns with anchor widget top-left corner.
Sourcepub fn out_top_in_left() -> AnchorOffset
pub fn out_top_in_left() -> AnchorOffset
Layer widget bottom-left corner aligns with anchor widget top-left corner.
Sourcepub fn out_top_in_right() -> AnchorOffset
pub fn out_top_in_right() -> AnchorOffset
Layer widget bottom-right corner aligns with anchor widget top-right corner.
Sourcepub fn out_bottom_in_left() -> AnchorOffset
pub fn out_bottom_in_left() -> AnchorOffset
Layer widget top-left corner aligns with anchor widget bottom-left corner.
Sourcepub fn out_bottom_in_right() -> AnchorOffset
pub fn out_bottom_in_right() -> AnchorOffset
Layer widget top-right corner aligns with anchor widget bottom-right corner.
Sourcepub fn out_left_in_top() -> AnchorOffset
pub fn out_left_in_top() -> AnchorOffset
Layer widget top-right corner aligns with anchor widget top-left corner.
Sourcepub fn out_left_in_bottom() -> AnchorOffset
pub fn out_left_in_bottom() -> AnchorOffset
Layer widget bottom-right corner aligns with anchor widget bottom-left corner.
Sourcepub fn out_right_in_top() -> AnchorOffset
pub fn out_right_in_top() -> AnchorOffset
Layer widget top-left corner aligns with anchor widget top-right corner.
Sourcepub fn out_right_in_bottom() -> AnchorOffset
pub fn out_right_in_bottom() -> AnchorOffset
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<AnchorOffset, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AnchorOffset, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl<P, O> From<(P, O)> for AnchorOffset
impl<P, O> From<(P, O)> for AnchorOffset
Source§fn from(place_origin: (P, O)) -> AnchorOffset
fn from(place_origin: (P, O)) -> AnchorOffset
(place, origin).
Source§impl From<AnchorOffset> for AnchorMode
impl From<AnchorOffset> for AnchorMode
Source§fn from(inner_offset: AnchorOffset) -> AnchorMode
fn from(inner_offset: AnchorOffset) -> AnchorMode
Transform InnerOffset, all else default.
Source§impl From<AnchorOffset> for AnchorTransform
impl From<AnchorOffset> for AnchorTransform
Source§fn from(inner_offset: AnchorOffset) -> AnchorTransform
fn from(inner_offset: AnchorOffset) -> AnchorTransform
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, O> IntoVar<AnchorOffset> for (P, O)
impl<P, O> 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§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Source§impl Transitionable for AnchorOffset
impl Transitionable for AnchorOffset
Source§fn lerp(self, to: &AnchorOffset, step: Factor) -> AnchorOffset
fn lerp(self, to: &AnchorOffset, step: Factor) -> AnchorOffset
self -> to by step.impl IntoValue<AnchorMode> for AnchorOffset
impl<P, O> 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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