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]
impl<T> RadioGroup<T>
pub fn new() -> Self
[src]
pub 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
.
pub fn selected_id(&self) -> usize
[src]
pub fn selected_id(&self) -> usize
Returns the id of the selected button.
Buttons are indexed in the order they are created, starting from 0.
pub fn selection(&self) -> Rc<T>
[src]
pub fn selection(&self) -> Rc<T>
Returns the value associated with the selected button.
impl RadioGroup<String>
[src]
impl RadioGroup<String>
Adds a button, using the label itself as value.
Trait Implementations
impl<T: Clone> Clone for RadioGroup<T>
[src]
impl<T: Clone> Clone for RadioGroup<T>
fn clone(&self) -> 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[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl<T> Default for RadioGroup<T>
[src]
impl<T> Default for RadioGroup<T>
Auto Trait Implementations
impl<T> !Send for RadioGroup<T>
impl<T> !Send for RadioGroup<T>
impl<T> !Sync for RadioGroup<T>
impl<T> !Sync for RadioGroup<T>