Struct gabelstaplerwm::wm::layout::grid::Grid
[−]
[src]
pub struct Grid { pub max_col: u8, }
Grid Layout.
+-+---+-+
| | | | |
+-+-+-+-+
| | | | |
+-+---+-+
Places windows in a grid with a fixed number of columns, adding new lines as necessary. Number of columns is configurable. If the amount of windows present isn't evenly divisible by the number of columns, the leftover slots are left empty.
Fields
max_col: u8
Maximum number of columns.
Trait Implementations
impl Debug for Grid
[src]
impl Default for Grid
[src]
impl Layout for Grid
[src]
fn arrange(
&self,
num_windows: usize,
screen: &TilingArea
) -> Vec<Option<Geometry>>
&self,
num_windows: usize,
screen: &TilingArea
) -> Vec<Option<Geometry>>
Compute window geometries. Read more
fn right_window(&self, index: usize, max: usize) -> Option<usize>
Get the index of the window to the right of the nth window.
fn left_window(&self, index: usize, _: usize) -> Option<usize>
Get the index of the window to the left of the nth window.
fn top_window(&self, index: usize, _: usize) -> Option<usize>
Get the index of the window to the top of the nth window.
fn bottom_window(&self, index: usize, max: usize) -> Option<usize>
Get the index of the window to the bottom of the nth window.
fn new_window_as_master(&self) -> bool
Decide whether to insert new windows as master.
fn edit_layout(&mut self, msg: LayoutMessage) -> bool
React to a LayoutMessage
, returning true on change.
fn edit_layout_retry(&mut self, msgs: Vec<LayoutMessage>) -> bool
React to the first applicable LayoutMessage
. Read more