pub struct Fibonacci { /* private fields */ }Expand description
Inspired by the Fibonacci layout available for dwm: https://dwm.suckless.org/patches/fibonacci/
The ratio between the main and secondary regions can be adjusted by sending ShrinkMain and ExpandMain messages to this layout.
....................................
. . .
. . .
. . .
. . .
. . .
. .................
. . . .
. . . .
. . .........
. . . . .
. . . . .
....................................Implementations§
Source§impl Fibonacci
impl Fibonacci
Sourcepub fn new(cutoff: u32, ratio: f32, ratio_step: f32) -> Self
pub fn new(cutoff: u32, ratio: f32, ratio_step: f32) -> Self
Create a new Fibonacci layout with a specified cutoff for the minimum dimensions allowed for a client.
Sourcepub fn boxed(cutoff: u32, ratio: f32, ratio_step: f32) -> Box<dyn Layout>
pub fn boxed(cutoff: u32, ratio: f32, ratio_step: f32) -> Box<dyn Layout>
Create a new Fibonacci layout as with new but returned as a trait
object ready to be added to your layout stack.
Sourcepub fn boxed_default() -> Box<dyn Layout>
pub fn boxed_default() -> Box<dyn Layout>
Create a new default Fibonacci layout as a trait object ready to be added to your layout stack.
Trait Implementations§
impl Copy for Fibonacci
Source§impl Layout for Fibonacci
impl Layout for Fibonacci
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)>)
Auto Trait Implementations§
impl Freeze for Fibonacci
impl RefUnwindSafe for Fibonacci
impl Send for Fibonacci
impl Sync for Fibonacci
impl Unpin for Fibonacci
impl UnsafeUnpin for Fibonacci
impl UnwindSafe for Fibonacci
Blanket Implementations§
impl<T> Any for Twhere
T: Any,
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