pub struct Layout { /* private fields */ }Expand description
A renderable that divides a fixed height in to rows or columns.
Implementations§
Source§impl Layout
impl Layout
Sourcepub fn with_renderable(renderable: impl Renderable + 'static) -> Self
pub fn with_renderable(renderable: impl Renderable + 'static) -> Self
Create a new leaf layout with a renderable.
pub fn with_name(self, name: impl Into<String>) -> Self
pub fn with_size(self, size: usize) -> Self
pub fn with_minimum_size(self, minimum_size: usize) -> Self
pub fn with_ratio(self, ratio: usize) -> Self
pub fn with_visible(self, visible: bool) -> Self
pub fn id(&self) -> usize
pub fn name(&self) -> Option<String>
pub fn children(&self) -> Vec<Layout>
pub fn get(&self, name: &str) -> Option<Layout>
pub fn update(&self, renderable: impl Renderable + 'static)
pub fn split(&self, splitter: SplitterKind, layouts: Vec<Layout>)
pub fn split_row(&self, layouts: Vec<Layout>)
pub fn split_column(&self, layouts: Vec<Layout>)
pub fn add_split(&self, layouts: Vec<Layout>)
pub fn unsplit(&self)
Trait Implementations§
Source§impl Renderable for Layout
impl Renderable for Layout
Source§fn render(&self, console: &Console, options: &ConsoleOptions) -> Segments
fn render(&self, console: &Console, options: &ConsoleOptions) -> Segments
Render this object to a sequence of segments.
Source§fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
fn measure(&self, console: &Console, options: &ConsoleOptions) -> Measurement
Measure the minimum and maximum width requirements. Read more
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§
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