pub struct Checkbox { /* private fields */ }
Expand description
A widget displaying a box which can be cycled through various checked states.
Implementations§
Source§impl Checkbox
impl Checkbox
Sourcepub fn new(
left: i32,
top: i32,
text: &str,
default: Option<char>,
sequence: Option<&[char]>,
) -> Checkbox
pub fn new( left: i32, top: i32, text: &str, default: Option<char>, sequence: Option<&[char]>, ) -> Checkbox
Create a new Checkbox
widget.
left
- The left-most position of theCheckbox
.top
- The top-most position of theCheckbox
.text
- The label to be displayed with theCheckbox
.default
- The optional default state of theCheckbox
. (The default value to be held from the sequence of possible values).sequence
- The optional sequence of values possible in theCheckbox
. (Defaults to*
if not provided).
Sourcepub fn set_value(&self, value: char)
pub fn set_value(&self, value: char)
Set the current value of the Checkbox
.
value
- The value to set theCheckbox
to. It does not necessarily need to be one specified insequence
during theCheckbox
creation.
Sourcepub fn set_flags(&self, flags: i32, sense: FlagsSense)
pub fn set_flags(&self, flags: i32, sense: FlagsSense)
Set flags modifying the Checkbox
behavior.
See flags for possible flags.
flags
- A logicalor
ed list of flags.sense
- The operation used to set the flags (Set
,Reset
, orToggle
).
Trait Implementations§
Source§impl PartialEq<ExitReason> for Checkbox
impl PartialEq<ExitReason> for Checkbox
Auto Trait Implementations§
impl !Freeze for Checkbox
impl !RefUnwindSafe for Checkbox
impl !Send for Checkbox
impl !Sync for Checkbox
impl Unpin for Checkbox
impl UnwindSafe for Checkbox
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