Struct cursive::views::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]
Trait Implementations
impl<T: View> ViewWrapper for SizedView<T>
[src]
type V = T
Type that this view wraps.
fn with_view<F, R>(&self, f: F) -> Option<R> where
F: FnOnce(&Self::V) -> R,
[src]
F: FnOnce(&Self::V) -> R,
Runs a function on the inner view, returning the result. Read more
fn with_view_mut<F, R>(&mut self, f: F) -> Option<R> where
F: FnOnce(&mut Self::V) -> R,
[src]
F: FnOnce(&mut Self::V) -> R,
Runs a function on the inner view, returning the result. Read more
fn wrap_layout(&mut self, size: Vec2)
[src]
Wraps the layout
method.
fn wrap_draw(&self, printer: &Printer)
[src]
Wraps the draw
method.
fn wrap_required_size(&mut self, req: Vec2) -> Vec2
[src]
Wraps the required_size
method.
fn wrap_on_event(&mut self, ch: Event) -> EventResult
[src]
Wraps the on_event
method.
fn wrap_take_focus(&mut self, source: Direction) -> bool
[src]
Wraps the take_focus
method.
fn wrap_call_on_any<'a>(
&mut self,
selector: &Selector,
callback: Box<FnMut(&mut Any) + 'a>
)
[src]
&mut self,
selector: &Selector,
callback: Box<FnMut(&mut Any) + 'a>
)
Wraps the find
method.
fn wrap_focus_view(&mut self, selector: &Selector) -> Result<(), ()>
[src]
Wraps the focus_view
method.
fn wrap_needs_relayout(&self) -> bool
[src]
Wraps the needs_relayout
method.