Struct cursive::view::SizedView
[−]
[src]
pub struct SizedView<T: View> { pub view: T, pub size: Vec2, }
Wrapper around a view that remembers its size.
Fields
view: T
Wrapped view.
size: Vec2
Cached size from the last layout() call.
Methods
impl<T: View> SizedView<T>[src]
fn new(view: T) -> Self
Wraps the given view.
Trait Implementations
impl<T: View> ViewWrapper for SizedView<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_layout(&mut self, size: Vec2)
Wraps the layout method
fn wrap_draw(&mut self, printer: &Printer)
Wraps the draw method.
fn wrap_get_min_size(&mut self, req: Vec2) -> Vec2
Wraps the get_min_size method.
fn wrap_on_event(&mut self, ch: Event) -> EventResult
Wraps the on_event method.
fn wrap_take_focus(&mut self) -> bool
Wraps the take_focus method