[−][src]Struct embedded_layout::layout::linear::LinearLayout
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]
S: SecondaryAlignment + VerticalAlignment,
ELS: ElementSpacing,
VCE: ViewChainElement,
pub fn with_alignment<Sec>(
self,
alignment: Sec
) -> LinearLayout<Horizontal<Sec, ELS>, VCE> where
Sec: SecondaryAlignment + VerticalAlignment,
[src]
self,
alignment: Sec
) -> LinearLayout<Horizontal<Sec, ELS>, VCE> where
Sec: SecondaryAlignment + VerticalAlignment,
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]
self,
spacing: ES
) -> LinearLayout<Horizontal<S, ES>, VCE> where
ES: ElementSpacing,
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]
S: SecondaryAlignment + HorizontalAlignment,
ELS: ElementSpacing,
VCE: ViewChainElement,
pub fn with_alignment<Sec>(
self,
alignment: Sec
) -> LinearLayout<Vertical<Sec, ELS>, VCE> where
Sec: SecondaryAlignment + HorizontalAlignment,
[src]
self,
alignment: Sec
) -> LinearLayout<Vertical<Sec, ELS>, VCE> where
Sec: SecondaryAlignment + HorizontalAlignment,
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]
ES: ElementSpacing,
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]
LD: Orientation,
LE: LayoutElement<LD>,
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,
LD: RefUnwindSafe,
VC: RefUnwindSafe,
impl<LD, VC> Send for LinearLayout<LD, VC> where
LD: Send,
VC: Send,
LD: Send,
VC: Send,
impl<LD, VC> Sync for LinearLayout<LD, VC> where
LD: Sync,
VC: Sync,
LD: Sync,
VC: Sync,
impl<LD, VC> Unpin for LinearLayout<LD, VC> where
LD: Unpin,
VC: Unpin,
LD: Unpin,
VC: Unpin,
impl<LD, VC> UnwindSafe for LinearLayout<LD, VC> where
LD: UnwindSafe,
VC: UnwindSafe,
LD: UnwindSafe,
VC: UnwindSafe,
Blanket Implementations
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,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,