Struct ux::AlignConstraint [−][src]
pub struct AlignConstraint(_, _);
Implementations
impl AlignConstraint
[src][−]
pub fn new<P>(
source: Option<&P>,
axis: AlignAxis,
factor: f32
) -> AlignConstraint where
P: IsA<Actor>,
[src][−]
source: Option<&P>,
axis: AlignAxis,
factor: f32
) -> AlignConstraint where
P: IsA<Actor>,
Creates a new constraint, aligning a Actor
’s position with
regards of the size of the actor to source
, with the given
alignment factor
source
the Actor
to use as the source of the
alignment, or None
axis
the axis to be used to compute the alignment
factor
the alignment factor, between 0.0 and 1.0
Returns
the newly created AlignConstraint
pub fn get_align_axis(&self) -> AlignAxis
[src][−]
pub fn get_factor(&self) -> f32
[src][−]
pub fn get_source(&self) -> Option<Actor>
[src][−]
pub fn set_align_axis(&self, axis: AlignAxis)
[src][−]
pub fn set_factor(&self, factor: f32)
[src][−]
Sets the alignment factor of the constraint
The factor depends on the AlignConstraint:align-axis
property
and it is a value between 0.0 (meaning left, when
AlignConstraint:align-axis
is set to AlignAxis::XAxis
; or
meaning top, when AlignConstraint:align-axis
is set to
AlignAxis::YAxis
) and 1.0 (meaning right, when
AlignConstraint:align-axis
is set to AlignAxis::XAxis
; or
meaning bottom, when AlignConstraint:align-axis
is set to
AlignAxis::YAxis
). A value of 0.5 aligns in the middle in either
cases
factor
the alignment factor, between 0.0 and 1.0
pub fn set_source<P>(&self, source: Option<&P>) where
P: IsA<Actor>,
[src][−]
P: IsA<Actor>,
pub fn connect_property_align_axis_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&AlignConstraint),
[src]
F: 'static + Fn(&AlignConstraint),
pub fn connect_property_factor_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&AlignConstraint),
[src]
F: 'static + Fn(&AlignConstraint),
pub fn connect_property_source_notify<F>(&self, f: F) -> SignalHandlerId where
F: 'static + Fn(&AlignConstraint),
[src]
F: 'static + Fn(&AlignConstraint),
Trait Implementations
impl Clone for AlignConstraint
[src][+]
impl Debug for AlignConstraint
[src][+]
impl Display for AlignConstraint
[src][+]
impl Eq for AlignConstraint
[src]
impl Hash for AlignConstraint
[src][+]
impl IsA<ActorMeta> for AlignConstraint
[src]
impl IsA<Constraint> for AlignConstraint
[src]
impl IsA<InitiallyUnowned> for AlignConstraint
[src]
impl Ord for AlignConstraint
[src][+]
impl<T> PartialEq<T> for AlignConstraint where
T: ObjectType,
[src][+]
T: ObjectType,
impl<T> PartialOrd<T> for AlignConstraint where
T: ObjectType,
[src][+]
T: ObjectType,
impl StaticType for AlignConstraint
[src][+]
Auto Trait Implementations
impl RefUnwindSafe for AlignConstraint
impl !Send for AlignConstraint
impl !Sync for AlignConstraint
impl Unpin for AlignConstraint
impl UnwindSafe for AlignConstraint
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>,