Struct animate::SnapConstraint[][src]

pub struct SnapConstraint(_, _);

Implementations

impl SnapConstraint[src]

pub fn new<P: IsA<Actor>>(
    source: Option<&P>,
    from_edge: SnapEdge,
    to_edge: SnapEdge,
    offset: f32
) -> SnapConstraint
[src]

Creates a new SnapConstraint that will snap a Actor to the edge of source, with the given offset.

source

the Actor to use as the source of the constraint, or None

from_edge

the edge of the actor to use in the constraint

to_edge

the edge of source to use in the constraint

offset

the offset to apply to the constraint, in pixels

Returns

the newly created SnapConstraint

pub fn get_edges(&self) -> (SnapEdge, SnapEdge)[src]

Retrieves the edges used by the self

from_edge

return location for the actor’s edge, or None

to_edge

return location for the source’s edge, or None

pub fn get_offset(&self) -> f32[src]

Retrieves the offset set using SnapConstraint::set_offset

Returns

the offset, in pixels

pub fn get_source(&self) -> Option<Actor>[src]

Retrieves the Actor set using SnapConstraint::set_source

Returns

a pointer to the source actor

pub fn set_edges(&self, from_edge: SnapEdge, to_edge: SnapEdge)[src]

Sets the edges to be used by the self

The from_edge is the edge on the Actor to which self has been added. The to_edge is the edge of the Actor inside the SnapConstraint:source property.

from_edge

the edge on the actor

to_edge

the edge on the source

pub fn set_offset(&self, offset: f32)[src]

Sets the offset to be applied to the constraint

offset

the offset to apply, in pixels

pub fn set_source<P: IsA<Actor>>(&self, source: Option<&P>)[src]

Sets the source Actor for the constraint

source

a Actor, or None to unset the source

pub fn get_property_from_edge(&self) -> SnapEdge[src]

The edge of the Actor that should be snapped

pub fn set_property_from_edge(&self, from_edge: SnapEdge)[src]

The edge of the Actor that should be snapped

pub fn get_property_to_edge(&self) -> SnapEdge[src]

The edge of the SnapConstraint:source that should be snapped

pub fn set_property_to_edge(&self, to_edge: SnapEdge)[src]

The edge of the SnapConstraint:source that should be snapped

pub fn connect_property_from_edge_notify<F: Fn(&SnapConstraint) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_offset_notify<F: Fn(&SnapConstraint) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_source_notify<F: Fn(&SnapConstraint) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

pub fn connect_property_to_edge_notify<F: Fn(&SnapConstraint) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Trait Implementations

impl Clone for SnapConstraint[src]

impl Debug for SnapConstraint[src]

impl Display for SnapConstraint[src]

impl Eq for SnapConstraint[src]

impl Hash for SnapConstraint[src]

impl IsA<ActorMeta> for SnapConstraint[src]

impl IsA<Constraint> for SnapConstraint[src]

impl IsA<InitiallyUnowned> for SnapConstraint[src]

impl Ord for SnapConstraint[src]

impl<T: ObjectType> PartialEq<T> for SnapConstraint[src]

impl<T: ObjectType> PartialOrd<T> for SnapConstraint[src]

impl StaticType for SnapConstraint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 
[src]

impl<T> Cast for T where
    T: ObjectType
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<Fr, To> IntoColor<To> for Fr where
    To: FromColor<Fr>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,