pub fn draw<T, Theme, Renderer>(
+draw in iced::widget::slider - Rust pub fn draw<T, Theme, Renderer>(
renderer: &mut Renderer,
layout: Layout<'_>,
cursor: Cursor,
diff --git a/iced/widget/slider/fn.mouse_interaction.html b/iced/widget/slider/fn.mouse_interaction.html
index 8751df26b08..81bdde84aab 100644
--- a/iced/widget/slider/fn.mouse_interaction.html
+++ b/iced/widget/slider/fn.mouse_interaction.html
@@ -1,4 +1,4 @@
-mouse_interaction in iced::widget::slider - Rust Function iced::widget::slider::mouse_interaction
source · pub fn mouse_interaction(
+mouse_interaction in iced::widget::slider - Rust Function iced::widget::slider::mouse_interaction
source · pub fn mouse_interaction(
layout: Layout<'_>,
cursor: Cursor,
state: &State
diff --git a/iced/widget/slider/fn.update.html b/iced/widget/slider/fn.update.html
index 009f5509692..ccef517b85f 100644
--- a/iced/widget/slider/fn.update.html
+++ b/iced/widget/slider/fn.update.html
@@ -1,12 +1,14 @@
-update in iced::widget::slider - Rust pub fn update<Message, T>(
+update in iced::widget::slider - Rust pub fn update<Message, T>(
event: Event,
layout: Layout<'_>,
cursor: Cursor,
shell: &mut Shell<'_, Message>,
state: &mut State,
value: &mut T,
+ default: Option<T>,
range: &RangeInclusive<T>,
step: T,
+ shift_step: Option<T>,
on_change: &dyn Fn(T) -> Message,
on_release: &Option<Message>
) -> Statuswhere
diff --git a/iced/widget/slider/struct.Slider.html b/iced/widget/slider/struct.Slider.html
index ae56c6c1a12..12ec74e459b 100644
--- a/iced/widget/slider/struct.Slider.html
+++ b/iced/widget/slider/struct.Slider.html
@@ -1,4 +1,4 @@
-Slider in iced::widget::slider - Rust pub struct Slider<'a, T, Message, Theme = Theme>where
+Slider in iced::widget::slider - Rust pub struct Slider<'a, T, Message, Theme = Theme>where
Theme: StyleSheet,{ /* private fields */ }
Implementations§
Implementations§
source§impl<'a, T, Message, Theme> Slider<'a, T, Message, Theme>
sourcepub const DEFAULT_HEIGHT: f32 = 22f32
The default height of a Slider
.
-sourcepub fn new<F>(
+ Theme: StyleSheet,
sourcepub const DEFAULT_HEIGHT: f32 = 22f32
The default height of a Slider
.
+sourcepub fn new<F>(
range: RangeInclusive<T>,
value: T,
on_change: F
@@ -32,34 +32,41 @@ Example
It receives the new value of the Slider
and must produce a
Message
.
-
sourcepub fn on_release(self, on_release: Message) -> Slider<'a, T, Message, Theme>
Sets the release message of the Slider
.
+
sourcepub fn on_release(self, on_release: Message) -> Slider<'a, T, Message, Theme>
Sets the release message of the Slider
.
This is called when the mouse is released from the slider.
Typically, the user’s interaction with the slider is finished when this message is produced.
This is useful if you need to spawn a long-running task from the slider’s result, where
the default on_change message could create too many events.
-sourcepub fn width(self, width: impl Into<Length>) -> Slider<'a, T, Message, Theme>
Sets the width of the Slider
.
-sourcepub fn width(self, width: impl Into<Length>) -> Slider<'a, T, Message, Theme>
Sets the width of the Slider
.
+sourcepub fn height(self, height: impl Into<Pixels>) -> Slider<'a, T, Message, Theme>
Sets the height of the Slider
.
+Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<Slider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
+
sourcepub fn step(self, step: impl Into<T>) -> Slider<'a, T, Message, Theme>
Sets the step size of the Slider
.
+sourcepub fn shift_step(
+ self,
+ shift_step: impl Into<T>
+) -> Slider<'a, T, Message, Theme>
Sets the optional “shift” step for the Slider
.
+If set, this value is used as the step while the shift key is pressed.
+
Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<Slider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
T: Copy + Into<f64> + FromPrimitive + 'a,
Message: Clone + 'a,
Theme: StyleSheet + 'a,
- Renderer: Renderer + 'a,
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for Slider<'a, T, Message, Theme>where
+) -> Element<'a, Message, Theme, Renderer>Converts to this type from the input type.
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for Slider<'a, T, Message, Theme>
source§fn on_event(
&mut self,
tree: &mut Tree,
event: Event,
@@ -69,7 +76,7 @@ Example
_clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
_viewport: &Rectangle
-) -> Status
source§fn draw(
&self,
tree: &Tree,
renderer: &mut Renderer,
@@ -78,7 +85,7 @@ Example
layout: Layout<'_>,
cursor: Cursor,
_viewport: &Rectangle
-)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
+)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
&self,
tree: &Tree,
layout: Layout<'_>,
diff --git a/iced/widget/slider/struct.State.html b/iced/widget/slider/struct.State.html
index afc76c67a10..76b2e47594e 100644
--- a/iced/widget/slider/struct.State.html
+++ b/iced/widget/slider/struct.State.html
@@ -1,8 +1,8 @@
-State in iced::widget::slider - Rust pub struct State { /* private fields */ }
Expand description
The local state of a Slider
.
-Implementations§
Trait Implementations§
source§impl PartialEq for State
source§fn eq(&self, other: &State) -> bool
This method tests for self
and other
values to be equal, and is used
+State in iced::widget::slider - Rust pub struct State { /* private fields */ }
Expand description
The local state of a Slider
.
+Implementations§
Trait Implementations§
source§impl PartialEq for State
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
diff --git a/iced/widget/struct.Slider.html b/iced/widget/struct.Slider.html
index 60bbd0dd4df..7b2fd4caadf 100644
--- a/iced/widget/struct.Slider.html
+++ b/iced/widget/struct.Slider.html
@@ -1,4 +1,4 @@
-Slider in iced::widget - Rust pub struct Slider<'a, T, Message, Theme = Theme>where
+Slider in iced::widget - Rust pub struct Slider<'a, T, Message, Theme = Theme>where
Theme: StyleSheet,{ /* private fields */ }
Implementations§
Implementations§
source§impl<'a, T, Message, Theme> Slider<'a, T, Message, Theme>
sourcepub const DEFAULT_HEIGHT: f32 = 22f32
The default height of a Slider
.
-sourcepub fn new<F>(
+ Theme: StyleSheet,
sourcepub const DEFAULT_HEIGHT: f32 = 22f32
The default height of a Slider
.
+sourcepub fn new<F>(
range: RangeInclusive<T>,
value: T,
on_change: F
@@ -32,34 +32,41 @@ Example
It receives the new value of the Slider
and must produce a
Message
.
-
sourcepub fn on_release(self, on_release: Message) -> Slider<'a, T, Message, Theme>
Sets the release message of the Slider
.
+
sourcepub fn on_release(self, on_release: Message) -> Slider<'a, T, Message, Theme>
Sets the release message of the Slider
.
This is called when the mouse is released from the slider.
Typically, the user’s interaction with the slider is finished when this message is produced.
This is useful if you need to spawn a long-running task from the slider’s result, where
the default on_change message could create too many events.
-sourcepub fn width(self, width: impl Into<Length>) -> Slider<'a, T, Message, Theme>
Sets the width of the Slider
.
-sourcepub fn width(self, width: impl Into<Length>) -> Slider<'a, T, Message, Theme>
Sets the width of the Slider
.
+sourcepub fn height(self, height: impl Into<Pixels>) -> Slider<'a, T, Message, Theme>
Sets the height of the Slider
.
+Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<Slider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
+
sourcepub fn step(self, step: impl Into<T>) -> Slider<'a, T, Message, Theme>
Sets the step size of the Slider
.
+sourcepub fn shift_step(
+ self,
+ shift_step: impl Into<T>
+) -> Slider<'a, T, Message, Theme>
Sets the optional “shift” step for the Slider
.
+If set, this value is used as the step while the shift key is pressed.
+
Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<Slider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
T: Copy + Into<f64> + FromPrimitive + 'a,
Message: Clone + 'a,
Theme: StyleSheet + 'a,
- Renderer: Renderer + 'a,
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for Slider<'a, T, Message, Theme>where
+) -> Element<'a, Message, Theme, Renderer>Converts to this type from the input type.
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for Slider<'a, T, Message, Theme>
source§fn on_event(
&mut self,
tree: &mut Tree,
event: Event,
@@ -69,7 +76,7 @@ Example
_clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
_viewport: &Rectangle
-) -> Status
source§fn draw(
&self,
tree: &Tree,
renderer: &mut Renderer,
@@ -78,7 +85,7 @@ Example
layout: Layout<'_>,
cursor: Cursor,
_viewport: &Rectangle
-)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
+)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
&self,
tree: &Tree,
layout: Layout<'_>,
diff --git a/iced/widget/struct.VerticalSlider.html b/iced/widget/struct.VerticalSlider.html
index 6f8cf2b0302..afa3f06b42d 100644
--- a/iced/widget/struct.VerticalSlider.html
+++ b/iced/widget/struct.VerticalSlider.html
@@ -1,4 +1,4 @@
-VerticalSlider in iced::widget - Rust Struct iced::widget::VerticalSlider
source · pub struct VerticalSlider<'a, T, Message, Theme = Theme>where
+VerticalSlider in iced::widget - Rust Struct iced::widget::VerticalSlider
source · pub struct VerticalSlider<'a, T, Message, Theme = Theme>where
Theme: StyleSheet,{ /* private fields */ }
Expand description
An vertical bar and a handle that selects a single value from a range of
values.
A VerticalSlider
will try to fill the vertical space of its container.
@@ -13,11 +13,11 @@ Example
let value = 50.0;
VerticalSlider::new(0.0..=100.0, value, Message::SliderChanged);
-Implementations§
source§impl<'a, T, Message, Theme> VerticalSlider<'a, T, Message, Theme>where
+
Implementations§
source§impl<'a, T, Message, Theme> VerticalSlider<'a, T, Message, Theme>
sourcepub const DEFAULT_WIDTH: f32 = 22f32
The default width of a VerticalSlider
.
-sourcepub fn new<F>(
+ Theme: StyleSheet,
sourcepub const DEFAULT_WIDTH: f32 = 22f32
The default width of a VerticalSlider
.
+sourcepub fn new<F>(
range: RangeInclusive<T>,
value: T,
on_change: F
@@ -31,7 +31,12 @@ Example
It receives the new value of the VerticalSlider
and must produce a
Message
.
-
sourcepub fn on_release(
+
sourcepub fn default(
+ self,
+ default: impl Into<T>
+) -> VerticalSlider<'a, T, Message, Theme>
Sets the optional default value for the VerticalSlider
.
+If set, the VerticalSlider
will reset to this value when ctrl-clicked or command-clicked.
+sourcepub fn on_release(
self,
on_release: Message
) -> VerticalSlider<'a, T, Message, Theme>
Sets the release message of the VerticalSlider
.
@@ -39,35 +44,40 @@
Example
Typically, the user’s interaction with the slider is finished when this message is produced.
This is useful if you need to spawn a long-running task from the slider’s result, where
the default on_change message could create too many events.
-sourcepub fn width(
self,
width: impl Into<Pixels>
) -> VerticalSlider<'a, T, Message, Theme>
Sets the width of the VerticalSlider
.
-sourcepub fn height(
self,
height: impl Into<Length>
) -> VerticalSlider<'a, T, Message, Theme>
Sets the height of the VerticalSlider
.
-
sourcepub fn style(
self,
style: impl Into<<Theme as StyleSheet>::Style>
) -> VerticalSlider<'a, T, Message, Theme>
Sets the style of the VerticalSlider
.
-sourcepub fn step(self, step: T) -> VerticalSlider<'a, T, Message, Theme>
Sets the step size of the VerticalSlider
.
-Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<VerticalSlider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
+
sourcepub fn step(self, step: T) -> VerticalSlider<'a, T, Message, Theme>
Sets the step size of the VerticalSlider
.
+sourcepub fn shift_step(
+ self,
+ shift_step: impl Into<T>
+) -> VerticalSlider<'a, T, Message, Theme>
Sets the optional “shift” step for the VerticalSlider
.
+If set, this value is used as the step while the shift key is pressed.
+Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<VerticalSlider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
T: Copy + Into<f64> + FromPrimitive + 'a,
Message: Clone + 'a,
Theme: StyleSheet + 'a,
- Renderer: Renderer + 'a,
source§fn from(
slider: VerticalSlider<'a, T, Message, Theme>
-) -> Element<'a, Message, Theme, Renderer>
Converts to this type from the input type.source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for VerticalSlider<'a, T, Message, Theme>where
+) -> Element<'a, Message, Theme, Renderer>Converts to this type from the input type.
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for VerticalSlider<'a, T, Message, Theme>
source§fn on_event(
&mut self,
tree: &mut Tree,
event: Event,
@@ -77,7 +87,7 @@ Example
_clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
_viewport: &Rectangle
-) -> Status
source§fn draw(
&self,
tree: &Tree,
renderer: &mut Renderer,
@@ -86,7 +96,7 @@ Example
layout: Layout<'_>,
cursor: Cursor,
_viewport: &Rectangle
-)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
+)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
&self,
tree: &Tree,
layout: Layout<'_>,
diff --git a/iced/widget/vertical_slider/fn.draw.html b/iced/widget/vertical_slider/fn.draw.html
index e6e0ac86ab2..8cfa8b261d8 100644
--- a/iced/widget/vertical_slider/fn.draw.html
+++ b/iced/widget/vertical_slider/fn.draw.html
@@ -1,4 +1,4 @@
-draw in iced::widget::vertical_slider - Rust Function iced::widget::vertical_slider::draw
source · pub fn draw<T, Theme, Renderer>(
+draw in iced::widget::vertical_slider - Rust Function iced::widget::vertical_slider::draw
source · pub fn draw<T, Theme, Renderer>(
renderer: &mut Renderer,
layout: Layout<'_>,
cursor: Cursor,
diff --git a/iced/widget/vertical_slider/fn.mouse_interaction.html b/iced/widget/vertical_slider/fn.mouse_interaction.html
index 820e997c8af..4d072f6fe44 100644
--- a/iced/widget/vertical_slider/fn.mouse_interaction.html
+++ b/iced/widget/vertical_slider/fn.mouse_interaction.html
@@ -1,4 +1,4 @@
-mouse_interaction in iced::widget::vertical_slider - Rust Function iced::widget::vertical_slider::mouse_interaction
source · pub fn mouse_interaction(
+mouse_interaction in iced::widget::vertical_slider - Rust Function iced::widget::vertical_slider::mouse_interaction
source · pub fn mouse_interaction(
layout: Layout<'_>,
cursor: Cursor,
state: &State
diff --git a/iced/widget/vertical_slider/fn.update.html b/iced/widget/vertical_slider/fn.update.html
index abcbce7aab9..b603dc5d97d 100644
--- a/iced/widget/vertical_slider/fn.update.html
+++ b/iced/widget/vertical_slider/fn.update.html
@@ -1,12 +1,14 @@
-update in iced::widget::vertical_slider - Rust Function iced::widget::vertical_slider::update
source · pub fn update<Message, T>(
+update in iced::widget::vertical_slider - Rust Function iced::widget::vertical_slider::update
source · pub fn update<Message, T>(
event: Event,
layout: Layout<'_>,
cursor: Cursor,
shell: &mut Shell<'_, Message>,
state: &mut State,
value: &mut T,
+ default: Option<T>,
range: &RangeInclusive<T>,
step: T,
+ shift_step: Option<T>,
on_change: &dyn Fn(T) -> Message,
on_release: &Option<Message>
) -> Statuswhere
diff --git a/iced/widget/vertical_slider/struct.State.html b/iced/widget/vertical_slider/struct.State.html
index 0863eb585ff..b58713cd74f 100644
--- a/iced/widget/vertical_slider/struct.State.html
+++ b/iced/widget/vertical_slider/struct.State.html
@@ -1,8 +1,8 @@
-State in iced::widget::vertical_slider - Rust Struct iced::widget::vertical_slider::State
source · pub struct State { /* private fields */ }
Expand description
The local state of a VerticalSlider
.
-Implementations§
Trait Implementations§
source§impl PartialEq for State
source§fn eq(&self, other: &State) -> bool
This method tests for self
and other
values to be equal, and is used
+State in iced::widget::vertical_slider - Rust Struct iced::widget::vertical_slider::State
source · pub struct State { /* private fields */ }
Expand description
The local state of a VerticalSlider
.
+Implementations§
Trait Implementations§
source§impl PartialEq for State
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
diff --git a/iced/widget/vertical_slider/struct.VerticalSlider.html b/iced/widget/vertical_slider/struct.VerticalSlider.html
index cbe49f4595f..c4c824442fc 100644
--- a/iced/widget/vertical_slider/struct.VerticalSlider.html
+++ b/iced/widget/vertical_slider/struct.VerticalSlider.html
@@ -1,4 +1,4 @@
-VerticalSlider in iced::widget::vertical_slider - Rust Struct iced::widget::vertical_slider::VerticalSlider
source · pub struct VerticalSlider<'a, T, Message, Theme = Theme>where
+VerticalSlider in iced::widget::vertical_slider - Rust Struct iced::widget::vertical_slider::VerticalSlider
source · pub struct VerticalSlider<'a, T, Message, Theme = Theme>where
Theme: StyleSheet,{ /* private fields */ }
Expand description
An vertical bar and a handle that selects a single value from a range of
values.
A VerticalSlider
will try to fill the vertical space of its container.
@@ -13,11 +13,11 @@ Example
let value = 50.0;
VerticalSlider::new(0.0..=100.0, value, Message::SliderChanged);
-Implementations§
source§impl<'a, T, Message, Theme> VerticalSlider<'a, T, Message, Theme>where
+
Implementations§
source§impl<'a, T, Message, Theme> VerticalSlider<'a, T, Message, Theme>
sourcepub const DEFAULT_WIDTH: f32 = 22f32
The default width of a VerticalSlider
.
-sourcepub fn new<F>(
+ Theme: StyleSheet,
sourcepub const DEFAULT_WIDTH: f32 = 22f32
The default width of a VerticalSlider
.
+sourcepub fn new<F>(
range: RangeInclusive<T>,
value: T,
on_change: F
@@ -31,7 +31,12 @@ Example
It receives the new value of the VerticalSlider
and must produce a
Message
.
-
sourcepub fn on_release(
+
sourcepub fn default(
+ self,
+ default: impl Into<T>
+) -> VerticalSlider<'a, T, Message, Theme>
Sets the optional default value for the VerticalSlider
.
+If set, the VerticalSlider
will reset to this value when ctrl-clicked or command-clicked.
+sourcepub fn on_release(
self,
on_release: Message
) -> VerticalSlider<'a, T, Message, Theme>
Sets the release message of the VerticalSlider
.
@@ -39,35 +44,40 @@
Example
Typically, the user’s interaction with the slider is finished when this message is produced.
This is useful if you need to spawn a long-running task from the slider’s result, where
the default on_change message could create too many events.
-sourcepub fn width(
self,
width: impl Into<Pixels>
) -> VerticalSlider<'a, T, Message, Theme>
Sets the width of the VerticalSlider
.
-sourcepub fn height(
self,
height: impl Into<Length>
) -> VerticalSlider<'a, T, Message, Theme>
Sets the height of the VerticalSlider
.
-
sourcepub fn style(
self,
style: impl Into<<Theme as StyleSheet>::Style>
) -> VerticalSlider<'a, T, Message, Theme>
Sets the style of the VerticalSlider
.
-sourcepub fn step(self, step: T) -> VerticalSlider<'a, T, Message, Theme>
Sets the step size of the VerticalSlider
.
-
Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<VerticalSlider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
+
sourcepub fn step(self, step: T) -> VerticalSlider<'a, T, Message, Theme>
Sets the step size of the VerticalSlider
.
+sourcepub fn shift_step(
+ self,
+ shift_step: impl Into<T>
+) -> VerticalSlider<'a, T, Message, Theme>
Sets the optional “shift” step for the VerticalSlider
.
+If set, this value is used as the step while the shift key is pressed.
+Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<VerticalSlider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
T: Copy + Into<f64> + FromPrimitive + 'a,
Message: Clone + 'a,
Theme: StyleSheet + 'a,
- Renderer: Renderer + 'a,
source§fn from(
slider: VerticalSlider<'a, T, Message, Theme>
-) -> Element<'a, Message, Theme, Renderer>
Converts to this type from the input type.source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for VerticalSlider<'a, T, Message, Theme>where
+) -> Element<'a, Message, Theme, Renderer>Converts to this type from the input type.
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for VerticalSlider<'a, T, Message, Theme>
source§fn on_event(
&mut self,
tree: &mut Tree,
event: Event,
@@ -77,7 +87,7 @@ Example
_clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
_viewport: &Rectangle
-) -> Status
source§fn draw(
&self,
tree: &Tree,
renderer: &mut Renderer,
@@ -86,7 +96,7 @@ Example
layout: Layout<'_>,
cursor: Cursor,
_viewport: &Rectangle
-)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
+)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
&self,
tree: &Tree,
layout: Layout<'_>,
diff --git a/iced_widget/slider/fn.draw.html b/iced_widget/slider/fn.draw.html
index 6bd7053730a..65f249f9f6b 100644
--- a/iced_widget/slider/fn.draw.html
+++ b/iced_widget/slider/fn.draw.html
@@ -1,4 +1,4 @@
-draw in iced_widget::slider - Rust Function iced_widget::slider::draw
source · pub fn draw<T, Theme, Renderer>(
+draw in iced_widget::slider - Rust Function iced_widget::slider::draw
source · pub fn draw<T, Theme, Renderer>(
renderer: &mut Renderer,
layout: Layout<'_>,
cursor: Cursor,
diff --git a/iced_widget/slider/fn.mouse_interaction.html b/iced_widget/slider/fn.mouse_interaction.html
index 972a700f0ef..904bed79c90 100644
--- a/iced_widget/slider/fn.mouse_interaction.html
+++ b/iced_widget/slider/fn.mouse_interaction.html
@@ -1,4 +1,4 @@
-mouse_interaction in iced_widget::slider - Rust Function iced_widget::slider::mouse_interaction
source · pub fn mouse_interaction(
+mouse_interaction in iced_widget::slider - Rust Function iced_widget::slider::mouse_interaction
source · pub fn mouse_interaction(
layout: Layout<'_>,
cursor: Cursor,
state: &State
diff --git a/iced_widget/slider/fn.update.html b/iced_widget/slider/fn.update.html
index 8578672f80f..1433ed4e4ab 100644
--- a/iced_widget/slider/fn.update.html
+++ b/iced_widget/slider/fn.update.html
@@ -1,12 +1,14 @@
-update in iced_widget::slider - Rust Function iced_widget::slider::update
source · pub fn update<Message, T>(
+update in iced_widget::slider - Rust Function iced_widget::slider::update
source · pub fn update<Message, T>(
event: Event,
layout: Layout<'_>,
cursor: Cursor,
shell: &mut Shell<'_, Message>,
state: &mut State,
value: &mut T,
+ default: Option<T>,
range: &RangeInclusive<T>,
step: T,
+ shift_step: Option<T>,
on_change: &dyn Fn(T) -> Message,
on_release: &Option<Message>
) -> Statuswhere
diff --git a/iced_widget/slider/index.html b/iced_widget/slider/index.html
index 95f53a3031b..370d46f5117 100644
--- a/iced_widget/slider/index.html
+++ b/iced_widget/slider/index.html
@@ -1,4 +1,4 @@
-iced_widget::slider - Rust Module iced_widget::slider
source · Expand description
Display an interactive selector of a single value from a range of values.
+iced_widget::slider - Rust Module iced_widget::slider
source · Expand description
Structs
- The appearance of a slider.
- The appearance of the handle of a slider.
- The appearance of a slider rail
- An horizontal bar and a handle that selects a single value from a range of
values.
- The local state of a
Slider
.
Enums
- The shape of the handle of a slider.
Traits
- A set of rules that dictate the style of a slider.
Functions
- Draws a
Slider
. - Computes the current
mouse::Interaction
of a Slider
. - Processes an
Event
and updates the State
of a Slider
diff --git a/iced_widget/slider/struct.Slider.html b/iced_widget/slider/struct.Slider.html
index 3b93d136ec3..f60124242f7 100644
--- a/iced_widget/slider/struct.Slider.html
+++ b/iced_widget/slider/struct.Slider.html
@@ -1,4 +1,4 @@
-Slider in iced_widget::slider - Rust Struct iced_widget::slider::Slider
source · pub struct Slider<'a, T, Message, Theme = Theme>where
+Slider in iced_widget::slider - Rust Struct iced_widget::slider::Slider
source · pub struct Slider<'a, T, Message, Theme = Theme>where
Theme: StyleSheet,{ /* private fields */ }
Implementations§
Implementations§
source§impl<'a, T, Message, Theme> Slider<'a, T, Message, Theme>
sourcepub const DEFAULT_HEIGHT: f32 = 22f32
The default height of a Slider
.
-sourcepub fn new<F>(range: RangeInclusive<T>, value: T, on_change: F) -> Selfwhere
+ Theme: StyleSheet,
sourcepub const DEFAULT_HEIGHT: f32 = 22f32
The default height of a Slider
.
+sourcepub fn new<F>(range: RangeInclusive<T>, value: T, on_change: F) -> Selfwhere
F: 'a + Fn(T) -> Message,
sourcepub fn on_release(self, on_release: Message) -> Self
Sets the release message of the Slider
.
+
sourcepub fn on_release(self, on_release: Message) -> Self
Sets the release message of the Slider
.
This is called when the mouse is released from the slider.
Typically, the user’s interaction with the slider is finished when this message is produced.
This is useful if you need to spawn a long-running task from the slider’s result, where
the default on_change message could create too many events.
-Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<Slider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
+
sourcepub fn shift_step(self, shift_step: impl Into<T>) -> Self
Sets the optional “shift” step for the Slider
.
+If set, this value is used as the step while the shift key is pressed.
+Trait Implementations§
source§impl<'a, T, Message, Theme, Renderer> From<Slider<'a, T, Message, Theme>> for Element<'a, Message, Theme, Renderer>where
T: Copy + Into<f64> + FromPrimitive + 'a,
Message: Clone + 'a,
Theme: StyleSheet + 'a,
- Renderer: Renderer + 'a,
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for Slider<'a, T, Message, Theme>where
+) -> Element<'a, Message, Theme, Renderer>Converts to this type from the input type.
source§impl<'a, T, Message, Theme, Renderer> Widget<Message, Theme, Renderer> for Slider<'a, T, Message, Theme>
source§fn on_event(
&mut self,
tree: &mut Tree,
event: Event,
@@ -62,7 +66,7 @@ Example
_clipboard: &mut dyn Clipboard,
shell: &mut Shell<'_, Message>,
_viewport: &Rectangle
-) -> Status
source§fn draw(
&self,
tree: &Tree,
renderer: &mut Renderer,
@@ -71,7 +75,7 @@ Example
layout: Layout<'_>,
cursor: Cursor,
_viewport: &Rectangle
-)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
+)
Draws the Widget
using the associated Renderer
.source§fn mouse_interaction(
&self,
tree: &Tree,
layout: Layout<'_>,
diff --git a/iced_widget/slider/struct.State.html b/iced_widget/slider/struct.State.html
index 817ef486897..e724b95e693 100644
--- a/iced_widget/slider/struct.State.html
+++ b/iced_widget/slider/struct.State.html
@@ -1,8 +1,8 @@
-State in iced_widget::slider - Rust Struct iced_widget::slider::State
source · pub struct State { /* private fields */ }
Expand description
The local state of a Slider
.
-Implementations§
Trait Implementations§
source§impl PartialEq for State
source§fn eq(&self, other: &State) -> bool
This method tests for self
and other
values to be equal, and is used
+State in iced_widget::slider - Rust Struct iced_widget::slider::State
source · pub struct State { /* private fields */ }
Expand description
The local state of a Slider
.
+Implementations§
Trait Implementations§
source§impl PartialEq for State
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
diff --git a/iced_widget/vertical_slider/fn.draw.html b/iced_widget/vertical_slider/fn.draw.html
index 73814e5f458..50b9733223f 100644
--- a/iced_widget/vertical_slider/fn.draw.html
+++ b/iced_widget/vertical_slider/fn.draw.html
@@ -1,4 +1,4 @@
-draw in iced_widget::vertical_slider - Rust Function iced_widget::vertical_slider::draw
source · pub fn draw<T, Theme, Renderer>(
+draw in iced_widget::vertical_slider - Rust Function iced_widget::vertical_slider::draw
source · pub fn draw<T, Theme, Renderer>(
renderer: &mut Renderer,
layout: Layout<'_>,
cursor: Cursor,
diff --git a/iced_widget/vertical_slider/fn.mouse_interaction.html b/iced_widget/vertical_slider/fn.mouse_interaction.html
index 54f9bf83b54..3ec4df2e4e0 100644
--- a/iced_widget/vertical_slider/fn.mouse_interaction.html
+++ b/iced_widget/vertical_slider/fn.mouse_interaction.html
@@ -1,4 +1,4 @@
-mouse_interaction in iced_widget::vertical_slider - Rust Function iced_widget::vertical_slider::mouse_interaction
source · pub fn mouse_interaction(
+mouse_interaction in iced_widget::vertical_slider - Rust Function iced_widget::vertical_slider::mouse_interaction
source · pub fn mouse_interaction(
layout: Layout<'_>,
cursor: Cursor,
state: &State
diff --git a/iced_widget/vertical_slider/fn.update.html b/iced_widget/vertical_slider/fn.update.html
index 9ef5336fd61..7734581f9d2 100644
--- a/iced_widget/vertical_slider/fn.update.html
+++ b/iced_widget/vertical_slider/fn.update.html
@@ -1,12 +1,14 @@
-update in iced_widget::vertical_slider - Rust Function iced_widget::vertical_slider::update
source · pub fn update<Message, T>(
+update in iced_widget::vertical_slider - Rust Function iced_widget::vertical_slider::update
source · pub fn update<Message, T>(
event: Event,
layout: Layout<'_>,
cursor: Cursor,
shell: &mut Shell<'_, Message>,
state: &mut State,
value: &mut T,
+ default: Option<T>,
range: &RangeInclusive<T>,
step: T,
+ shift_step: Option<T>,
on_change: &dyn Fn(T) -> Message,
on_release: &Option<Message>
) -> Statuswhere
diff --git a/iced_widget/vertical_slider/index.html b/iced_widget/vertical_slider/index.html
index d334cf1b64e..d549fc08745 100644
--- a/iced_widget/vertical_slider/index.html
+++ b/iced_widget/vertical_slider/index.html
@@ -1,4 +1,4 @@
-iced_widget::vertical_slider - Rust Module iced_widget::vertical_slider
source · Expand description
Display an interactive selector of a single value from a range of values.
+iced_widget::vertical_slider - Rust Module iced_widget::vertical_slider
source · Expand description
Display an interactive selector of a single value from a range of values.
A VerticalSlider
has some local State
.
Structs
- The appearance of a slider.
- The appearance of the handle of a slider.
- The local state of a
VerticalSlider
. - 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.
Traits
- A set of rules that dictate the style of a slider.
Functions
- Draws a
VerticalSlider
. - Computes the current
mouse::Interaction
of a VerticalSlider
. - Processes an
Event
and updates the State
of a VerticalSlider
diff --git a/iced_widget/vertical_slider/struct.State.html b/iced_widget/vertical_slider/struct.State.html
index 320c4a146cd..c51960bb149 100644
--- a/iced_widget/vertical_slider/struct.State.html
+++ b/iced_widget/vertical_slider/struct.State.html
@@ -1,8 +1,8 @@
-State in iced_widget::vertical_slider - Rust Struct iced_widget::vertical_slider::State
source · pub struct State { /* private fields */ }
Expand description
The local state of a VerticalSlider
.
-Implementations§
Trait Implementations§
source§impl PartialEq for State
source§fn eq(&self, other: &State) -> bool
This method tests for self
and other
values to be equal, and is used
+State in iced_widget::vertical_slider - Rust Struct iced_widget::vertical_slider::State
source · pub struct State { /* private fields */ }
Expand description
The local state of a VerticalSlider
.
+Implementations§
Trait Implementations§
source§impl PartialEq for State
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl Copy for State
source§impl Eq for State
source§impl StructuralEq for State
source§impl StructuralPartialEq for State
Auto Trait Implementations§
§impl RefUnwindSafe for State
§impl Send for State
§impl Sync for State
§impl Unpin for State
§impl UnwindSafe for State
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: Real + Zero + Arithmetics + Clone,
Swp: WhitePoint<T>,
Dwp: WhitePoint<T>,
diff --git a/iced_widget/vertical_slider/struct.VerticalSlider.html b/iced_widget/vertical_slider/struct.VerticalSlider.html
index 0835d5c74e9..1d65410a4fb 100644
--- a/iced_widget/vertical_slider/struct.VerticalSlider.html
+++ b/iced_widget/vertical_slider/struct.VerticalSlider.html
@@ -1,4 +1,4 @@
-VerticalSlider in iced_widget::vertical_slider - Rust Struct iced_widget::vertical_slider::VerticalSlider
source · pub struct VerticalSlider<'a, T, Message, Theme = Theme>where
+VerticalSlider in iced_widget::vertical_slider - Rust Struct iced_widget::vertical_slider::VerticalSlider
source · pub struct VerticalSlider<'a, T, Message, Theme = Theme>where
Theme: StyleSheet,{ /* private fields */ }
Expand description
An vertical bar and a handle that selects a single value from a range of
values.
A VerticalSlider
will try to fill the vertical space of its container.
@@ -13,11 +13,11 @@ Example
let value = 50.0;
VerticalSlider::new(0.0..=100.0, value, Message::SliderChanged);
-Implementations§
source§impl<'a, T, Message, Theme> VerticalSlider<'a, T, Message, Theme>where
+
Implementations§
source§impl<'a, T, Message, Theme> VerticalSlider<'a, T, Message, Theme>
sourcepub const DEFAULT_WIDTH: f32 = 22f32
The default width of a VerticalSlider
.
-sourcepub fn new<F>(range: RangeInclusive<T>, value: T, on_change: F) -> Selfwhere
+ Theme: StyleSheet,
sourcepub const DEFAULT_WIDTH: f32 = 22f32
The default width of a VerticalSlider
.
+sourcepub fn new<F>(range: RangeInclusive<T>, value: T, on_change: F) -> Selfwhere
F: 'a +