[][src]Struct cursive::views::RadioButton

pub struct RadioButton<T> { /* fields omitted */ }

Variant of Checkbox arranged in group.

RadioButtons are managed by a [RadioGroup]. A single group can contain several radio buttons, but only one button per group can be active at a time.

RadioButtons are not created directly, but through [RadioGroup::button].

Implementations

impl<T> RadioButton<T> where
    T: 'static, 
[src]

pub fn disable(&mut self)[src]

Disables this view.

A disabled view cannot be selected.

pub fn disabled(self) -> RadioButton<T>[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 with_enabled(self, is_enabled: bool) -> RadioButton<T>[src]

Enable or disable this view.

Chainable variant.

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

Returns true if this view is enabled.

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

Returns true if this button is selected.

pub fn select(&mut self) -> EventResult[src]

Selects this button, un-selecting any other in the same group.

pub fn selected(self) -> RadioButton<T>[src]

Selects this button, un-selecting any other in the same group.

Chainable variant.

Trait Implementations

impl<T> View for RadioButton<T> where
    T: 'static, 
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for RadioButton<T>

impl<T> !Send for RadioButton<T>

impl<T> !Sync for RadioButton<T>

impl<T> Unpin for RadioButton<T>

impl<T> !UnwindSafe for RadioButton<T>

Blanket Implementations

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

impl<T> AnyView for T where
    T: View
[src]

fn as_any(&self) -> &(dyn Any + 'static)[src]

Downcast self to a Any.

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)[src]

Downcast self to a mutable Any.

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

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

impl<T> Erased for T

impl<T> Finder for T where
    T: View
[src]

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

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

impl<T> IntoBoxedView for T where
    T: View
[src]

impl<T> Nameable for T where
    T: View
[src]

impl<T> Resizable for T where
    T: View
[src]

impl<T> Scrollable for T where
    T: View
[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> View for T where
    T: ViewWrapper
[src]

impl<T> With for T[src]