Fix doc links

This commit is contained in:
Jeremy Soller 2024-10-18 17:42:35 -06:00 • committed by Ashley Wulber
parent 35cf63b323
commit 51b370ef48
No known key found for this signature in database
GPG key ID: 5216D4F46A90A820
6 changed files with 17 additions and 14 deletions

View file

@ -10,6 +10,7 @@ pub use nested::Nested;
use crate::layout; use crate::layout;
use crate::mouse; use crate::mouse;
use crate::renderer; use crate::renderer;
use crate::widget::Operation;
use crate::widget::Tree; use crate::widget::Tree;
use crate::{Clipboard, Event, Layout, Rectangle, Shell, Size, Vector}; use crate::{Clipboard, Event, Layout, Rectangle, Shell, Size, Vector};
@ -41,7 +42,7 @@ where
&mut self, &mut self,
_layout: Layout<'_>, _layout: Layout<'_>,
_renderer: &Renderer, _renderer: &Renderer,
_operation: &mut dyn crate::widget::Operation, _operation: &mut dyn Operation,
) { ) {
} }

View file

@ -28,6 +28,7 @@ pub use task::Task;
pub use user_interface::UserInterface; pub use user_interface::UserInterface;
pub use window::Window; pub use window::Window;
use crate::core::Color;
use crate::futures::futures::channel::oneshot; use crate::futures::futures::channel::oneshot;
use std::borrow::Cow; use std::borrow::Cow;
@ -143,13 +144,13 @@ pub fn exit<T>() -> Task<T> {
#[derive(Debug, Clone, Copy, PartialEq)] #[derive(Debug, Clone, Copy, PartialEq)]
pub struct Appearance { pub struct Appearance {
/// The background [`Color`] of the application. /// The background [`Color`] of the application.
pub background_color: iced_core::Color, pub background_color: Color,
/// The default text [`Color`] of the application. /// The default text [`Color`] of the application.
pub text_color: iced_core::Color, pub text_color: Color,
/// The default icon [`Color`] of the application. /// The default icon [`Color`] of the application.
pub icon_color: iced_core::Color, pub icon_color: Color,
} }
/// The default style of a [`Program`]. /// The default style of a [`Program`].
@ -164,7 +165,7 @@ impl DefaultStyle for iced_core::Theme {
} }
} }
/// The default [`Appearance`] of a [`Program`] with the built-in [`Theme`]. /// The default [`Appearance`] of a [`Program`] with the built-in [`iced_core::Theme`].
pub fn default(theme: &iced_core::Theme) -> Appearance { pub fn default(theme: &iced_core::Theme) -> Appearance {
let palette = theme.extended_palette(); let palette = theme.extended_palette();

View file

@ -972,7 +972,7 @@ fn disabled(style: Style) -> Style {
} }
} }
/// Produces a [`Command`] that focuses the [`Button`] with the given [`Id`]. /// Produces a [`Task`] that focuses the [`Button`] with the given [`Id`].
pub fn focus<Message: 'static + Send>(id: Id) -> Task<Message> { pub fn focus<Message: 'static + Send>(id: Id) -> Task<Message> {
task::widget(operation::focusable::focus(id)) task::widget(operation::focusable::focus(id))
} }

View file

@ -113,7 +113,7 @@ where
self self
} }
/// Sets the [`text::Wrap`] mode of the [`Menu`]. /// Sets the [`text::Wrapping`] mode of the [`Menu`].
pub fn text_wrap(mut self, wrap: text::Wrapping) -> Self { pub fn text_wrap(mut self, wrap: text::Wrapping) -> Self {
self.text_wrap = wrap; self.text_wrap = wrap;
self self

View file

@ -263,7 +263,7 @@ where
self self
} }
/// Sets the [`text::Wrap`] mode of the [`PickList`]. /// Sets the [`text::Wrapping`] mode of the [`PickList`].
pub fn text_wrap(mut self, wrap: text::Wrapping) -> Self { pub fn text_wrap(mut self, wrap: text::Wrapping) -> Self {
self.text_wrap = wrap; self.text_wrap = wrap;
self self

View file

@ -87,8 +87,9 @@ pub enum IcedSctkEvent {
/// ///
/// This event type is useful as a place to put code that should be done before you start /// This event type is useful as a place to put code that should be done before you start
/// processing events, such as updating frame timing information for benchmarking or checking /// processing events, such as updating frame timing information for benchmarking or checking
/// the [`StartCause`][crate::event::StartCause] to see if a timer set by /// the [`StartCause`] to see if a timer set by
/// [`ControlFlow::WaitUntil`](crate::platform_specific::wayland::event_loop::ControlFlow::WaitUntil) has elapsed. /// [`ControlFlow::WaitUntil`](crate::platform_specific::wayland::event_loop::control_flow::ControlFlow::WaitUntil)
/// has elapsed.
NewEvents(StartCause), NewEvents(StartCause),
/// An event produced by sctk /// An event produced by sctk
@ -101,7 +102,7 @@ pub enum IcedSctkEvent {
/// state-changing events have been handled and you want to do stuff (updating state, performing /// state-changing events have been handled and you want to do stuff (updating state, performing
/// calculations, etc) that happens as the "main body" of your event loop. If your program only draws /// calculations, etc) that happens as the "main body" of your event loop. If your program only draws
/// graphics when something changes, it's usually better to do it in response to /// graphics when something changes, it's usually better to do it in response to
/// [`Event::RedrawRequested`](crate::event::Event::RedrawRequested), which gets emitted /// [`window::RedrawRequest`], which gets emitted
/// immediately after this event. Programs that draw graphics continuously, like most games, /// immediately after this event. Programs that draw graphics continuously, like most games,
/// can render here unconditionally for simplicity. /// can render here unconditionally for simplicity.
MainEventsCleared, MainEventsCleared,
@ -111,7 +112,7 @@ pub enum IcedSctkEvent {
/// This gets triggered in two scenarios: /// This gets triggered in two scenarios:
/// - The OS has performed an operation that's invalidated the window's contents (such as /// - The OS has performed an operation that's invalidated the window's contents (such as
/// resizing the window). /// resizing the window).
/// - The application has explicitly requested a redraw via [`Window::request_redraw`]. /// - The application has explicitly requested a redraw via [`iced_runtime::core::Shell::request_redraw`].
/// ///
/// During each iteration of the event loop, Winit will aggregate duplicate redraw requests /// During each iteration of the event loop, Winit will aggregate duplicate redraw requests
/// into a single event, to help avoid duplicating rendering work. /// into a single event, to help avoid duplicating rendering work.
@ -330,7 +331,7 @@ pub enum StartCause {
/// moment the timeout was requested and the requested resume time. The actual resume time is /// moment the timeout was requested and the requested resume time. The actual resume time is
/// guaranteed to be equal to or after the requested resume time. /// guaranteed to be equal to or after the requested resume time.
/// ///
/// [`ControlFlow::WaitUntil`]: crate::platform_specific::wayland::event_loop::ControlFlow::WaitUntil /// [`ControlFlow::WaitUntil`]: crate::platform_specific::wayland::event_loop::control_flow::ControlFlow::WaitUntil
ResumeTimeReached { ResumeTimeReached {
start: Instant, start: Instant,
requested_resume: Instant, requested_resume: Instant,
@ -346,7 +347,7 @@ pub enum StartCause {
/// Sent if the event loop is being resumed after the loop's control flow was set to /// Sent if the event loop is being resumed after the loop's control flow was set to
/// [`ControlFlow::Poll`]. /// [`ControlFlow::Poll`].
/// ///
/// [`ControlFlow::Poll`]: crate::platform_specific::wayland::event_loop::ControlFlow::Poll /// [`ControlFlow::Poll`]: crate::platform_specific::wayland::event_loop::control_flow::ControlFlow::Poll
Poll, Poll,
/// Sent once, immediately after `run` is called. Indicates that the loop was just initialized. /// Sent once, immediately after `run` is called. Indicates that the loop was just initialized.