Struct i_slint_core::layout::LayoutInfo
source · #[repr(C)]pub struct LayoutInfo {
pub max: Coord,
pub max_percent: Coord,
pub min: Coord,
pub min_percent: Coord,
pub preferred: Coord,
pub stretch: f32,
}
Expand description
The constraint that applies to an item
Fields§
§max: Coord
The maximum size for the item.
max_percent: Coord
The maximum size in percentage of the parent (value between 0 and 100).
min: Coord
The minimum size for this item.
min_percent: Coord
The minimum size in percentage of the parent (value between 0 and 100).
preferred: Coord
the preferred size
stretch: f32
the stretch factor
Implementations§
source§impl LayoutInfo
impl LayoutInfo
pub fn merge(&self, other: &LayoutInfo) -> Self
sourcepub fn preferred_bounded(&self) -> Coord
pub fn preferred_bounded(&self) -> Coord
Helper function to return a preferred size which is within the min/max constraints
Trait Implementations§
source§impl Add<LayoutInfo> for LayoutInfo
impl Add<LayoutInfo> for LayoutInfo
source§impl Clone for LayoutInfo
impl Clone for LayoutInfo
source§fn clone(&self) -> LayoutInfo
fn clone(&self) -> LayoutInfo
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for LayoutInfo
impl Debug for LayoutInfo
source§impl Default for LayoutInfo
impl Default for LayoutInfo
source§impl PartialEq<LayoutInfo> for LayoutInfo
impl PartialEq<LayoutInfo> for LayoutInfo
source§fn eq(&self, other: &LayoutInfo) -> bool
fn eq(&self, other: &LayoutInfo) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for LayoutInfo
impl StructuralPartialEq for LayoutInfo
Auto Trait Implementations§
impl RefUnwindSafe for LayoutInfo
impl Send for LayoutInfo
impl Sync for LayoutInfo
impl Unpin for LayoutInfo
impl UnwindSafe for LayoutInfo
Blanket Implementations§
source§impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
source§fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.