Fix broken documentation links

This commit is contained in:
Héctor Ramón Jiménez 2022-11-10 00:10:53 +01:00
parent ff9395838b
commit 1480ab2030
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
20 changed files with 38 additions and 61 deletions

View file

@ -11,7 +11,7 @@ use crate::layout;
use crate::mouse;
use crate::renderer;
use crate::widget;
use crate::widget::tree::{self, Tree};
use crate::widget::Tree;
use crate::{Clipboard, Layout, Point, Rectangle, Shell, Size};
/// An interactive component that can be displayed on top of other widgets.
@ -42,29 +42,7 @@ where
cursor_position: Point,
);
/// Returns the [`Tag`] of the [`Widget`].
///
/// [`Tag`]: tree::Tag
fn tag(&self) -> tree::Tag {
tree::Tag::stateless()
}
/// Returns the [`State`] of the [`Widget`].
///
/// [`State`]: tree::State
fn state(&self) -> tree::State {
tree::State::None
}
/// Returns the state [`Tree`] of the children of the [`Widget`].
fn children(&self) -> Vec<Tree> {
Vec::new()
}
/// Reconciliates the [`Widget`] with the provided [`Tree`].
fn diff(&self, _tree: &mut Tree) {}
/// Applies an [`Operation`] to the [`Widget`].
/// Applies a [`widget::Operation`] to the [`Overlay`].
fn operate(
&self,
_layout: Layout<'_>,

View file

@ -104,7 +104,7 @@ where
.draw(renderer, theme, style, layout, cursor_position)
}
/// Applies an [`Operation`] to the [`Element`].
/// Applies a [`widget::Operation`] to the [`Element`].
pub fn operate(
&self,
layout: Layout<'_>,

View file

@ -9,7 +9,7 @@ use crate::text::{self, Text};
use crate::touch;
use crate::widget::container::{self, Container};
use crate::widget::scrollable::{self, Scrollable};
use crate::widget::tree::{self, Tree};
use crate::widget::Tree;
use crate::{
Clipboard, Color, Element, Layout, Length, Padding, Point, Rectangle,
Shell, Size, Vector, Widget,
@ -199,18 +199,6 @@ where
Renderer: text::Renderer,
Renderer::Theme: StyleSheet + container::StyleSheet,
{
fn tag(&self) -> tree::Tag {
self.container.tag()
}
fn state(&self) -> tree::State {
self.container.state()
}
fn children(&self) -> Vec<Tree> {
self.container.children()
}
fn layout(
&self,
renderer: &Renderer,

View file

@ -309,7 +309,7 @@ pub fn layout<Renderer>(
layout::Node::with_children(size.pad(padding), vec![content])
}
/// Draws the background of a [`Container`] given its [`Style`] and its `bounds`.
/// Draws the background of a [`Container`] given its [`Appearance`] and its `bounds`.
pub fn draw_background<Renderer>(
renderer: &mut Renderer,
appearance: &Appearance,

View file

@ -19,7 +19,7 @@ macro_rules! column {
);
}
/// Creates a [Row`] with the given children.
/// Creates a [`Row`] with the given children.
///
/// [`Row`]: widget::Row
#[macro_export]

View file

@ -87,7 +87,7 @@ where
/// Draws the [`Content`] with the provided [`Renderer`] and [`Layout`].
///
/// [`Renderer`]: iced_native::Renderer
/// [`Renderer`]: crate::Renderer
pub fn draw(
&self,
tree: &Tree,

View file

@ -32,7 +32,9 @@ pub struct State<T> {
/// [`PaneGrid`]: crate::widget::PaneGrid
pub internal: Internal,
/// The maximized [`Pane`] of the [`PaneGrid`]
/// The maximized [`Pane`] of the [`PaneGrid`].
///
/// [`PaneGrid`]: crate::widget::PaneGrid
pub(super) maximized: Option<Pane>,
}

View file

@ -114,7 +114,7 @@ where
/// Draws the [`TitleBar`] with the provided [`Renderer`] and [`Layout`].
///
/// [`Renderer`]: iced_native::Renderer
/// [`Renderer`]: crate::Renderer
pub fn draw(
&self,
tree: &Tree,

View file

@ -74,7 +74,7 @@ where
self
}
/// Sets the [`Color`] of the [`Text`].
/// Sets the style of the [`Text`].
pub fn style(
mut self,
style: impl Into<<Renderer::Theme as StyleSheet>::Style>,

View file

@ -165,7 +165,7 @@ where
}
/// Draws the [`TextInput`] with the given [`Renderer`], overriding its
/// [`text_input::Value`] if provided.
/// [`Value`] if provided.
///
/// [`Renderer`]: text::Renderer
pub fn draw(

View file

@ -30,7 +30,7 @@ impl Tree {
}
}
/// Creates a new [`Tree`] for the provided [`Element`].
/// Creates a new [`Tree`] for the provided [`Widget`].
pub fn new<'a, Message, Renderer>(
widget: impl Borrow<dyn Widget<Message, Renderer> + 'a>,
) -> Self
@ -46,10 +46,10 @@ impl Tree {
}
}
/// Reconciliates the current tree with the provided [`Element`].
/// Reconciliates the current tree with the provided [`Widget`].
///
/// If the tag of the [`Element`] matches the tag of the [`Tree`], then the
/// [`Element`] proceeds with the reconciliation (i.e. [`Widget::diff`] is called).
/// If the tag of the [`Widget`] matches the tag of the [`Tree`], then the
/// [`Widget`] proceeds with the reconciliation (i.e. [`Widget::diff`] is called).
///
/// Otherwise, the whole [`Tree`] is recreated.
///
@ -67,7 +67,7 @@ impl Tree {
}
}
/// Reconciliates the children of the tree with the provided list of [`Element`].
/// Reconciliates the children of the tree with the provided list of widgets.
pub fn diff_children<'a, Message, Renderer>(
&mut self,
new_children: &[impl Borrow<dyn Widget<Message, Renderer> + 'a>],
@ -81,7 +81,7 @@ impl Tree {
)
}
/// Reconciliates the children of the tree with the provided list of [`Element`] using custom
/// Reconciliates the children of the tree with the provided list of widgets using custom
/// logic both for diffing and creating new widget state.
pub fn diff_children_custom<T>(
&mut self,