summaryrefslogtreecommitdiffstats
path: root/pure
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-04-30 14:20:52 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-04-30 14:20:52 +0200
commit68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c (patch)
treeb60c4f355d956e9d5eafc0047dfda77b7433bf0e /pure
parentac35fe3edf78c1674fe85b37549002e006b0ff13 (diff)
downloadiced-68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c.tar.gz
iced-68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c.tar.bz2
iced-68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c.zip
Fix broken intra-doc links in documentation
Diffstat (limited to 'pure')
-rw-r--r--pure/src/helpers.rs10
-rw-r--r--pure/src/widget/pane_grid/content.rs2
-rw-r--r--pure/src/widget/pane_grid/title_bar.rs2
-rw-r--r--pure/src/widget/pick_list.rs5
-rw-r--r--pure/src/widget/slider.rs7
-rw-r--r--pure/src/widget/text_input.rs18
6 files changed, 21 insertions, 23 deletions
diff --git a/pure/src/helpers.rs b/pure/src/helpers.rs
index 2ddab3ae..d6744262 100644
--- a/pure/src/helpers.rs
+++ b/pure/src/helpers.rs
@@ -142,11 +142,15 @@ pub fn vertical_space(height: Length) -> widget::Space {
}
/// Creates a horizontal [`Rule`] with the given height.
+///
+/// [`Rule`]: widget::Rule
pub fn horizontal_rule<'a>(height: u16) -> widget::Rule<'a> {
widget::Rule::horizontal(height)
}
/// Creates a vertical [`Rule`] with the given width.
+///
+/// [`Rule`]: widget::Rule
pub fn vertical_rule<'a>(width: u16) -> widget::Rule<'a> {
widget::Rule::horizontal(width)
}
@@ -154,8 +158,10 @@ pub fn vertical_rule<'a>(width: u16) -> widget::Rule<'a> {
/// Creates a new [`ProgressBar`].
///
/// It expects:
-/// * an inclusive range of possible values
-/// * the current value of the [`ProgressBar`]
+/// * an inclusive range of possible values, and
+/// * the current value of the [`ProgressBar`].
+///
+/// [`ProgressBar`]: widget::ProgressBar
pub fn progress_bar<'a>(
range: RangeInclusive<f32>,
value: f32,
diff --git a/pure/src/widget/pane_grid/content.rs b/pure/src/widget/pane_grid/content.rs
index a928b28c..6388b016 100644
--- a/pure/src/widget/pane_grid/content.rs
+++ b/pure/src/widget/pane_grid/content.rs
@@ -84,7 +84,7 @@ where
/// Draws the [`Content`] with the provided [`Renderer`] and [`Layout`].
///
- /// [`Renderer`]: crate::widget::pane_grid::Renderer
+ /// [`Renderer`]: iced_native::Renderer
pub fn draw(
&self,
tree: &Tree,
diff --git a/pure/src/widget/pane_grid/title_bar.rs b/pure/src/widget/pane_grid/title_bar.rs
index dd68b073..567db913 100644
--- a/pure/src/widget/pane_grid/title_bar.rs
+++ b/pure/src/widget/pane_grid/title_bar.rs
@@ -108,7 +108,7 @@ where
/// Draws the [`TitleBar`] with the provided [`Renderer`] and [`Layout`].
///
- /// [`Renderer`]: crate::widget::pane_grid::Renderer
+ /// [`Renderer`]: iced_native::Renderer
pub fn draw(
&self,
tree: &Tree,
diff --git a/pure/src/widget/pick_list.rs b/pure/src/widget/pick_list.rs
index 45bb289e..255e3681 100644
--- a/pure/src/widget/pick_list.rs
+++ b/pure/src/widget/pick_list.rs
@@ -43,9 +43,8 @@ where
/// The default padding of a [`PickList`].
pub const DEFAULT_PADDING: Padding = Padding::new(5);
- /// Creates a new [`PickList`] with the given [`State`], a list of options,
- /// the current selected value, and the message to produce when an option is
- /// selected.
+ /// Creates a new [`PickList`] with the given list of options, the current
+ /// selected value, and the message to produce when an option is selected.
pub fn new(
options: impl Into<Cow<'a, [T]>>,
selected: Option<T>,
diff --git a/pure/src/widget/slider.rs b/pure/src/widget/slider.rs
index 1107bdc1..4d8bbce4 100644
--- a/pure/src/widget/slider.rs
+++ b/pure/src/widget/slider.rs
@@ -1,6 +1,4 @@
//! Display an interactive selector of a single value from a range of values.
-//!
-//! A [`Slider`] has some local [`State`].
use crate::widget::tree::{self, Tree};
use crate::{Element, Widget};
@@ -25,17 +23,16 @@ pub use iced_style::slider::{Handle, HandleShape, Style, StyleSheet};
///
/// # Example
/// ```
-/// # use iced_native::widget::slider::{self, Slider};
+/// # use iced_pure::widget::Slider;
/// #
/// #[derive(Clone)]
/// pub enum Message {
/// SliderChanged(f32),
/// }
///
-/// let state = &mut slider::State::new();
/// let value = 50.0;
///
-/// Slider::new(state, 0.0..=100.0, value, Message::SliderChanged);
+/// Slider::new(0.0..=100.0, value, Message::SliderChanged);
/// ```
///
/// ![Slider drawn by Coffee's renderer](https://github.com/hecrj/coffee/blob/bda9818f823dfcb8a7ad0ff4940b4d4b387b5208/images/ui/slider.png?raw=true)
diff --git a/pure/src/widget/text_input.rs b/pure/src/widget/text_input.rs
index d6041d7f..11e93b44 100644
--- a/pure/src/widget/text_input.rs
+++ b/pure/src/widget/text_input.rs
@@ -16,19 +16,17 @@ pub use iced_style::text_input::{Style, StyleSheet};
/// # Example
/// ```
/// # use iced_native::renderer::Null;
-/// # use iced_native::widget::text_input;
+/// # use iced_pure::widget::text_input;
/// #
-/// # pub type TextInput<'a, Message> = iced_native::widget::TextInput<'a, Message, Null>;
+/// # pub type TextInput<'a, Message> = iced_pure::widget::TextInput<'a, Message, Null>;
/// #[derive(Debug, Clone)]
/// enum Message {
/// TextInputChanged(String),
/// }
///
-/// let mut state = text_input::State::new();
/// let value = "Some text";
///
/// let input = TextInput::new(
-/// &mut state,
/// "This is the placeholder...",
/// value,
/// Message::TextInputChanged,
@@ -58,10 +56,9 @@ where
/// Creates a new [`TextInput`].
///
/// It expects:
- /// - some [`State`]
- /// - a placeholder
- /// - the current value
- /// - a function that produces a message when the [`TextInput`] changes
+ /// - a placeholder,
+ /// - the current value, and
+ /// - a function that produces a message when the [`TextInput`] changes.
pub fn new<F>(placeholder: &str, value: &str, on_change: F) -> Self
where
F: 'a + Fn(String) -> Message,
@@ -86,10 +83,9 @@ where
self
}
- /// Sets the [`Font`] of the [`Text`].
+ /// Sets the [`Font`] of the [`TextInput`].
///
- /// [`Font`]: crate::widget::text::Renderer::Font
- /// [`Text`]: crate::widget::Text
+ /// [`Font`]: iced_native::text::Renderer::Font
pub fn font(mut self, font: Renderer::Font) -> Self {
self.font = font;
self