Struct cursive::views::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)

Adds new view on top of the stack in the center of the screen.

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

Adds a view on top of the stack.

fn pop_layer(&mut self)

Remove the top-most layer.

fn offset(&self) -> Vec2

Computes the offset of the current top view.

Trait Implementations

impl Default for StackView
[src]

fn default() -> Self

Returns the "default value" for a type. Read more

impl View for StackView
[src]

fn draw(&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, Read more

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

Returns the minimum size the view requires with the given restrictions. Read more

fn take_focus(&mut self, source: Direction) -> bool

This view is offered focus. Will it take it? Read more

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

Finds the view pointed to by the given path. Read more

fn needs_relayout(&self) -> bool

Returns true if the view content changed since last layout phase. Read more