[][src]Struct orbtk_api::properties::Constraint

pub struct Constraint { /* fields omitted */ }

Constraint describes a box constraint.

Implementations

impl Constraint[src]

pub fn create() -> ConstraintBuilder[src]

Returns a constraint builder.

pub fn width(&self) -> f64[src]

Gets width.

pub fn set_width(&mut self, width: f64)[src]

Sets width.

pub fn height(&self) -> f64[src]

Gets height.

pub fn set_height(&mut self, height: f64)[src]

Sets height.

pub fn size(&self) -> (f64, f64)[src]

Gets the size.

pub fn set_size(&mut self, width: f64, height: f64)[src]

Sets the size.

pub fn min_width(&self) -> f64[src]

Gets min_width.

pub fn set_min_width(&mut self, min_width: f64)[src]

Sets min_width and set width to 0.0.

pub fn min_height(&self) -> f64[src]

Gets min_height.

pub fn set_min_height(&mut self, min_height: f64)[src]

Sets min_height and set height to min_height if height < min_height.

pub fn min_size(&self) -> (f64, f64)[src]

Gets the min_size.

pub fn set_min_size(&mut self, min_width: f64, min_height: f64)[src]

Sets the min size.

pub fn max_width(&self) -> f64[src]

Gets max_width.

pub fn set_max_width(&mut self, max_width: f64)[src]

Sets max_width and set width to 0.0.

pub fn max_height(&self) -> f64[src]

Gets max_height.

pub fn set_max_height(&mut self, max_height: f64)[src]

Sets max_height and set height to 0.0.

pub fn max_size(&self) -> (f64, f64)[src]

Gets the max_size.

pub fn set_max_size(&mut self, max_width: f64, max_height: f64)[src]

Sets the max size.

pub fn perform(&self, size: (f64, f64)) -> (f64, f64)[src]

Adjust the given size to match the constraint.

Trait Implementations

impl Clone for Constraint[src]

impl Copy for Constraint[src]

impl Debug for Constraint[src]

impl Default for Constraint[src]

impl From<ConstraintBuilder> for Constraint[src]

impl IntoPropertySource<Constraint> for Constraint[src]

impl IntoPropertySource<Constraint> for Entity[src]

impl IntoPropertySource<Constraint> for (String, Entity)[src]

impl<'_> IntoPropertySource<Constraint> for (&'_ str, Entity)[src]

impl IntoPropertySource<Constraint> for ConstraintBuilder[src]

impl PartialEq<Constraint> for Constraint[src]

impl StructuralPartialEq for Constraint[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<E> Component for E where
    E: Any
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.