pub trait Settling {
Show 14 methods
// Required methods
fn settle(
&mut self,
target: &mut Frame,
area: Option<Area>,
sa: &mut dyn SurfaceAccess,
);
fn resettle(
&mut self,
target: &mut Frame,
position: Option<Position>,
sa: &mut dyn SurfaceAccess,
);
fn pop_recursively(&mut self, pop: &mut Frame);
fn change_geometry(
&mut self,
geometry: Geometry,
sa: &mut dyn SurfaceAccess,
);
fn ramify(&mut self, geometry: Geometry) -> Frame;
fn deramify(&mut self);
fn jumpin(
&mut self,
side: Side,
target: &mut Frame,
sa: &mut dyn SurfaceAccess,
);
fn jump(
&mut self,
side: Side,
target: &mut Frame,
sa: &mut dyn SurfaceAccess,
);
fn dock(
&mut self,
target: &mut Frame,
size: Size,
sa: &mut dyn SurfaceAccess,
);
fn anchorize(&mut self, sa: &mut dyn SurfaceAccess);
fn deanchorize(&mut self, area: Area, sa: &mut dyn SurfaceAccess);
fn resize(
&mut self,
direction: Direction,
magnitude: isize,
sa: &mut dyn SurfaceAccess,
);
fn move_with_contents(&mut self, vector: Vector);
fn destroy_self(&mut self, sa: &mut dyn SurfaceAccess);
}Expand description
Extension trait for Frame adding more settling functionality.
Required Methods§
Sourcefn settle(
&mut self,
target: &mut Frame,
area: Option<Area>,
sa: &mut dyn SurfaceAccess,
)
fn settle( &mut self, target: &mut Frame, area: Option<Area>, sa: &mut dyn SurfaceAccess, )
Settle self in buildable of target and relax it.
If area is provided settle the surface as floating with given position and size.
Sourcefn resettle(
&mut self,
target: &mut Frame,
position: Option<Position>,
sa: &mut dyn SurfaceAccess,
)
fn resettle( &mut self, target: &mut Frame, position: Option<Position>, sa: &mut dyn SurfaceAccess, )
Remove given frame, relax old parent and settle the frame on given target.
If frame is floating and optional position is given it will be used to place the frame.
Sourcefn pop_recursively(&mut self, pop: &mut Frame)
fn pop_recursively(&mut self, pop: &mut Frame)
Pop the surface pop and its parents inside surface self.
After calling this function pop will be most recently used frame inside self.
Sourcefn change_geometry(&mut self, geometry: Geometry, sa: &mut dyn SurfaceAccess)
fn change_geometry(&mut self, geometry: Geometry, sa: &mut dyn SurfaceAccess)
Changes frames geometry and resizes all subframe accordingly.
Sourcefn ramify(&mut self, geometry: Geometry) -> Frame
fn ramify(&mut self, geometry: Geometry) -> Frame
Adds another container into given place in frame layout if needed.
This method is used when jumping into leaf frame to create container to handle the leaf and jumped frame.
Returns
selfif it is container with one child,- parent if parent has one child
- newly created container frame otherwise
Returned frame is guarantied to have exactly one child.
Sourcefn deramify(&mut self)
fn deramify(&mut self)
Removes unnecessary layers of container frames containing only one container or leaf frame.
Sourcefn jumpin(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
fn jumpin(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
Places frame self on given side of target frame.
Sourcefn jump(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
fn jump(&mut self, side: Side, target: &mut Frame, sa: &mut dyn SurfaceAccess)
Removes frame self from frame layout and then places it using jumpin method.
Sourcefn dock(&mut self, target: &mut Frame, size: Size, sa: &mut dyn SurfaceAccess)
fn dock(&mut self, target: &mut Frame, size: Size, sa: &mut dyn SurfaceAccess)
Places frame self in target frame as dock.
Sourcefn anchorize(&mut self, sa: &mut dyn SurfaceAccess)
fn anchorize(&mut self, sa: &mut dyn SurfaceAccess)
Anchorizes floating frame.
Sourcefn deanchorize(&mut self, area: Area, sa: &mut dyn SurfaceAccess)
fn deanchorize(&mut self, area: Area, sa: &mut dyn SurfaceAccess)
Deanchorizes frame. Floating frame must be attached to workspace so it will be resettled if necessary.
Sourcefn resize(
&mut self,
direction: Direction,
magnitude: isize,
sa: &mut dyn SurfaceAccess,
)
fn resize( &mut self, direction: Direction, magnitude: isize, sa: &mut dyn SurfaceAccess, )
Resize the frame. direction indicates the border which will be moved and magnitude is
move distance in pixels.
Sourcefn move_with_contents(&mut self, vector: Vector)
fn move_with_contents(&mut self, vector: Vector)
Move the frame and all subframes by given vector.
Sourcefn destroy_self(&mut self, sa: &mut dyn SurfaceAccess)
fn destroy_self(&mut self, sa: &mut dyn SurfaceAccess)
Removes frame self, relaxes old parent and destroys the frame.