MeasurePolicy

Trait MeasurePolicy 

Source
pub trait MeasurePolicy {
    // Required methods
    fn measure(
        &self,
        measurables: &[Box<dyn Measurable>],
        constraints: Constraints,
    ) -> MeasureResult;
    fn min_intrinsic_width(
        &self,
        measurables: &[Box<dyn Measurable>],
        height: f32,
    ) -> f32;
    fn max_intrinsic_width(
        &self,
        measurables: &[Box<dyn Measurable>],
        height: f32,
    ) -> f32;
    fn min_intrinsic_height(
        &self,
        measurables: &[Box<dyn Measurable>],
        width: f32,
    ) -> f32;
    fn max_intrinsic_height(
        &self,
        measurables: &[Box<dyn Measurable>],
        width: f32,
    ) -> f32;
}
Expand description

Policy responsible for measuring and placing children.

Required Methods§

Source

fn measure( &self, measurables: &[Box<dyn Measurable>], constraints: Constraints, ) -> MeasureResult

Runs the measurement pass with the provided children and constraints.

Source

fn min_intrinsic_width( &self, measurables: &[Box<dyn Measurable>], height: f32, ) -> f32

Computes the minimum intrinsic width of this policy.

Source

fn max_intrinsic_width( &self, measurables: &[Box<dyn Measurable>], height: f32, ) -> f32

Computes the maximum intrinsic width of this policy.

Source

fn min_intrinsic_height( &self, measurables: &[Box<dyn Measurable>], width: f32, ) -> f32

Computes the minimum intrinsic height of this policy.

Source

fn max_intrinsic_height( &self, measurables: &[Box<dyn Measurable>], width: f32, ) -> f32

Computes the maximum intrinsic height of this policy.

Implementors§