pub trait AreaModel {
// Required methods
fn without_gaps(self, gap: &Gaps) -> Area;
fn move_with_offsets(&mut self, offset_x: &Length, offset_y: &Length);
fn adjust_size(&mut self, node: &Node);
fn expand(&mut self, size: &Size2D);
fn max_area_when_rotated(&self, center: Point2D) -> Area;
fn clip(&mut self, other: &Self);
}
Required Methods§
Sourcefn without_gaps(self, gap: &Gaps) -> Area
fn without_gaps(self, gap: &Gaps) -> Area
The area without any outer gap (e.g margin)
Sourcefn move_with_offsets(&mut self, offset_x: &Length, offset_y: &Length)
fn move_with_offsets(&mut self, offset_x: &Length, offset_y: &Length)
Adjust the available area with the node offsets (mainly used by scrollviews)
Sourcefn 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)
fn max_area_when_rotated(&self, center: Point2D) -> Area
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.