Trait AreaModel
pub trait AreaModel {
// Required methods
fn without_gaps(self, gap: &Gaps) -> Rect<f32, ()>;
fn move_with_offsets(
&mut self,
offset_x: &Length<f32, ()>,
offset_y: &Length<f32, ()>,
);
fn adjust_size(&mut self, node: &Node);
fn expand(&mut self, size: &Size2D<f32, ()>);
fn max_area_when_rotated(&self, center: Point2D<f32, ()>) -> Rect<f32, ()>;
fn clip(&mut self, other: &Self);
}
Required Methods§
fn without_gaps(self, gap: &Gaps) -> Rect<f32, ()>
fn without_gaps(self, gap: &Gaps) -> Rect<f32, ()>
The area without any outer gap (e.g margin)
fn move_with_offsets(
&mut self,
offset_x: &Length<f32, ()>,
offset_y: &Length<f32, ()>,
)
fn move_with_offsets( &mut self, offset_x: &Length<f32, ()>, offset_y: &Length<f32, ()>, )
Adjust the available area with the node offsets (mainly used by scrollviews)
fn adjust_size(&mut self, node: &Node)
fn adjust_size(&mut self, node: &Node)
Adjust the size given the Node data
fn expand(&mut self, size: &Size2D<f32, ()>)
fn max_area_when_rotated(&self, center: Point2D<f32, ()>) -> Rect<f32, ()>
fn clip(&mut self, other: &Self)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.