[][src]Struct cursive::views::HideableView

pub struct HideableView<V> { /* fields omitted */ }

Wrapper around another view that can be hidden at will.

By default, it simply forwards all calls to the inner view.

When hidden (with HideableView::hide()), it will appear as a zero-sized invisible view, will not take focus and will not accept input.

It can be made visible again with HideableView::unhide().

Methods

impl<V> HideableView<V>[src]

pub fn new(view: V) -> Self[src]

Creates a new HideableView around view.

It will be visible by default.

pub fn set_visible(&mut self, visible: bool)[src]

Sets the visibility for this view.

pub fn hide(&mut self)[src]

Sets the visibility for this view to false.

pub fn unhide(&mut self)[src]

Sets the visibility for this view to true.

pub fn hidden(self) -> Self[src]

Sets the visibility for this view to false.

Chainable variant.

pub fn is_visible(&self) -> bool[src]

Returns true if the wrapped view is going to be visible.

pub fn get_inner(&self) -> &V[src]

Gets access to the inner view.

pub fn get_inner_mut(&mut self) -> &mut V[src]

Gets mutable access to the inner view.

Trait Implementations

impl<V: View> ViewWrapper for HideableView<V>[src]

type V = V

Type that this view wraps.

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_take_focus(&mut self, source: Direction) -> bool[src]

Wraps the take_focus method.

fn wrap_focus_view(&mut self, selector: &Selector) -> Result<(), ()>[src]

Wraps the focus_view method.

fn wrap_important_area(&self, size: Vec2) -> Rect[src]

Wraps the important_area method.

Auto Trait Implementations

impl<V> Sync for HideableView<V> where
    V: Sync

impl<V> Send for HideableView<V> where
    V: Send

impl<V> Unpin for HideableView<V> where
    V: Unpin

impl<V> RefUnwindSafe for HideableView<V> where
    V: RefUnwindSafe

impl<V> UnwindSafe for HideableView<V> where
    V: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]