pub struct Checkbox {
pub label: String,
pub value: bool,
pub opt: WidgetOption,
pub bopt: WidgetBehaviourOption,
}Expand description
Persistent state for checkbox widgets.
Fields§
§label: StringLabel displayed for the checkbox.
value: boolCurrent value of the checkbox.
opt: WidgetOptionWidget options applied to the checkbox.
bopt: WidgetBehaviourOptionBehaviour options applied to the checkbox.
Implementations§
Trait Implementations§
Source§impl Widget for Checkbox
impl Widget for Checkbox
Source§fn widget_opt(&self) -> &WidgetOption
fn widget_opt(&self) -> &WidgetOption
Returns the widget options for this state.
Source§fn behaviour_opt(&self) -> &WidgetBehaviourOption
fn behaviour_opt(&self) -> &WidgetBehaviourOption
Returns the behaviour options for this state.
Source§fn handle(
&mut self,
ctx: &mut WidgetCtx<'_>,
control: &ControlState,
) -> ResourceState
fn handle( &mut self, ctx: &mut WidgetCtx<'_>, control: &ControlState, ) -> ResourceState
Handles widget interaction and rendering for the current frame using the provided context.
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