[][src]Struct druid::widget::Align

pub struct Align<T> { /* fields omitted */ }

A widget that aligns its child.

Implementations

impl<T> Align<T>[src]

pub fn new(align: UnitPoint, child: impl Widget<T> + 'static) -> Align<T>[src]

Create widget with alignment.

Note that the align parameter is specified as a UnitPoint in terms of left and right. This is inadequate for bidi-aware layout and thus the API will change when druid gains bidi capability.

pub fn centered(child: impl Widget<T> + 'static) -> Align<T>[src]

Create centered widget.

pub fn right(child: impl Widget<T> + 'static) -> Align<T>[src]

Create right-aligned widget.

pub fn left(child: impl Widget<T> + 'static) -> Align<T>[src]

Create left-aligned widget.

pub fn horizontal(align: UnitPoint, child: impl Widget<T> + 'static) -> Align<T>[src]

Align only in the horizontal axis, keeping the child's size in the vertical.

pub fn vertical(align: UnitPoint, child: impl Widget<T> + 'static) -> Align<T>[src]

Align only in the vertical axis, keeping the child's size in the horizontal.

Trait Implementations

impl<T: Data> Widget<T> for Align<T>[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Align<T>

impl<T> !Send for Align<T>

impl<T> !Sync for Align<T>

impl<T> Unpin for Align<T> where
    T: Unpin

impl<T> !UnwindSafe for Align<T>

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<T> From<T> for T[src]

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

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self

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.