Struct cursive::views::RadioGroup
[−]
[src]
pub struct RadioGroup<T> { /* fields omitted */ }
Group to coordinate multiple radio buttons.
A RadioGroup
is used to create and manage RadioButton
s.
A RadioGroup
can be cloned; it will keep pointing to the same group.
Methods
impl<T> RadioGroup<T>
[src]
fn new() -> Self
Creates an empty group for radio buttons.
Adds a new button to the group.
The button will display label
next to it, and will embed value
.
fn selected_id(&self) -> usize
Returns the id of the selected button.
Buttons are indexed in the order they are created, starting from 0.
fn selection(&self) -> Rc<T>
Returns the value associated with the selected button.
impl RadioGroup<String>
[src]
Adds a button, using the label itself as value.
Trait Implementations
impl<T: Clone> Clone for RadioGroup<T>
[src]
fn clone(&self) -> RadioGroup<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more