fix: docs
This commit is contained in:
parent
51b370ef48
commit
16f14793c7
9 changed files with 30 additions and 122 deletions
|
|
@ -268,14 +268,14 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the name of the [`Button`].
|
||||
/// Sets the name of the [`Checkbox`].
|
||||
pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.name = Some(name.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Checkbox`].
|
||||
pub fn description_widget<T: iced_accessibility::Describes>(
|
||||
mut self,
|
||||
description: &T,
|
||||
|
|
@ -287,7 +287,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Checkbox`].
|
||||
pub fn description(mut self, description: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.description =
|
||||
Some(iced_accessibility::Description::Text(description.into()));
|
||||
|
|
|
|||
|
|
@ -200,14 +200,14 @@ impl<'a, Handle> Image<'a, Handle> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the name of the [`Button`].
|
||||
/// Sets the name of the [`Image`].
|
||||
pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.name = Some(name.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Image`].
|
||||
pub fn description_widget<T: iced_accessibility::Describes>(
|
||||
mut self,
|
||||
description: &T,
|
||||
|
|
@ -219,7 +219,7 @@ impl<'a, Handle> Image<'a, Handle> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Image`].
|
||||
pub fn description(mut self, description: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.description =
|
||||
Some(iced_accessibility::Description::Text(description.into()));
|
||||
|
|
@ -227,7 +227,7 @@ impl<'a, Handle> Image<'a, Handle> {
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the label of the [`Button`].
|
||||
/// Sets the label of the [`Image`].
|
||||
pub fn label(mut self, label: &dyn iced_accessibility::Labels) -> Self {
|
||||
self.label =
|
||||
Some(label.label().into_iter().map(|l| l.into()).collect());
|
||||
|
|
|
|||
|
|
@ -276,14 +276,14 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the name of the [`Button`].
|
||||
/// Sets the name of the [`Scrollable`].
|
||||
pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.name = Some(name.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Scrollable`].
|
||||
pub fn description_widget(
|
||||
mut self,
|
||||
description: &impl iced_accessibility::Describes,
|
||||
|
|
@ -295,7 +295,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Scrollable`].
|
||||
pub fn description(mut self, description: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.description =
|
||||
Some(iced_accessibility::Description::Text(description.into()));
|
||||
|
|
@ -303,7 +303,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the label of the [`Button`].
|
||||
/// Sets the label of the [`Scrollable`].
|
||||
pub fn label(mut self, label: &dyn iced_accessibility::Labels) -> Self {
|
||||
self.label =
|
||||
Some(label.label().into_iter().map(|l| l.into()).collect());
|
||||
|
|
|
|||
|
|
@ -240,14 +240,14 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the name of the [`Button`].
|
||||
/// Sets the name of the [`Slider`].
|
||||
pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.name = Some(name.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Slider`].
|
||||
pub fn description_widget(
|
||||
mut self,
|
||||
description: &impl iced_accessibility::Describes,
|
||||
|
|
@ -259,7 +259,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Slider`].
|
||||
pub fn description(mut self, description: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.description =
|
||||
Some(iced_accessibility::Description::Text(description.into()));
|
||||
|
|
@ -267,7 +267,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the label of the [`Button`].
|
||||
/// Sets the label of the [`Slider`].
|
||||
pub fn label(mut self, label: &dyn iced_accessibility::Labels) -> Self {
|
||||
self.label =
|
||||
Some(label.label().into_iter().map(|l| l.into()).collect());
|
||||
|
|
|
|||
|
|
@ -179,14 +179,14 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the name of the [`Button`].
|
||||
/// Sets the name of the [`Svg`].
|
||||
pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.name = Some(name.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Svg`].
|
||||
pub fn description_widget<T: iced_accessibility::Describes>(
|
||||
mut self,
|
||||
description: &T,
|
||||
|
|
@ -198,7 +198,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Svg`].
|
||||
pub fn description(mut self, description: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.description =
|
||||
Some(iced_accessibility::Description::Text(description.into()));
|
||||
|
|
@ -206,7 +206,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the label of the [`Button`].
|
||||
/// Sets the label of the [`Svg`].
|
||||
pub fn label(mut self, label: &dyn iced_accessibility::Labels) -> Self {
|
||||
self.label =
|
||||
Some(label.label().into_iter().map(|l| l.into()).collect());
|
||||
|
|
|
|||
|
|
@ -270,14 +270,14 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the name of the [`Button`].
|
||||
/// Sets the name of the [`Toggler`].
|
||||
pub fn name(mut self, name: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.name = Some(name.into());
|
||||
self
|
||||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Toggler`].
|
||||
pub fn description_widget<T: iced_accessibility::Describes>(
|
||||
mut self,
|
||||
description: &T,
|
||||
|
|
@ -289,7 +289,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the description of the [`Button`].
|
||||
/// Sets the description of the [`Toggler`].
|
||||
pub fn description(mut self, description: impl Into<Cow<'a, str>>) -> Self {
|
||||
self.description =
|
||||
Some(iced_accessibility::Description::Text(description.into()));
|
||||
|
|
@ -297,7 +297,7 @@ where
|
|||
}
|
||||
|
||||
#[cfg(feature = "a11y")]
|
||||
/// Sets the label of the [`Button`] using another widget.
|
||||
/// Sets the label of the [`Toggler`] using another widget.
|
||||
pub fn labeled_by_widget(
|
||||
mut self,
|
||||
label: &dyn iced_accessibility::Labels,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue