[−][src]Struct kas::layout::SizeRules
Widget sizing information
Return value of kas::Layout::size_rules.
This struct conveys properties such as the minimum size and preferred size of the widgets being queried.
Methods
impl SizeRules[src]
pub const EMPTY: Self[src]
Empty (zero size)
pub fn fixed(size: u32) -> Self[src]
A fixed size
pub fn new(min: u32, ideal: u32, stretch: StretchPolicy) -> Self[src]
Construct with custom rules
Region size should meet the given min-imum size and has a given
ideal size, plus a given stretch policy.
Required: ideal >= min (if not, ideal is clamped to min).
pub fn max(self, rhs: Self) -> SizeRules[src]
Use the maximum size of self and rhs.
pub fn min_size(self) -> u32[src]
Get the minimum size
pub fn ideal_size(self) -> u32[src]
Get the ideal size
pub fn set_at_least_op_sub(&mut self, x: Self, y: Self)[src]
Like self = self.max(x - y) but handling negative values correctly
pub fn reduce_min_to(&mut self, min: u32)[src]
Reduce the minimum size
If min is greater than the current minimum size, this has no effect.
Trait Implementations
impl Add<SizeRules> for SizeRules[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: SizeRules) -> Self::Output[src]
impl Add<u32> for SizeRules[src]
type Output = Self
The resulting type after applying the + operator.
fn add(self, rhs: u32) -> Self::Output[src]
impl AddAssign<SizeRules> for SizeRules[src]
fn add_assign(&mut self, rhs: Self)[src]
impl Clone for SizeRules[src]
impl Copy for SizeRules[src]
impl Debug for SizeRules[src]
impl Default for SizeRules[src]
impl Mul<u32> for SizeRules[src]
Auto Trait Implementations
impl RefUnwindSafe for SizeRules
impl Send for SizeRules
impl Sync for SizeRules
impl Unpin for SizeRules
impl UnwindSafe for SizeRules
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,