Skip to main content

Checkbox

Struct Checkbox 

Source
pub struct Checkbox { /* private fields */ }

Implementations§

Source§

impl Checkbox

Source

pub fn new(label: impl Into<String>) -> Self

Source

pub fn checked(&self, checked: bool) -> &Self

Source

pub fn check(&self, checked: bool) -> &Self

Source

pub fn mixed(&self, mixed: bool) -> &Self

Source

pub fn check_state(&self, state: CheckState) -> &Self

Source

pub fn tri_state(&self, enabled: bool) -> &Self

Source

pub fn sizing(&self, sizing: LabeledControlSizing) -> &Self

Source

pub fn clear_sizing(&self) -> &Self

Source

pub fn template(&self, template: Rc<dyn CheckboxIndicatorTemplate>) -> &Self

Source

pub fn clear_template(&self) -> &Self

Source

pub fn colors(&self, colors: LabeledControlColors) -> &Self

Source

pub fn clear_colors(&self) -> &Self

Source

pub fn on_changed( &self, handler: impl Fn(CheckboxChangedEventArgs) + 'static, ) -> &Self

Source

pub fn checked_state(&self) -> CheckState

Source

pub fn state(&self) -> CheckState

Source

pub fn is_checked(&self) -> bool

Source

pub fn enabled(&self, enabled: bool) -> &Self

Trait Implementations§

Source§

impl Clickable for Checkbox

Source§

fn on_click(&self, handler: impl Fn(ClickEventArgs) + 'static) -> &Self

Source§

impl Clone for Checkbox

Source§

fn clone(&self) -> Checkbox

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl HasFlexBoxRoot for Checkbox

Source§

impl LabeledControlTextStyle for Checkbox

Source§

fn font_family(&self, family: FontFamily) -> &Self

Source§

fn font_size(&self, size: f32) -> &Self

Source§

fn text_color(&self, color: u32) -> &Self

Source§

impl Node for Checkbox

Source§

fn node_id(&self, node_id: impl Into<String>) -> &Self
where Self: Sized,

Source§

fn semantic_role(&self, role: SemanticRole) -> &Self
where Self: Sized,

Source§

fn semantic_label(&self, label: impl Into<String>) -> &Self
where Self: Sized,

Source§

fn semantic_checked(&self, state: SemanticCheckedState) -> &Self
where Self: Sized,

Source§

fn semantic_disabled(&self, disabled: bool) -> &Self
where Self: Sized,

Source§

fn clear_semantic_disabled(&self) -> &Self
where Self: Sized,

Source§

fn semantic_selected(&self, selected: bool) -> &Self
where Self: Sized,

Source§

fn clear_semantic_selected(&self) -> &Self
where Self: Sized,

Source§

fn semantic_expanded(&self, expanded: bool) -> &Self
where Self: Sized,

Source§

fn clear_semantic_expanded(&self) -> &Self
where Self: Sized,

Source§

fn semantic_value_range( &self, value_now: f32, value_min: f32, value_max: f32, ) -> &Self
where Self: Sized,

Source§

fn clear_semantic_value_range(&self) -> &Self
where Self: Sized,

Source§

fn semantic_orientation(&self, orientation: Orientation) -> &Self
where Self: Sized,

Source§

fn request_semantic_announcement(&self) -> &Self
where Self: Sized,

Source§

fn child_count(&self) -> usize

Source§

fn is_enabled(&self) -> bool

Source§

fn is_visible(&self) -> bool

Source§

fn cursor_style(&self) -> CursorStyle

Source§

fn persist_state(&self, adapter: Rc<dyn PersistedStateAdapter>) -> &Self
where Self: Sized,

Source§

fn handle(&self) -> NodeHandle

Source§

fn has_built_handle(&self) -> bool

Source§

fn on_context_menu( &self, handler: impl Fn(ContextMenuEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn clear_context_menu(&self) -> &Self
where Self: Sized,

Source§

fn disable_context_menu(&self, flag: bool) -> &Self
where Self: Sized,

Source§

fn on_pointer_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Handles the low-level routed pointer-click event. Read more
Source§

fn on_pointer_double_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Handles a low-level routed pointer double-click after the ordinary pointer-click callback.
Source§

fn on_pointer_triple_click( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Handles a low-level routed pointer triple-click after the ordinary pointer-click callback.
Source§

fn on_pointer_down( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_pointer_move( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_pointer_up( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_pointer_enter( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_pointer_leave( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_pointer_cancel( &self, handler: impl Fn(&mut PointerEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_wheel(&self, handler: impl Fn(&mut WheelEventArgs) + 'static) -> &Self
where Self: Sized,

Source§

fn on_pan_gesture( &self, handler: impl Fn(&mut GestureEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_pinch_gesture( &self, handler: impl Fn(&mut GestureEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn long_press_options( &self, minimum_duration_ms: i32, movement_tolerance: f32, ) -> &Self
where Self: Sized,

Source§

fn on_long_press( &self, handler: impl Fn(&mut LongPressEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn focusable(&self, enabled: bool, tab_index: i32) -> &Self
where Self: Sized,

Source§

fn focus_now(&self) -> &Self
where Self: Sized,

Source§

fn enabled(&self, enabled: bool) -> &Self
where Self: Sized,

Source§

fn visibility(&self, visibility: Visibility) -> &Self
where Self: Sized,

Source§

fn cursor(&self, style: CursorStyle) -> &Self
where Self: Sized,

Source§

fn clear_cursor(&self) -> &Self
where Self: Sized,

Source§

fn on_key_down(&self, handler: impl Fn(&mut KeyEventArgs) + 'static) -> &Self
where Self: Sized,

Source§

fn on_key_up(&self, handler: impl Fn(&mut KeyEventArgs) + 'static) -> &Self
where Self: Sized,

Source§

fn on_focus_changed( &self, handler: impl Fn(FocusChangedEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn drag_allowed_effects(&self, effects: DragDropEffects) -> &Self
where Self: Sized,

Source§

fn drag_data( &self, handler: impl Fn() -> Option<DragDataObject> + 'static, ) -> &Self
where Self: Sized,

Source§

fn clear_drag_data(&self) -> &Self
where Self: Sized,

Source§

fn allow_drop(&self, flag: bool) -> &Self
where Self: Sized,

Source§

fn on_drag_completed( &self, handler: impl Fn(DragCompletedEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_drag_enter( &self, handler: impl Fn(DragEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_drag_over( &self, handler: impl Fn(DragEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_drag_leave(&self, handler: impl Fn(DragEventArgs) + 'static) -> &Self
where Self: Sized,

Source§

fn on_drop(&self, handler: impl Fn(DragEventArgs) + 'static) -> &Self
where Self: Sized,

Source§

fn allow_external_drop(&self, flag: bool) -> &Self
where Self: Sized,

Source§

fn on_external_drag_enter( &self, handler: impl Fn(ExternalDropEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_external_drag_over( &self, handler: impl Fn(ExternalDropEventArgs) -> DropProposal + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_external_drag_leave( &self, handler: impl Fn(ExternalDropEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn on_external_drop( &self, handler: impl Fn(ExternalDropEventArgs) + 'static, ) -> &Self
where Self: Sized,

Source§

fn get_bounds(&self) -> [f32; 4]

Source§

fn absolute_to_local_position( &self, absolute_x: f32, absolute_y: f32, ) -> [f32; 2]

Source§

fn local_to_absolute_position(&self, local_x: f32, local_y: f32) -> [f32; 2]

Source§

fn ensure_handle(&self)

Source§

fn build(&self)

Source§

fn dispose(&self)

Source§

fn build_children(&self)

Source§

fn append_child<T: Node>(&self, child: &T)

Source§

fn remove_child<T: Node>(&self, child: &T) -> bool

Source§

fn parent_handle(&self) -> Option<NodeHandle>

Source§

fn notify_retained_layout_mutation(&self)

Source§

fn notify_retained_mutation(&self)

Source§

fn notify_retained_child_layout_changed(&self)

Source§

fn preserve_selection_on_pointer_down(&self, preserve: bool) -> &Self
where Self: Sized,

Source§

fn tool_tip(&self, tool_tip: ToolTip) -> &Self
where Self: Sized,

Source§

fn tool_tip_text(&self, text: impl Into<String>) -> &Self
where Self: Sized,

Source§

fn clear_tool_tip(&self) -> &Self
where Self: Sized,

Source§

impl ThemeBindable for Checkbox

Source§

fn bind_theme(&self, handler: impl Fn(&Self, Theme) + 'static) -> &Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> BoxStyleSurface for T
where T: HasFlexBoxRoot,

Source§

fn box_style_surface_root(&self) -> &FlexBox

Source§

fn interactive(&self, interactive: bool) -> &Self

Source§

fn padding(&self, left: f32, top: f32, right: f32, bottom: f32) -> &Self

Source§

fn clear_padding(&self) -> &Self

Source§

fn corner_radius(&self, radius: f32) -> &Self

Source§

fn clear_corners(&self) -> &Self

Source§

fn corners(&self, tl: f32, tr: f32, br: f32, bl: f32) -> &Self

Source§

fn border(&self, width: f32, color: u32) -> &Self

Source§

fn border_config(&self, border: Border) -> &Self

Source§

fn clear_border(&self) -> &Self

Source§

fn bg_color(&self, color: u32) -> &Self

Source§

fn clear_bg_color(&self) -> &Self

Source§

fn opacity(&self, value: f32) -> &Self

Source§

fn clear_opacity(&self) -> &Self

Source§

fn blur(&self, sigma: f32) -> &Self

Source§

fn drop_shadow( &self, color: u32, offset_x: f32, offset_y: f32, blur_sigma: f32, spread: f32, ) -> &Self

Source§

fn clear_drop_shadow(&self) -> &Self

Source§

fn background_blur(&self, sigma: f32) -> &Self

Source§

fn linear_gradient( &self, start_x: f32, start_y: f32, end_x: f32, end_y: f32, offsets: Vec<f32>, colors: Vec<u32>, ) -> &Self

Source§

fn linear_gradient_stops( &self, start_x: f32, start_y: f32, end_x: f32, end_y: f32, stops: Vec<GradientStop>, ) -> &Self

Source§

fn transitions(&self, transitions: Option<NodeTransitions>) -> &Self

Source§

fn clip_to_bounds(&self, clip: bool) -> &Self

Source§

impl<T> ChildContainerSurface for T
where T: HasFlexBoxRoot,

Source§

fn append_surface_child(&self, child: NodeRef)

Source§

fn child<T: Node>(&self, child: &T) -> &Self

Source§

fn children<I, C>(&self, children: I) -> &Self
where I: IntoIterator<Item = C>, C: Into<Child>,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Configure for T

Source§

fn configure(self, configure: impl FnOnce(&Self)) -> Self

Source§

impl<T> FlexBoxSurface for T

Source§

impl<T> FlexLayoutSurface for T
where T: HasFlexBoxRoot,

Source§

fn flex_layout_surface_root(&self) -> &FlexBox

Source§

fn flex_direction(&self, direction: FlexDirection) -> &Self

Source§

fn flex_basis(&self, basis: f32) -> &Self

Source§

fn justify_content(&self, justify: JustifyContent) -> &Self

Source§

fn clear_justify_content(&self) -> &Self

Source§

fn align_items(&self, align: AlignItems) -> &Self

Source§

fn clear_align_items(&self) -> &Self

Source§

fn align_self(&self, align: AlignSelf) -> &Self

Source§

fn flex_wrap(&self, wrap: FlexWrap) -> &Self

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> LayoutSurface for T
where T: HasFlexBoxRoot,

Source§

fn layout_surface_root(&self) -> &FlexBox

Source§

fn set_layout_surface_width(&self, value: f32, unit: Unit)

Source§

fn set_layout_surface_height(&self, value: f32, unit: Unit)

Source§

fn width(&self, width: f32, unit: Unit) -> &Self

Source§

fn width_len(&self, length: Length) -> &Self

Source§

fn height(&self, height: f32, unit: Unit) -> &Self

Source§

fn height_len(&self, length: Length) -> &Self

Source§

fn fill_width(&self) -> &Self

Source§

fn fill_height(&self) -> &Self

Source§

fn fill_size(&self) -> &Self

Source§

fn fill_width_percent(&self, percent: f32) -> &Self

Source§

fn fill_height_percent(&self, percent: f32) -> &Self

Source§

fn min_width(&self, value: f32, unit: Unit) -> &Self

Source§

fn min_width_len(&self, length: Length) -> &Self

Source§

fn max_width(&self, value: f32, unit: Unit) -> &Self

Source§

fn max_width_len(&self, length: Length) -> &Self

Source§

fn min_height(&self, value: f32, unit: Unit) -> &Self

Source§

fn min_height_len(&self, length: Length) -> &Self

Source§

fn max_height(&self, value: f32, unit: Unit) -> &Self

Source§

fn max_height_len(&self, length: Length) -> &Self

Source§

fn margin(&self, left: f32, top: f32, right: f32, bottom: f32) -> &Self

Source§

fn position_type(&self, position_type: PositionType) -> &Self

Source§

fn position_absolute(&self) -> &Self

Source§

fn position(&self, left: f32, top: f32) -> &Self

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.