[][src]Struct embedded_layout::layout::linear::LinearLayout

pub struct LinearLayout<LD: Orientation, VC: ViewChainElement = Guard> { /* fields omitted */ }

LinearLayout

LinearLayout is used to arrange views along the horizontal or vertical axis. A LinearLayout object is not a View, it does not have a location, instead it is used to arrange a group of views into a ViewGroup object using the arrange method. It does have a size however.

For more information and examples see the module level documentation.

Implementations

impl LinearLayout<Horizontal<Bottom, Tight>, Guard>[src]

#[must_use]pub fn horizontal() -> Self[src]

Create a new, empty LinearLayout that places views left to right

impl LinearLayout<Vertical<Left, Tight>, Guard>[src]

#[must_use]pub fn vertical() -> Self[src]

Create a new, empty LinearLayout that places views top to bottom

impl<S, ELS, VCE> LinearLayout<Horizontal<S, ELS>, VCE> where
    S: SecondaryAlignment + VerticalAlignment,
    ELS: ElementSpacing,
    VCE: ViewChainElement
[src]

pub fn with_alignment<Sec>(
    self,
    alignment: Sec
) -> LinearLayout<Horizontal<Sec, ELS>, VCE> where
    Sec: SecondaryAlignment + VerticalAlignment
[src]

Change the secondary alignment for this LinearLayout object.

For layouts created using LinearLayout::horizontal the secondary alignment is vertical.

pub fn with_spacing<ES>(
    self,
    spacing: ES
) -> LinearLayout<Horizontal<S, ES>, VCE> where
    ES: ElementSpacing
[src]

Change the element spacing

For available values and their properties, see spacing

impl<S, ELS, VCE> LinearLayout<Vertical<S, ELS>, VCE> where
    S: SecondaryAlignment + HorizontalAlignment,
    ELS: ElementSpacing,
    VCE: ViewChainElement
[src]

pub fn with_alignment<Sec>(
    self,
    alignment: Sec
) -> LinearLayout<Vertical<Sec, ELS>, VCE> where
    Sec: SecondaryAlignment + HorizontalAlignment
[src]

Change the secondary alignment for this LinearLayout object.

For layouts created using LinearLayout::vertical the secondary alignment is horizontal.

pub fn with_spacing<ES>(self, spacing: ES) -> LinearLayout<Vertical<S, ES>, VCE> where
    ES: ElementSpacing
[src]

Change the element spacing

For available values and their properties, see spacing

impl<LD, LE> LinearLayout<LD, LE> where
    LD: Orientation,
    LE: LayoutElement<LD>, 
[src]

pub fn add_view<V: View>(self, view: V) -> LinearLayout<LD, Link<V, LE>>[src]

Add a View to the layout

Views will be laid out sequentially, keeping the order in which they were added to the layout.

pub fn arrange(self) -> ViewGroup<LE>[src]

Arrange the views according to the layout properties and return the views as a ViewGroup. Note: The top right point is always Point::zero(). Change this by calling View::translate or Align methods.

pub fn size(&self) -> Size[src]

Returns the current size the layout will take up after arrange.

Auto Trait Implementations

impl<LD, VC> RefUnwindSafe for LinearLayout<LD, VC> where
    LD: RefUnwindSafe,
    VC: RefUnwindSafe

impl<LD, VC> Send for LinearLayout<LD, VC> where
    LD: Send,
    VC: Send

impl<LD, VC> Sync for LinearLayout<LD, VC> where
    LD: Sync,
    VC: Sync

impl<LD, VC> Unpin for LinearLayout<LD, VC> where
    LD: Unpin,
    VC: Unpin

impl<LD, VC> UnwindSafe for LinearLayout<LD, VC> where
    LD: UnwindSafe,
    VC: UnwindSafe

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