Struct i_slint_core::layout::LayoutInfo
source · [−]#[repr(C)]pub struct LayoutInfo {
pub max: f32,
pub max_percent: f32,
pub min: f32,
pub min_percent: f32,
pub preferred: f32,
pub stretch: f32,
}Expand description
The constraint that applies to an item
Fields
max: f32The maximum size for the item.
max_percent: f32The maximum size in percentage of the parent (value between 0 and 100).
min: f32The minimum size for this item.
min_percent: f32The minimum size in percentage of the parent (value between 0 and 100).
preferred: f32the preferred size
stretch: f32the stretch factor
Implementations
sourceimpl LayoutInfo
impl LayoutInfo
pub fn merge(&self, other: &LayoutInfo) -> Self
sourcepub fn preferred_bounded(&self) -> f32
pub fn preferred_bounded(&self) -> f32
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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more