pub struct Grid;
Expand description
A simple grid layout that places windows in the smallest nxn grid that will contain all window present on the workspace.
..................................
. . . .
. . . .
. . . .
..................................
. . . .
. . . .
. . . .
..................................
. . . .
. . . .
. . . .
..................................
NOTE
This will leave unused screen space if there are not a square number of windows present in the workspace being laid out:
..................................
. . . .
. . . .
. . . .
..................................
. . . .
. . . .
. . . .
..................................
. . .
. . .
. . .
.......................
Implementations§
Trait Implementations§
source§impl Layout for Grid
impl Layout for Grid
source§fn name(&self) -> String
fn name(&self) -> String
A short display name for this Layout, appropriate for rendering in a status bar as an indicator
of which layout is currently being used.
source§fn boxed_clone(&self) -> Box<dyn Layout>
fn boxed_clone(&self) -> Box<dyn Layout>
Provide a clone of this Layout wrapped as a trait object. (Trait objects can not require
Clone directly)
source§fn layout(
&mut self,
s: &Stack<Xid>,
r: Rect
) -> (Option<Box<dyn Layout>>, Vec<(Xid, Rect)>)
fn layout( &mut self, s: &Stack<Xid>, r: Rect ) -> (Option<Box<dyn Layout>>, Vec<(Xid, Rect)>)
impl Copy for Grid
Auto Trait Implementations§
impl RefUnwindSafe for Grid
impl Send for Grid
impl Sync for Grid
impl Unpin for Grid
impl UnwindSafe for Grid
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more