logo
pub struct Switch {
Show 22 fields pub key: Key, pub value: bool, pub on_changed: Option<ValueChanged<bool>>, pub active_color: Color, pub active_track_color: Color, pub inactive_thumb_color: Color, pub inactive_track_color: Color, pub active_thumb_image: Option<Box<dyn ImageProvider>>, pub on_active_thumb_image_error: Option<Box<ImageErrorListener>>, pub inactive_thumb_image: Option<Box<dyn ImageProvider>>, pub on_inactive_thumb_image_error: Option<Box<ImageErrorListener>>, pub thumb_color: MaterialStateProperty<Color>, pub track_color: MaterialStateProperty<Color>, pub material_tap_target_size: MaterialTapTargetSize, pub drag_start_behavior: DragStartBehavior, pub mouse_cursor: MouseCursor, pub focus_color: Color, pub hover_color: Color, pub overlay_color: MaterialStateProperty<Color>, pub splash_radius: f32, pub focus_node: FocusNode, pub autofocus: bool,
}

Fields

key: Keyvalue: boolon_changed: Option<ValueChanged<bool>>active_color: Coloractive_track_color: Colorinactive_thumb_color: Colorinactive_track_color: Coloractive_thumb_image: Option<Box<dyn ImageProvider>>on_active_thumb_image_error: Option<Box<ImageErrorListener>>inactive_thumb_image: Option<Box<dyn ImageProvider>>on_inactive_thumb_image_error: Option<Box<ImageErrorListener>>thumb_color: MaterialStateProperty<Color>track_color: MaterialStateProperty<Color>material_tap_target_size: MaterialTapTargetSizedrag_start_behavior: DragStartBehaviormouse_cursor: MouseCursorfocus_color: Colorhover_color: Coloroverlay_color: MaterialStateProperty<Color>splash_radius: f32focus_node: FocusNodeautofocus: bool

Trait Implementations

Returns the “default value” for a type. Read more

Inflates this configuration to a concrete instance

The widdget key

The control x position, relative to its container

The control y position, relative to its container

The control width

The control height

The control minimum width

The control minimum height

The control maximum width

The control maximum height

The control parent, if any

The control depth. Usually set internally

Whether or not the control is visible at creation

Whether or not the control responds to mouse input

Whether or not the control responds to key input

Whether or not the control emits render signals from the canvas render call

Internal. Internal parent visibility for creating sub controls.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Typed getter

Inspect the context.

Inspect the context.

Inspect the context.

Calls U::from(self).

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

Convert into color

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Sets value as a parameter of self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.