Trait freya::prelude::AreaModel

pub trait AreaModel {
    // Required methods
    fn without_gaps(self, gap: &Gaps) -> Rect<f32, Measure>;
    fn move_with_offsets(
        &mut self,
        offset_x: &Length<f32, Measure>,
        offset_y: &Length<f32, Measure>,
    );
    fn adjust_size(&mut self, node: &Node);
    fn expand(&mut self, size: &Size2D<f32, Measure>);
    fn max_area_when_rotated(
        &self,
        center: Point2D<f32, Measure>,
    ) -> Rect<f32, Measure>;
    fn clip(&mut self, other: &Self);
}

Required Methods§

fn without_gaps(self, gap: &Gaps) -> Rect<f32, Measure>

The area without any outer gap (e.g margin)

fn move_with_offsets( &mut self, offset_x: &Length<f32, Measure>, offset_y: &Length<f32, Measure>, )

Adjust the available area with the node offsets (mainly used by scrollviews)

fn adjust_size(&mut self, node: &Node)

Adjust the size given the Node data

fn expand(&mut self, size: &Size2D<f32, Measure>)

fn max_area_when_rotated( &self, center: Point2D<f32, Measure>, ) -> Rect<f32, Measure>

fn clip(&mut self, other: &Self)

Object Safety§

This trait is not object safe.

Implementors§