Struct cursive::views::Layer [−][src]
pub struct Layer<T: View> { /* fields omitted */ }
Wrapper view that fills the background.
Used as layer in the StackView
.
Methods
impl<T: View> Layer<T>
[src]
impl<T: View> Layer<T>
pub fn new(view: T) -> Self
[src]
pub fn new(view: T) -> Self
Wraps the given view.
ⓘImportant traits for &'a mut Rpub fn get_inner(&self) -> &T
[src]
ⓘImportant traits for &'a mut R
pub fn get_inner(&self) -> &T
Gets access to the inner view.
ⓘImportant traits for &'a mut Rpub fn get_inner_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'a mut R
pub fn get_inner_mut(&mut self) -> &mut T
Gets mutable access to the inner view.
Trait Implementations
impl<T: Debug + View> Debug for Layer<T>
[src]
impl<T: Debug + View> Debug for Layer<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: View> ViewWrapper for Layer<T>
[src]
impl<T: View> ViewWrapper for Layer<T>
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]
fn with_view<F, R>(&self, f: F) -> Option<R> where
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]
fn with_view_mut<F, R>(&mut self, f: F) -> Option<R> where
F: FnOnce(&mut Self::V) -> R,
Runs a function on the inner view, returning the result. Read more
fn into_inner(self) -> Result<Self::V, Self> where
Self::V: Sized,
[src]
fn into_inner(self) -> Result<Self::V, Self> where
Self::V: Sized,
Attempts to retrieve the inner view.
fn wrap_draw(&self, printer: &Printer)
[src]
fn wrap_draw(&self, printer: &Printer)
Wraps the draw
method.
fn wrap_required_size(&mut self, req: Vec2) -> Vec2
[src]
fn wrap_required_size(&mut self, req: Vec2) -> Vec2
Wraps the required_size
method.
fn wrap_on_event(&mut self, ch: Event) -> EventResult
[src]
fn wrap_on_event(&mut self, ch: Event) -> EventResult
Wraps the on_event
method.
fn wrap_layout(&mut self, size: Vec2)
[src]
fn wrap_layout(&mut self, size: Vec2)
Wraps the layout
method.
fn wrap_take_focus(&mut self, source: Direction) -> bool
[src]
fn wrap_take_focus(&mut self, source: Direction) -> bool
Wraps the take_focus
method.
fn wrap_call_on_any<'a>(&mut self, selector: &Selector, callback: AnyCb<'a>)
[src]
fn wrap_call_on_any<'a>(&mut self, selector: &Selector, callback: AnyCb<'a>)
Wraps the find
method.
fn wrap_focus_view(&mut self, selector: &Selector) -> Result<(), ()>
[src]
fn wrap_focus_view(&mut self, selector: &Selector) -> Result<(), ()>
Wraps the focus_view
method.
fn wrap_needs_relayout(&self) -> bool
[src]
fn wrap_needs_relayout(&self) -> bool
Wraps the needs_relayout
method.
fn wrap_important_area(&self, size: Vec2) -> Rect
[src]
fn wrap_important_area(&self, size: Vec2) -> Rect
Wraps the important_area
method.