Struct components::material::Switch
source · [−]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: Key
value: bool
on_changed: Option<ValueChanged<bool>>
active_color: Color
active_track_color: Color
inactive_thumb_color: Color
inactive_track_color: Color
active_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: MaterialTapTargetSize
drag_start_behavior: DragStartBehavior
mouse_cursor: MouseCursor
focus_color: Color
hover_color: Color
overlay_color: MaterialStateProperty<Color>
splash_radius: f32
focus_node: FocusNode
autofocus: bool
Trait Implementations
sourceimpl WidgetProperties for Switch
impl WidgetProperties for Switch
sourcefn mouse_input(&self) -> bool
fn mouse_input(&self) -> bool
Whether or not the control responds to mouse input
sourcefn renderable(&self) -> bool
fn renderable(&self) -> bool
Whether or not the control emits render signals from the canvas render call
sourcefn internal_visible(&self) -> bool
fn internal_visible(&self) -> bool
Internal. Internal parent visibility for creating sub controls.
Auto Trait Implementations
impl !RefUnwindSafe for Switch
impl !Send for Switch
impl !Sync for Switch
impl Unpin for Switch
impl !UnwindSafe for Switch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<'a, T, C, M> Inspect<'a, C, &'a mut C, M> for T
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
fn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.