Struct cursive::view::BoxView [] [src]

pub struct BoxView<T: View> {
    // some fields omitted
}

BoxView is a wrapper around an other view, with a given minimum size.

Methods

impl<T: View> BoxView<T>
[src]

fn new<S: ToVec2>(size: S, view: T) -> Self

Creates a new BoxView with the given minimum size and content

Example

// Creates a 20x4 BoxView with a TextView content.
let view = BoxView::new((20,4), TextView::new("Hello!"));

Trait Implementations

impl<T: View> ViewWrapper for BoxView<T>
[src]

fn get_view(&self) -> &View

Get an immutable reference to the wrapped view, so that we can forward some calls to it.

fn get_view_mut(&mut self) -> &mut View

Get a mutable reference to the wrapped view, for the mutable methods.

fn wrap_get_min_size(&self, req: SizeRequest) -> Vec2

Wraps the get_min_size method.

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

Wraps the draw method.

fn wrap_on_event(&mut self, ch: Event) -> EventResult

Wraps the on_event method.

fn wrap_layout(&mut self, size: Vec2)

Wraps the layout method

fn wrap_take_focus(&mut self) -> bool

Wraps the take_focus method

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