Trait Packing

Source
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§

Source

fn relax(&mut self, sa: &mut dyn SurfaceAccess)

TODO: Implement relaxing. Currently relaxing is equivalent to homogenizing.

Source

fn homogenize(&mut self, sa: &mut dyn SurfaceAccess)

Make all subsurfaces have the same size and proper layout. Homogenizing works only on directed frames.

Source

fn change_size(&mut self, vactor: Vector, sa: &mut dyn SurfaceAccess)

Set size of the frame and resize its subframe accordingly.

Source

fn set_size(&mut self, size: Size, sa: &mut dyn SurfaceAccess)

Set size of the frame and resize its subframe accordingly.

Source

fn remove_self(&mut self, sa: &mut dyn SurfaceAccess)

Remove given frame and relax old parent.

Implementors§