pub trait Packing {
// Required methods
fn relax(&mut self, sa: &mut dyn SurfaceAccess);
fn homogenize(&mut self, sa: &mut dyn SurfaceAccess);
fn change_size(&mut self, vactor: Vector, sa: &mut dyn SurfaceAccess);
fn set_size(&mut self, size: Size, sa: &mut dyn SurfaceAccess);
fn remove_self(&mut self, sa: &mut dyn SurfaceAccess);
}
Expand description
Extension trait for Frame
adding more packing functionality.
Required Methods§
Sourcefn relax(&mut self, sa: &mut dyn SurfaceAccess)
fn relax(&mut self, sa: &mut dyn SurfaceAccess)
TODO: Implement relaxing. Currently relaxing is equivalent to homogenizing.
Sourcefn homogenize(&mut self, sa: &mut dyn SurfaceAccess)
fn homogenize(&mut self, sa: &mut dyn SurfaceAccess)
Make all subsurfaces have the same size and proper layout. Homogenizing works only on directed frames.
Sourcefn change_size(&mut self, vactor: Vector, sa: &mut dyn SurfaceAccess)
fn change_size(&mut self, vactor: Vector, sa: &mut dyn SurfaceAccess)
Set size of the frame and resize its subframe accordingly.
Sourcefn set_size(&mut self, size: Size, sa: &mut dyn SurfaceAccess)
fn set_size(&mut self, size: Size, sa: &mut dyn SurfaceAccess)
Set size of the frame and resize its subframe accordingly.
Sourcefn remove_self(&mut self, sa: &mut dyn SurfaceAccess)
fn remove_self(&mut self, sa: &mut dyn SurfaceAccess)
Remove given frame and relax old parent.