[][src]Trait embedded_layout::layout::linear::spacing::ElementSpacing

pub trait ElementSpacing: Copy + Clone {
    fn modify_measurement(&self, measured_size: u32, objects: u32) -> u32;
fn align(
        &self,
        alignment: impl Alignment,
        view: Rectangle,
        reference: Rectangle,
        n: u32,
        objects: u32,
        total_size: u32
    ) -> i32; }

ElementSpacing base trait

Required methods

fn modify_measurement(&self, measured_size: u32, objects: u32) -> u32

Calculate how much the total size of a layout changes by applying the current spacing

fn align(
    &self,
    alignment: impl Alignment,
    view: Rectangle,
    reference: Rectangle,
    n: u32,
    objects: u32,
    total_size: u32
) -> i32

Align view to reference using the element spacing rules

Loading content...

Implementors

impl ElementSpacing for DistributeFill[src]

impl ElementSpacing for FixedMargin[src]

impl ElementSpacing for Tight[src]

Loading content...