Struct ux::SnapConstraint [−][src]
pub struct SnapConstraint(_, _);
Implementations
impl SnapConstraint
[src][−]
pub fn new<P>(
source: Option<&P>,
from_edge: SnapEdge,
to_edge: SnapEdge,
offset: f32
) -> SnapConstraint where
P: IsA<Actor>,
[src][−]
source: Option<&P>,
from_edge: SnapEdge,
to_edge: SnapEdge,
offset: f32
) -> SnapConstraint where
P: IsA<Actor>,
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][−]
pub fn get_source(&self) -> Option<Actor>
[src][−]
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][−]
pub fn set_source<P>(&self, source: Option<&P>) where
P: IsA<Actor>,
[src][−]
P: IsA<Actor>,
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>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&SnapConstraint),
[src]
F: 'static + Fn(&SnapConstraint),
pub fn connect_property_offset_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&SnapConstraint),
[src]
F: 'static + Fn(&SnapConstraint),
pub fn connect_property_source_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&SnapConstraint),
[src]
F: 'static + Fn(&SnapConstraint),
pub fn connect_property_to_edge_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&SnapConstraint),
[src]
F: 'static + Fn(&SnapConstraint),
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> PartialEq<T> for SnapConstraint where
T: ObjectType,
[src][+]
T: ObjectType,
impl<T> PartialOrd<T> for SnapConstraint where
T: ObjectType,
[src][+]
T: ObjectType,
impl StaticType for SnapConstraint
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for SnapConstraint
impl !Send for SnapConstraint
impl !Sync for SnapConstraint
impl Unpin for SnapConstraint
impl UnwindSafe for SnapConstraint
Blanket Implementations
impl<O> ActorMetaExt for O where
O: IsA<ActorMeta>,
[src][+]
O: IsA<ActorMeta>,
impl<T> Any for T where
T: 'static + ?Sized,
[src][+]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src][+]
T: ?Sized,
impl<Super, Sub> CanDowncast<Sub> for Super where
Sub: IsA<Super>,
Super: IsA<Super>,
[src]
Sub: IsA<Super>,
Super: IsA<Super>,
impl<T> Cast for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<T> From<T> for T
[src][+]
impl<T, U> Into<U> for T where
U: From<T>,
[src][+]
U: From<T>,
impl<T> ObjectExt for T where
T: ObjectType,
[src][+]
T: ObjectType,
impl<T> ToOwned for T where
T: Clone,
[src][+]
T: Clone,
impl<T> ToSendValue for T where
T: SetValue + Send + ToValue + ?Sized,
[src][+]
T: SetValue + Send + ToValue + ?Sized,
impl<T> ToString for T where
T: Display + ?Sized,
[src][+]
T: Display + ?Sized,
impl<T> ToValue for T where
T: SetValue + ?Sized,
[src][+]
T: SetValue + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src][+]
U: Into<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src][+]
U: TryFrom<T>,