pub struct MainLayout {
pub header: Rect,
pub filter: Rect,
pub scripts: Rect,
pub description: Rect,
pub footer: Rect,
}Expand description
Main layout areas.
Fields§
§header: RectHeader area.
filter: RectFilter bar area.
scripts: RectScripts grid area.
description: RectDescription panel area.
Footer area.
Implementations§
Source§impl MainLayout
impl MainLayout
Sourcepub fn new(area: Rect) -> Self
pub fn new(area: Rect) -> Self
Calculate the main layout for the given area with default settings.
Sourcepub fn with_config(area: Rect, config: &AppearanceConfig) -> Self
pub fn with_config(area: Rect, config: &AppearanceConfig) -> Self
Calculate the main layout with configuration options.
Sourcepub fn script_rows(&self) -> usize
pub fn script_rows(&self) -> usize
Calculate available rows for scripts.
Sourcepub fn is_too_small(&self) -> bool
pub fn is_too_small(&self) -> bool
Check if the terminal is too small.
Trait Implementations§
Source§impl Clone for MainLayout
impl Clone for MainLayout
Source§fn clone(&self) -> MainLayout
fn clone(&self) -> MainLayout
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MainLayout
impl Debug for MainLayout
impl Copy for MainLayout
Auto Trait Implementations§
impl Freeze for MainLayout
impl RefUnwindSafe for MainLayout
impl Send for MainLayout
impl Sync for MainLayout
impl Unpin for MainLayout
impl UnwindSafe for MainLayout
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more