pub struct RadioState {
pub area: Rect,
pub inner: Rect,
pub marker_area: Rect,
pub continue_area: Rect,
pub check_areas: Vec<Rect>,
pub text_areas: Vec<Rect>,
pub default_settable: bool,
pub selected: Option<usize>,
pub focus: FocusFlag,
pub mouse: MouseFlags,
pub non_exhaustive: NonExhaustive,
}Expand description
State
Fields§
§area: RectComplete area read only. renewed for each render.
inner: RectArea inside the block. read only. renewed for each render.
marker_area: RectArea for the focus marker. read only. renewed for each render.
continue_area: RectArea for a continue marker. This is displayed if not all items can be displayed.
check_areas: Vec<Rect>read only. renewed for each render. Area of the check marks. read only. renewed for each render.
text_areas: Vec<Rect>Area for the texts. read only. renewed for each render.
default_settable: boolCan return to default with a user interaction.
selected: Option<usize>Selected state.
focus: FocusFlagCurrent focus state. read+write
mouse: MouseFlagsMouse helper read+write
non_exhaustive: NonExhaustiveImplementations§
Source§impl RadioState
impl RadioState
pub fn new() -> Self
pub fn named(name: &str) -> Self
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn selected(&self) -> Option<usize>
pub fn select(&mut self, select: Option<usize>) -> bool
pub fn next(&mut self) -> bool
pub fn prev(&mut self) -> bool
Trait Implementations§
Source§impl Clone for RadioState
impl Clone for RadioState
Source§fn clone(&self) -> RadioState
fn clone(&self) -> RadioState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RadioState
impl Debug for RadioState
Source§impl Default for RadioState
impl Default for RadioState
Source§impl HandleEvent<Event, MouseOnly, Outcome> for RadioState
impl HandleEvent<Event, MouseOnly, Outcome> for RadioState
Source§impl HandleEvent<Event, Regular, Outcome> for RadioState
impl HandleEvent<Event, Regular, Outcome> for RadioState
Source§impl HasFocus for RadioState
impl HasFocus for RadioState
Source§fn build(&self, builder: &mut FocusBuilder)
fn build(&self, builder: &mut FocusBuilder)
Build the focus-structure for the container.
Declares how the widget interacts with focus. Read more
Source§fn is_focused(&self) -> bool
fn is_focused(&self) -> bool
Focused?
Source§fn lost_focus(&self) -> bool
fn lost_focus(&self) -> bool
Just lost focus.
Source§fn gained_focus(&self) -> bool
fn gained_focus(&self) -> bool
Just gained focus.
Source§impl RelocatableState for RadioState
impl RelocatableState for RadioState
Auto Trait Implementations§
impl !Freeze for RadioState
impl !RefUnwindSafe for RadioState
impl !Send for RadioState
impl !Sync for RadioState
impl Unpin for RadioState
impl !UnwindSafe for RadioState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more