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

pub struct LinearLayout<LD: LayoutDirection, VC: ViewChainElement> { /* 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>, ChainTerminator>[src]

pub fn horizontal() -> Self[src]

Create a new, empty LinearLayout that places views horizontally next to each other

impl LinearLayout<Vertical<Left>, ChainTerminator>[src]

pub fn vertical() -> Self[src]

Create a new, empty LinearLayout that places views vertically next to each other

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

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

Create a new, empty LinearLayout that places views horizontally next to each other

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

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

Create a new, empty LinearLayout that places views horizontally next to each other

impl<LD: LayoutDirection, VCE: ViewChainElement> LinearLayout<LD, VCE>[src]

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

Add a View to the layout

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

impl<LD, VCE> LinearLayout<LD, VCE> where
    LD: LayoutDirection,
    VCE: ViewChainElement + LayoutOperation<LD>, 
[src]

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

Arrange the views according to the layout properties and return the views as a ViewGroup. Notes:

  • the top right point is always (0, 0)
  • for horizontal layouts, the elements will be vertically bottom aligned
  • for vertical layouts, the elements will be horizontally left aligned

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.