[][src]Struct cursive::views::EnableableView

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

Wrapper around another view that can be enabled/disabled at will.

When disabled, all child views will be disabled and will stop receiving events.

Methods

impl<V> EnableableView<V>[src]

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

Creates a new EnableableView around view.

It will be enabled by default.

pub fn disable(&mut self)[src]

Disables this view.

A disabled view cannot be selected.

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

Disables this view.

Chainable variant.

pub fn enable(&mut self)[src]

Re-enables this view.

pub fn set_enabled(&mut self, enabled: bool)[src]

Enable or disable this view.

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

Returns true if this view is enabled.

Trait Implementations

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

type V = V

Type that this view wraps.

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

Wraps the take_focus method.

fn wrap_call_on_any<'a>(&mut self, selector: &Selector, callback: AnyCb<'a>)[src]

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.

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

Wraps the important_area method.

Auto Trait Implementations

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

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

Blanket Implementations

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

impl<T> From for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

impl<T, U> TryInto 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> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T[src]