Struct cursive::views::ViewBox [−][src]
pub struct ViewBox { /* fields omitted */ }
A boxed View
.
It derefs to the wrapped view.
Methods
impl ViewBox
[src]
impl ViewBox
pub fn new(view: Box<View>) -> Self
[src]
pub fn new(view: Box<View>) -> Self
Creates a new ViewBox
around the given boxed view.
pub fn boxed<T>(view: T) -> Self where
T: IntoBoxedView,
[src]
pub fn boxed<T>(view: T) -> Self where
T: IntoBoxedView,
Box the given view
ⓘImportant traits for Box<R>pub fn unwrap(self) -> Box<View>
[src]
ⓘImportant traits for Box<R>
pub fn unwrap(self) -> Box<View>
Returns the inner boxed view.
Trait Implementations
impl Deref for ViewBox
[src]
impl Deref for ViewBox
type Target = View
The resulting type after dereferencing.
fn deref(&self) -> &View
[src]
fn deref(&self) -> &View
Dereferences the value.
impl DerefMut for ViewBox
[src]
impl DerefMut for ViewBox
impl ViewWrapper for ViewBox
[src]
impl ViewWrapper for ViewBox
type V = View
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: Sized,
Self::V: Sized,
[src]
fn into_inner(self) -> Result<Self::V, Self> where
Self: Sized,
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.