Skip to main content

TheStackLayoutTrait

Trait TheStackLayoutTrait 

Source
pub trait TheStackLayoutTrait: TheLayout {
    // Required methods
    fn add_canvas(&mut self, canvas: TheCanvas) -> usize;
    fn index(&self) -> usize;
    fn set_index(&mut self, index: usize);
    fn canvas_at_mut(&mut self, index: usize) -> Option<&mut TheCanvas>;
}
Expand description

TheHLayout specific functions.

Required Methods§

Source

fn add_canvas(&mut self, canvas: TheCanvas) -> usize

Add a canvas to the stack and returns the index.

Source

fn index(&self) -> usize

Returns the index of the current layout.

Source

fn set_index(&mut self, index: usize)

Set the index of the current layout.

Source

fn canvas_at_mut(&mut self, index: usize) -> Option<&mut TheCanvas>

Get a mutable reference to the canvas at the given index.

Implementors§