Struct cursive::views::TrackedView
[−]
[src]
pub struct TrackedView<T: View> { pub view: T, // some fields omitted }
Wrapper around a view that remembers its position.
Fields
view: T
Wrapped view.
Methods
impl<T: View> TrackedView<T>
[src]
impl<T: View> TrackedView<T>
[src]
fn new(view: T) -> Self
[src]
Creates a new TrackedView
around view
.
fn with_id(self, id: &str) -> IdView<Self>
[src]
Wraps itself in a IdView
for easy retrieval.
Trait Implementations
impl<T: View> ViewWrapper for TrackedView<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_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_layout(&mut self, size: Vec2)
[src]
Wraps the layout
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.