pub struct Layout { /* private fields */ }Expand description
Layout is a screen layout of the windows available for displaying buffer content to the user. The available screen space is split into a number of columns each containing a vertical stack of windows.
Implementations§
Source§impl Layout
impl Layout
pub fn new_with_stub_lsp_handle( screen_rows: usize, screen_cols: usize, config: Arc<RwLock<Config>>, ) -> Self
Sourcepub fn active_buffer(&self) -> &Buffer
pub fn active_buffer(&self) -> &Buffer
Returns the active buffer or the scratch buffer if it is focused
pub fn open_or_focus<P: AsRef<Path>>( &mut self, path: P, new_window: bool, ) -> Result<Option<BufferId>>
Sourcepub fn focus_column_for_resize(&mut self, col_idx: usize)
pub fn focus_column_for_resize(&mut self, col_idx: usize)
Focus the column at the given index without recording a jump.
§Panics
Panics if col_idx is out of bounds.
Sourcepub fn focus_window_for_resize(&mut self, win_idx: usize)
pub fn focus_window_for_resize(&mut self, win_idx: usize)
Focus the window at the given index within the currently focused column, without recording a jump.
§Panics
Panics if win_idx is out of bounds.
Sourcepub fn focus_column_and_window_for_resize(
&mut self,
col_idx: usize,
win_idx: usize,
)
pub fn focus_column_and_window_for_resize( &mut self, col_idx: usize, win_idx: usize, )
Focus the column and window at the given indices without recording a jump.
§Panics
Panics if either index is out of bounds.
Sourcepub fn resize_active_column_against_next(&mut self, delta: i16)
pub fn resize_active_column_against_next(&mut self, delta: i16)
Resize the active column against the column to its right.
Sourcepub fn resize_active_window_against_next(&mut self, delta: i16)
pub fn resize_active_window_against_next(&mut self, delta: i16)
Resize the active window against the window below it.
pub fn border_at_coords(&self, x: usize, y: usize) -> Option<Border>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Layout
impl !RefUnwindSafe for Layout
impl Send for Layout
impl !Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more