Props

Struct Props 

Source
pub struct Props {
Show 24 fields pub children: Children, pub length: Option<Length>, pub min_length: Option<Length>, pub max_length: Option<Length>, pub width: Option<Length>, pub min_width: Option<Length>, pub max_width: Option<Length>, pub expand_by: Option<f32>, pub shrink_by: Option<f32>, pub inline: bool, pub reverse: bool, pub wrap: bool, pub align: Option<Align>, pub cross_align: Option<CrossAlign>, pub align_self: Option<AlignSelf>, pub gap: Option<Gap>, pub reverse_rows: bool, pub align_rows: Option<AlignRows>, pub overflow: Overflow, pub padding: Option<Padding>, pub margin: Option<Margin>, pub background: Option<Background>, pub border: Option<Border>, pub shadow: Option<Shadow>,
}
Expand description

Row properties.

Here you can find all properties that can be used with Row component.

Fields§

§children: Children§length: Option<Length>

Control the length of the Row

The default is Length::from(1.0)

§min_length: Option<Length>

Control the minimum length of the Row

The default is Length::MinContent

§max_length: Option<Length>

Control the maximum length of the Row

The default is None

§width: Option<Length>

Control the width of the Row

The default is None

§min_width: Option<Length>

Control the minimum width of the Row

The default is Length::MinContent

§max_width: Option<Length>

Control the maximum width of the Row

The default is None

§expand_by: Option<f32>

Expand factor used to expand this row in direction relevant to it’s parent layout direction.

When the parent is Row it will expand horizontally, when the parent is Column it will expand vertically.

Note: This only works when this Row inside another layout (e.g. Row/Column).

The default is None

§shrink_by: Option<f32>

Shrink factor used to shrink this row in direction relevant to it’s parent layout direction when needed.

When the parent is Row it will shrink horizontally, when the parent is Column it will shrink vertically.

Note: This only works when this Row inside another layout (e.g. Row/Column).

The default is None

§inline: bool

Make this layout inline

The default is false

§reverse: bool

Reverse the order of the children

The default is false

§wrap: bool

Wrap into another row when there is no more horizontal space.

The default is false

§align: Option<Align>

Align the children inside this row in main direction (vertically).

The default is None

§cross_align: Option<CrossAlign>

Align the children inside this row in the cross direction (horizontally).

The default is None

§align_self: Option<AlignSelf>

Align this row when it’s inside another layout, the alignment direction is relevant to the parent layout direction

When the parent is Row it will align horizontally, when the parent is Column it will align vertically.

Note: This only works when this Row inside another layout (e.g. Row/Column).

The default is None

§gap: Option<Gap>

Gap between children.

This take Gap value, which can take either one value that defines the gap for both the columns and rows (if there is any), or two values one for rows and the other for columns.

The default is None

§reverse_rows: bool

Reverse rows if there is more than one column within this Column.

This only works when used with wrap=true.

The default is false

§align_rows: Option<AlignRows>

Align rows in the cross direction (vertically) if there is more than one row within this Row.

The default is None

§overflow: Overflow

Overflow behavior for this Row

By default any child that get oversized will be visible and may overlap with other UI components. Change this property if you like to make the content scrollable or make the oversized hidden/cliped.

The default is Overflow::visible()

§padding: Option<Padding>

Padding for the Row

The default is None

§margin: Option<Margin>

Margin for the Row

The default is None

§background: Option<Background>

Background for the Row

The default is None

§border: Option<Border>

Border for the Row

The default is None

§shadow: Option<Shadow>

Shadow for the Row

The default is None

Trait Implementations§

Source§

impl Clone for Props

Source§

fn clone(&self) -> Props

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl PartialEq for Props

Source§

fn eq(&self, other: &Props) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Properties for Props

Source§

type Builder = PropsBuilder<PropsBuilderStep_missing_required_prop_children>

Builder that will be used to construct properties
Source§

fn builder() -> Self::Builder

Entrypoint for building properties
Source§

impl StructuralPartialEq for Props

Auto Trait Implementations§

§

impl Freeze for Props

§

impl !RefUnwindSafe for Props

§

impl !Send for Props

§

impl !Sync for Props

§

impl Unpin for Props

§

impl !UnwindSafe for Props

Blanket Implementations§

Source§

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
where T: FloatComponent, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,

Source§

fn adapt_into_using<M>(self, method: M) -> D
where M: TransformMatrix<Swp, Dwp, T>,

Convert the source color to the destination color using the specified method
Source§

fn adapt_into(self) -> D

Convert the source color to the destination color using the bradford method by default
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> IntoColor<U> for T
where U: FromColor<T>,

Source§

fn into_color(self) -> U

Convert into T with values clamped to the color defined bounds Read more
Source§

impl<T, U> IntoColorUnclamped<U> for T
where U: FromColorUnclamped<T>,

Source§

fn into_color_unclamped(self) -> U

Convert into T. The resulting color might be invalid in its color space Read more
Source§

impl<T> IntoPropValue<Option<T>> for T

Source§

fn into_prop_value(self) -> Option<T>

Convert self to a value of a Properties struct.
Source§

impl<T> IntoPropValue<T> for T

Source§

fn into_prop_value(self) -> T

Convert self to a value of a Properties struct.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T, U> TryIntoColor<U> for T
where U: TryFromColor<T>,

Source§

fn try_into_color(self) -> Result<U, OutOfBounds<U>>

Convert into T, returning ok if the color is inside of its defined range, otherwise an OutOfBounds error is returned which contains the unclamped color. Read more