Module cosmic::iced::widget::vertical_slider
source · Expand description
Sliders let users set a value by moving an indicator.
§Example
use iced::widget::slider;
struct State {
value: f32,
}
#[derive(Debug, Clone)]
enum Message {
ValueChanged(f32),
}
fn view(state: &State) -> Element<'_, Message> {
slider(0.0..=100.0, state.value, Message::ValueChanged).into()
}
fn update(state: &mut State, message: Message) {
match message {
Message::ValueChanged(value) => {
state.value = value;
}
}
}
Structs§
- The appearance of the handle of a slider.
- The appearance of a slider.
- An vertical bar and a handle that selects a single value from a range of values.
Enums§
- The shape of the handle of a slider.
- The background color of the rail
- The possible status of a
Slider
.
Traits§
- The theme catalog of a
Slider
.
Functions§
- The default style of a
Slider
.
Type Aliases§
- A styling function for a
Slider
.