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]
fn new(view: T) -> Self
[src]
Wraps the given view.
fn left_padding(self, value: bool) -> Self
[src]
If set, adds an empty column to the left of the view.
Default to true.
fn top_padding(self, value: bool) -> Self
[src]
If set, adds an empty row at the top of the view.
Default to true.
Trait Implementations
impl<T: View> ViewWrapper for ShadowView<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_required_size(&mut self, req: Vec2) -> Vec2
[src]
Wraps the required_size
method.
fn wrap_layout(&mut self, size: Vec2)
[src]
Wraps the layout
method.
fn wrap_on_event(&mut self, event: Event) -> EventResult
[src]
Wraps the on_event
method.
fn wrap_draw(&self, printer: &Printer)
[src]
Wraps the draw
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.