Skip to main content

LayoutStyle

Struct LayoutStyle 

Source
pub struct LayoutStyle {
Show 20 fields pub width: Length, pub height: Length, pub padding: Edges, pub margin: Edges, pub min_width: f32, pub max_width: f32, pub min_height: f32, pub max_height: f32, pub flex: f32, pub flex_shrink: f32, pub flex_basis: Option<Length>, pub align_self: Option<Align>, pub aspect_ratio: Option<f32>, pub indent_top: Option<f32>, pub indent_bottom: Option<f32>, pub indent_left: Option<f32>, pub indent_right: Option<f32>, pub position: Position, pub overflow: Overflow, pub hit_testable: bool,
}

Fields§

§width: Length§height: Length§padding: Edges§margin: Edges§min_width: f32§max_width: f32§min_height: f32§max_height: f32§flex: f32§flex_shrink: f32§flex_basis: Option<Length>§align_self: Option<Align>§aspect_ratio: Option<f32>§indent_top: Option<f32>§indent_bottom: Option<f32>§indent_left: Option<f32>§indent_right: Option<f32>§position: Position§overflow: Overflow§hit_testable: bool

Implementations§

Source§

impl LayoutStyle

Source

pub fn width(self, width: Length) -> LayoutStyle

Source

pub fn height(self, height: Length) -> LayoutStyle

Source

pub fn fit(self) -> LayoutStyle

Source

pub fn hit_testable(self, on: bool) -> LayoutStyle

Source

pub fn padding(self, padding: impl Into<Edges>) -> LayoutStyle

Source

pub fn pad(self, padding: impl Into<Edges>) -> LayoutStyle

Source

pub fn padding_xy(self, x: f32, y: f32) -> LayoutStyle

Source

pub fn padding_x(self, x: f32) -> LayoutStyle

Source

pub fn padding_y(self, y: f32) -> LayoutStyle

Source

pub fn padding_left(self, v: f32) -> LayoutStyle

Source

pub fn padding_right(self, v: f32) -> LayoutStyle

Source

pub fn padding_top(self, v: f32) -> LayoutStyle

Source

pub fn padding_bottom(self, v: f32) -> LayoutStyle

Source

pub fn min_width(self, v: f32) -> LayoutStyle

Source

pub fn max_width(self, v: f32) -> LayoutStyle

Source

pub fn min_height(self, v: f32) -> LayoutStyle

Source

pub fn max_height(self, v: f32) -> LayoutStyle

Source

pub fn clamp_width(self, w: f32) -> f32

Source

pub fn clamp_height(self, h: f32) -> f32

Source

pub fn clamp_size(self, size: Size) -> Size

Source

pub fn margin(self, margin: impl Into<Edges>) -> LayoutStyle

Source

pub fn margin_xy(self, x: f32, y: f32) -> LayoutStyle

Source

pub fn margin_x(self, x: f32) -> LayoutStyle

Source

pub fn margin_y(self, y: f32) -> LayoutStyle

Source

pub fn margin_left(self, v: f32) -> LayoutStyle

Source

pub fn margin_right(self, v: f32) -> LayoutStyle

Source

pub fn margin_top(self, v: f32) -> LayoutStyle

Source

pub fn margin_bottom(self, v: f32) -> LayoutStyle

Source

pub fn flex(self, weight: f32) -> LayoutStyle

Source

pub fn flex_grow(self, weight: f32) -> LayoutStyle

Source

pub fn flex_shrink(self, shrink: f32) -> LayoutStyle

Source

pub fn flex_full( self, grow: f32, shrink: f32, basis: Option<Length>, ) -> LayoutStyle

Source

pub fn flex_basis(self, basis: Option<Length>) -> LayoutStyle

Source

pub fn no_basis(self) -> LayoutStyle

Source

pub fn expand(self) -> LayoutStyle

Source

pub fn flex_weight(self) -> f32

Source

pub fn flex_grow_weight(self) -> f32

Source

pub fn flex_shrink_weight(self) -> f32

Source

pub fn align_self(self, align: Option<Align>) -> LayoutStyle

Source

pub fn align_self_value(self, align: Align) -> LayoutStyle

Source

pub fn auto_align(self) -> LayoutStyle

Source

pub fn effective_align(self, container: Align) -> Align

Source

pub fn aspect_ratio(self, ratio: Option<f32>) -> LayoutStyle

Source

pub fn aspect(self, ratio: f32) -> LayoutStyle

Source

pub fn no_aspect(self) -> LayoutStyle

Source

pub fn position(self, position: Position) -> LayoutStyle

Source

pub fn absolute(self) -> LayoutStyle

Source

pub fn absolute_at(self, left: f32, top: f32) -> LayoutStyle

Source

pub fn absolute_inset(self, inset: Inset) -> LayoutStyle

Source

pub fn is_absolute(self) -> bool

Source

pub fn absolute_inset_of(self) -> Option<Inset>

Source

pub fn margin_main(self, axis: Axis) -> f32

Source

pub fn margin_cross(self, axis: Axis) -> f32

Source

pub fn apply_aspect( self, w: f32, h: f32, w_auto: bool, h_auto: bool, ) -> (f32, f32)

Source

pub fn outer_size(self, inner: Size) -> Size

Source

pub fn min_main(self, axis: Axis) -> f32

Source

pub fn max_main(self, axis: Axis) -> f32

Source

pub fn clamp_main(self, value: f32, axis: Axis) -> f32

Source

pub fn overflow(self, overflow: Overflow) -> LayoutStyle

Source

pub fn indent_top(self, v: f32) -> LayoutStyle

Source

pub fn indent_bottom(self, v: f32) -> LayoutStyle

Source

pub fn indent_left(self, v: f32) -> LayoutStyle

Source

pub fn indent_right(self, v: f32) -> LayoutStyle

Source

pub fn clear_indent_top(self) -> LayoutStyle

Source

pub fn clear_indent_bottom(self) -> LayoutStyle

Source

pub fn clear_indent_left(self) -> LayoutStyle

Source

pub fn clear_indent_right(self) -> LayoutStyle

Source

pub fn clear_indents(self) -> LayoutStyle

Source

pub fn indent(self, indents: Indents) -> LayoutStyle

Source

pub fn indent_all(self, v: f32) -> LayoutStyle

Source

pub fn indent_xy(self, x: f32, y: f32) -> LayoutStyle

Source

pub fn indent_axes(self, horizontal: f32, vertical: f32) -> LayoutStyle

Source

pub fn indent_main_start(self, axis: Axis) -> Option<f32>

Source

pub fn indent_main_end(self, axis: Axis) -> Option<f32>

Source

pub fn indent_cross_start(self, axis: Axis) -> Option<f32>

Source

pub fn indent_cross_end(self, axis: Axis) -> Option<f32>

Source

pub fn indents(self) -> Indents

Trait Implementations§

Source§

impl Clone for LayoutStyle

Source§

fn clone(&self) -> LayoutStyle

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for LayoutStyle

Source§

impl Debug for LayoutStyle

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for LayoutStyle

Source§

fn default() -> LayoutStyle

Returns the “default value” for a type. Read more
Source§

impl PartialEq for LayoutStyle

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LayoutStyle

Auto Trait Implementations§

Blanket Implementations§

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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> ViewState for T
where T: Default + 'static,