Struct cursive::view::StackView [] [src]

pub struct StackView {
    // some fields omitted
}

Simple stack of views. Only the top-most view is active and can receive input.

Methods

impl StackView
[src]

fn new() -> Self

Creates a new empty StackView

fn add_layer<T: 'static + View>(&mut self, view: T)

Add new view on top of the stack.

fn pop_layer(&mut self)

Remove the top-most layer.

Trait Implementations

impl View for StackView
[src]

fn draw(&mut self, printer: &Printer)

Draws the view with the given printer (includes bounds) and focus.

fn on_event(&mut self, event: Event) -> EventResult

Called when a key was pressed. Default implementation just ignores it.

fn layout(&mut self, size: Vec2)

Called once the size for this view has been decided, so it can propagate the information to its children. Read more

fn get_min_size(&self, size: SizeRequest) -> Vec2

Returns the minimum size the view requires under the given restrictions.

fn take_focus(&mut self) -> bool

This view is offered focus. Will it take it?

fn find(&mut self, selector: &Selector) -> Option<&mut Any>

Finds the view pointed to by the given path. Returns None if the path doesn't lead to a view. Read more