Struct cursive::views::ShadowView [−][src]
pub struct ShadowView<T: View> { /* fields omitted */ }
Wrapper view that adds a shadow.
It reserves a 1 pixel border on each side.
Methods
impl<T: View> ShadowView<T>
[src]
impl<T: View> ShadowView<T>
pub fn new(view: T) -> Self
[src]
pub fn new(view: T) -> Self
Wraps the given view.
pub fn left_padding(self, value: bool) -> Self
[src]
pub fn left_padding(self, value: bool) -> Self
If set, adds an empty column to the left of the view.
Default to true.
pub fn top_padding(self, value: bool) -> Self
[src]
pub fn top_padding(self, value: bool) -> Self
If set, adds an empty row at the top of the view.
Default to true.
ⓘ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: View> ViewWrapper for ShadowView<T>
[src]
impl<T: View> ViewWrapper for ShadowView<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_required_size(&mut self, req: Vec2) -> Vec2
[src]
fn wrap_required_size(&mut self, req: Vec2) -> Vec2
Wraps the required_size
method.
fn wrap_layout(&mut self, size: Vec2)
[src]
fn wrap_layout(&mut self, size: Vec2)
Wraps the layout
method.
fn wrap_on_event(&mut self, event: Event) -> EventResult
[src]
fn wrap_on_event(&mut self, event: Event) -> EventResult
Wraps the on_event
method.
fn wrap_draw(&self, printer: &Printer)
[src]
fn wrap_draw(&self, printer: &Printer)
Wraps the draw
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.
Auto Trait Implementations
impl<T> Send for ShadowView<T> where
T: Send,
impl<T> Send for ShadowView<T> where
T: Send,
impl<T> Sync for ShadowView<T> where
T: Sync,
impl<T> Sync for ShadowView<T> where
T: Sync,