[][src]Enum orbtk::prelude::Alignment

pub enum Alignment {
    Start,
    Center,
    End,
    Stretch,
}

Used to align a widget vertical or horizontal.

Variants

Start
Center
End
Stretch

Implementations

impl Alignment[src]

pub fn align_position(
    self,
    available_measure: f64,
    measure: f64,
    margin_start: f64,
    margin_end: f64
) -> f64
[src]

Calculates the position (x or y) of the widget depending on the available measure, the goal measure margin and alignment.

pub fn align_measure(
    self,
    available_measure: f64,
    measure: f64,
    margin_start: f64,
    margin_end: f64
) -> f64
[src]

Calculates the measure (measure or height) of the widget depending on the available measure, the goal measure margin and horizontal alignment.

Trait Implementations

impl Clone for Alignment[src]

impl Copy for Alignment[src]

impl Debug for Alignment[src]

impl Default for Alignment[src]

impl<'_> From<&'_ str> for Alignment[src]

impl IntoPropertySource<Alignment> for (String, Entity)[src]

impl<'_> IntoPropertySource<Alignment> for &'_ str[src]

impl IntoPropertySource<Alignment> for Entity[src]

impl IntoPropertySource<Alignment> for Alignment[src]

impl<'_> IntoPropertySource<Alignment> for (&'_ str, Entity)[src]

impl PartialEq<Alignment> for Alignment[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<E> Component for E where
    E: Any
[src]

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

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

impl<T> SetParameter for T

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

type Owned = T

The resulting type after obtaining ownership.

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>,