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
sourceimpl 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
sourceimpl Add<LayoutInfo> for LayoutInfo
impl Add<LayoutInfo> for LayoutInfo
sourceimpl Clone for LayoutInfo
impl Clone for LayoutInfo
sourcefn clone(&self) -> LayoutInfo
fn clone(&self) -> LayoutInfo
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LayoutInfo
impl Debug for LayoutInfo
sourceimpl Default for LayoutInfo
impl Default for LayoutInfo
sourceimpl PartialEq<LayoutInfo> for LayoutInfo
impl PartialEq<LayoutInfo> for LayoutInfo
sourcefn 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 ==
. Read more
sourcefn ne(&self, other: &LayoutInfo) -> bool
fn ne(&self, other: &LayoutInfo) -> bool
This method tests for !=
.
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more