pub struct FlowRowMeasurePolicy {
pub main_axis_spacing: f32,
pub cross_axis_spacing: f32,
}Expand description
MeasurePolicy for FlowRow: children flow horizontally and wrap onto the
next line when the available width runs out (Jetpack Compose FlowRow).
- Children are measured with loose constraints (min = 0) capped at the incoming max width/height, then packed left-to-right.
- A child that no longer fits on the current line starts a new line; a child wider than the whole line gets a line of its own (and may overflow, like Compose).
main_axis_spacingseparates children on the same line andcross_axis_spacingseparates lines; children are top-aligned within their line.- With an unbounded max width everything stays on one line.
Fields§
§main_axis_spacing: f32Horizontal gap between adjacent children on the same line, in dp.
cross_axis_spacing: f32Vertical gap between consecutive lines, in dp.
Implementations§
Trait Implementations§
Source§impl Clone for FlowRowMeasurePolicy
impl Clone for FlowRowMeasurePolicy
Source§fn clone(&self) -> FlowRowMeasurePolicy
fn clone(&self) -> FlowRowMeasurePolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FlowRowMeasurePolicy
impl Debug for FlowRowMeasurePolicy
Source§impl MeasurePolicy for FlowRowMeasurePolicy
impl MeasurePolicy for FlowRowMeasurePolicy
Source§fn measure(
&self,
measurables: &[Box<dyn Measurable>],
constraints: Constraints,
) -> MeasureResult
fn measure( &self, measurables: &[Box<dyn Measurable>], constraints: Constraints, ) -> MeasureResult
Runs the measurement pass with the provided children and constraints.
Source§fn measure_into(
&self,
measurables: &[Box<dyn Measurable>],
constraints: Constraints,
placements: &mut Vec<Placement>,
) -> Size
fn measure_into( &self, measurables: &[Box<dyn Measurable>], constraints: Constraints, placements: &mut Vec<Placement>, ) -> Size
Runs measurement into caller-owned placement storage. Read more
Source§fn min_intrinsic_width(
&self,
measurables: &[Box<dyn Measurable>],
height: f32,
) -> f32
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
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
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
fn max_intrinsic_height( &self, measurables: &[Box<dyn Measurable>], width: f32, ) -> f32
Computes the maximum intrinsic height of this policy.
Source§impl PartialEq for FlowRowMeasurePolicy
impl PartialEq for FlowRowMeasurePolicy
impl StructuralPartialEq for FlowRowMeasurePolicy
Auto Trait Implementations§
impl Freeze for FlowRowMeasurePolicy
impl RefUnwindSafe for FlowRowMeasurePolicy
impl Send for FlowRowMeasurePolicy
impl Sync for FlowRowMeasurePolicy
impl Unpin for FlowRowMeasurePolicy
impl UnsafeUnpin for FlowRowMeasurePolicy
impl UnwindSafe for FlowRowMeasurePolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more