[−][src]Struct cursive_core::views::RadioButton
Variant of Checkbox
arranged in group.
RadioButton
s 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.
RadioButton
s are not created directly, but through
RadioGroup::button
.
Implementations
impl<T: 'static> RadioButton<T>
[src]
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 with_enabled(mut self: Self, is_enabled: bool) -> Self
[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) -> Self
[src]
Selects this button, un-selecting any other in the same group.
Chainable variant.
Trait Implementations
impl<T: 'static> View for RadioButton<T>
[src]
pub fn required_size(&mut self, _: Vec2) -> Vec2
[src]
pub fn take_focus(&mut self, _: Direction) -> bool
[src]
pub fn draw(&self, printer: &Printer<'_, '_>)
[src]
pub fn on_event(&mut self, event: Event) -> EventResult
[src]
pub fn layout(&mut self, _: Vec2)
[src]
pub fn needs_relayout(&self) -> bool
[src]
pub fn call_on_any<'a>(&mut self, _: &Selector<'_>, _: AnyCb<'a>)
[src]
pub fn focus_view(&mut self, _: &Selector<'_>) -> Result<(), ViewNotFound>
[src]
pub fn important_area(&self, view_size: Vec2) -> Rect
[src]
pub fn type_name(&self) -> &'static str
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for RadioButton<T>
[src]
impl<T> !Send for RadioButton<T>
[src]
impl<T> !Sync for RadioButton<T>
[src]
impl<T> Unpin for RadioButton<T>
[src]
impl<T> !UnwindSafe for RadioButton<T>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Erased for T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,