diff options
author | 2022-04-30 14:20:52 +0200 | |
---|---|---|
committer | 2022-04-30 14:20:52 +0200 | |
commit | 68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c (patch) | |
tree | b60c4f355d956e9d5eafc0047dfda77b7433bf0e | |
parent | ac35fe3edf78c1674fe85b37549002e006b0ff13 (diff) | |
download | iced-68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c.tar.gz iced-68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c.tar.bz2 iced-68e9eb0a9b45b86713ce5d0e9c2273a60f2cc11c.zip |
Fix broken intra-doc links in documentation
28 files changed, 96 insertions, 71 deletions
diff --git a/core/src/keyboard/modifiers.rs b/core/src/keyboard/modifiers.rs index e61f145a..ff5b08f2 100644 --- a/core/src/keyboard/modifiers.rs +++ b/core/src/keyboard/modifiers.rs @@ -41,21 +41,29 @@ impl Modifiers { }; /// Returns true if the [`SHIFT`] key is pressed in the [`Modifiers`]. + /// + /// [`SHIFT`]: Self::SHIFT pub fn shift(self) -> bool { self.contains(Self::SHIFT) } /// Returns true if the [`CTRL`] key is pressed in the [`Modifiers`]. + /// + /// [`CTRL`]: Self::CTRL pub fn control(self) -> bool { self.contains(Self::CTRL) } /// Returns true if the [`ALT`] key is pressed in the [`Modifiers`]. + /// + /// [`ALT`]: Self::ALT pub fn alt(self) -> bool { self.contains(Self::ALT) } /// Returns true if the [`LOGO`] key is pressed in the [`Modifiers`]. + /// + /// [`LOGO`]: Self::LOGO pub fn logo(self) -> bool { self.contains(Self::LOGO) } diff --git a/futures/src/command.rs b/futures/src/command.rs index d8adfe49..05c3a1d0 100644 --- a/futures/src/command.rs +++ b/futures/src/command.rs @@ -17,7 +17,7 @@ impl<T> Command<T> { Self(Internal::None) } - /// Creates a [`Command`] that performs a single [`Action`]. + /// Creates a [`Command`] that performs a single action. pub const fn single(action: T) -> Self { Self(Internal::Single(action)) } diff --git a/futures/src/runtime.rs b/futures/src/runtime.rs index 2034ed6c..34f6b6dd 100644 --- a/futures/src/runtime.rs +++ b/futures/src/runtime.rs @@ -9,6 +9,8 @@ use std::marker::PhantomData; /// /// If you have an [`Executor`], a [`Runtime`] can be leveraged to run any /// [`Command`] or [`Subscription`] and get notified of the results! +/// +/// [`Command`]: crate::Command #[derive(Debug)] pub struct Runtime<Hasher, Event, Executor, Sender, Message> { executor: Executor, @@ -51,10 +53,12 @@ where self.executor.enter(f) } - /// Spawns a [`Command`] in the [`Runtime`]. + /// Spawns a [`Future`] in the [`Runtime`]. /// /// The resulting `Message` will be forwarded to the `Sender` of the /// [`Runtime`]. + /// + /// [`Future`]: BoxFuture pub fn spawn(&mut self, future: BoxFuture<Message>) { use futures::{FutureExt, SinkExt}; diff --git a/graphics/src/widget/pure/canvas/program.rs b/graphics/src/widget/pure/canvas/program.rs index ee74c27f..058b364b 100644 --- a/graphics/src/widget/pure/canvas/program.rs +++ b/graphics/src/widget/pure/canvas/program.rs @@ -10,10 +10,10 @@ use crate::Rectangle; /// /// [`Canvas`]: crate::widget::Canvas pub trait Program<Message> { - /// The internal [`State`] mutated by the [`Program`]. + /// The internal state mutated by the [`Program`]. type State: Default + 'static; - /// Updates the state of the [`Program`]. + /// Updates the [`State`](Self::State) of the [`Program`]. /// /// When a [`Program`] is used in a [`Canvas`], the runtime will call this /// method for each [`Event`]. diff --git a/graphics/src/window/compositor.rs b/graphics/src/window/compositor.rs index 9ea040cd..04a87bc6 100644 --- a/graphics/src/window/compositor.rs +++ b/graphics/src/window/compositor.rs @@ -40,7 +40,8 @@ pub trait Compositor: Sized { /// Presents the [`Renderer`] primitives to the next frame of the given [`Surface`]. /// - /// [`SwapChain`]: Self::SwapChain + /// [`Renderer`]: Self::Renderer + /// [`Surface`]: Self::Surface fn present<T: AsRef<str>>( &mut self, renderer: &mut Self::Renderer, @@ -51,7 +52,7 @@ pub trait Compositor: Sized { ) -> Result<(), SurfaceError>; } -/// Result of an unsuccessful call to [`Compositor::draw`]. +/// Result of an unsuccessful call to [`Compositor::present`]. #[derive(Clone, PartialEq, Eq, Debug, Error)] pub enum SurfaceError { /// A timeout was encountered while trying to acquire the next frame. diff --git a/native/src/command/action.rs b/native/src/command/action.rs index 5c7509c8..cd4309ed 100644 --- a/native/src/command/action.rs +++ b/native/src/command/action.rs @@ -10,6 +10,8 @@ use std::fmt; /// [`Command`]: crate::Command pub enum Action<T> { /// Run a [`Future`] to completion. + /// + /// [`Future`]: iced_futures::BoxFuture Future(iced_futures::BoxFuture<T>), /// Run a clipboard action. @@ -21,6 +23,8 @@ pub enum Action<T> { impl<T> Action<T> { /// Applies a transformation to the result of a [`Command`]. + /// + /// [`Command`]: crate::Command pub fn map<A>( self, f: impl Fn(T) -> A + 'static + MaybeSend + Sync, diff --git a/native/src/image.rs b/native/src/image.rs index 43bba4f1..516eb2db 100644 --- a/native/src/image.rs +++ b/native/src/image.rs @@ -5,7 +5,7 @@ use std::hash::{Hash, Hasher as _}; use std::path::PathBuf; use std::sync::Arc; -/// An [`Image`] handle. +/// A handle of some image data. #[derive(Debug, Clone)] pub struct Handle { id: u64, @@ -79,7 +79,7 @@ impl Hash for Handle { } } -/// The data of an [`Image`]. +/// The data of a raster image. #[derive(Clone, Hash)] pub enum Data { /// File data diff --git a/native/src/overlay.rs b/native/src/overlay.rs index 124bcac2..86878f6a 100644 --- a/native/src/overlay.rs +++ b/native/src/overlay.rs @@ -63,7 +63,7 @@ where event::Status::Ignored } - /// Returns the current [`mouse::Interaction`] of the [`Widget`]. + /// Returns the current [`mouse::Interaction`] of the [`Overlay`]. /// /// By default, it returns [`mouse::Interaction::Idle`]. fn mouse_interaction( diff --git a/native/src/renderer.rs b/native/src/renderer.rs index ca7ad5a2..73d2f401 100644 --- a/native/src/renderer.rs +++ b/native/src/renderer.rs @@ -1,24 +1,4 @@ //! Write your own renderer. -//! -//! You will need to implement the `Renderer` trait first. It simply contains -//! an `Output` associated type. -//! -//! There is no common trait to draw all the widgets. Instead, every [`Widget`] -//! constrains its generic `Renderer` type as necessary. -//! -//! This approach is flexible and composable. For instance, the -//! [`Text`] widget only needs a [`text::Renderer`] while a [`Checkbox`] widget -//! needs both a [`text::Renderer`] and a [`checkbox::Renderer`], reusing logic. -//! -//! In the end, a __renderer__ satisfying all the constraints is -//! needed to build a [`UserInterface`]. -//! -//! [`Widget`]: crate::Widget -//! [`UserInterface`]: crate::UserInterface -//! [`Text`]: crate::widget::Text -//! [`text::Renderer`]: crate::widget::text::Renderer -//! [`Checkbox`]: crate::widget::Checkbox -//! [`checkbox::Renderer`]: crate::widget::checkbox::Renderer #[cfg(debug_assertions)] mod null; #[cfg(debug_assertions)] @@ -27,8 +7,7 @@ pub use null::Null; use crate::layout; use crate::{Background, Color, Element, Rectangle, Vector}; -/// A component that can take the state of a user interface and produce an -/// output for its users. +/// A component that can be used by widgets to draw themselves on a screen. pub trait Renderer: Sized { /// Lays out the elements of a user interface. /// diff --git a/native/src/svg.rs b/native/src/svg.rs index 90eff87e..f86fec5b 100644 --- a/native/src/svg.rs +++ b/native/src/svg.rs @@ -5,7 +5,7 @@ use std::hash::{Hash, Hasher as _}; use std::path::PathBuf; use std::sync::Arc; -/// An [`Svg`] handle. +/// A handle of Svg data. #[derive(Debug, Clone)] pub struct Handle { id: u64, @@ -55,7 +55,7 @@ impl Hash for Handle { } } -/// The data of an [`Svg`]. +/// The data of a vectorial image. #[derive(Clone, Hash)] pub enum Data { /// File data diff --git a/native/src/text.rs b/native/src/text.rs index 256a9c5a..6e28681d 100644 --- a/native/src/text.rs +++ b/native/src/text.rs @@ -39,7 +39,7 @@ pub enum Hit { } impl Hit { - /// Computes the cursor position corresponding to this [`HitTestResult`] . + /// Computes the cursor position of the [`Hit`] . pub fn cursor(self) -> usize { match self { Self::CharOffset(i) => i, diff --git a/native/src/user_interface.rs b/native/src/user_interface.rs index 85625e23..f80786aa 100644 --- a/native/src/user_interface.rs +++ b/native/src/user_interface.rs @@ -264,11 +264,10 @@ where /// Draws the [`UserInterface`] with the provided [`Renderer`]. /// - /// It returns the some [`Renderer::Output`]. You should update the icon of - /// the mouse cursor accordingly in your system. + /// It returns the current [`mouse::Interaction`]. You should update the + /// icon of the mouse cursor accordingly in your system. /// /// [`Renderer`]: crate::Renderer - /// [`Renderer::Output`]: crate::Renderer::Output /// /// # Example /// We can finally draw our [counter](index.html#usage) by diff --git a/native/src/widget/checkbox.rs b/native/src/widget/checkbox.rs index 122c5e52..b6d920df 100644 --- a/native/src/widget/checkbox.rs +++ b/native/src/widget/checkbox.rs @@ -102,7 +102,7 @@ impl<'a, Message, Renderer: text::Renderer> Checkbox<'a, Message, Renderer> { /// Sets the [`Font`] of the text of the [`Checkbox`]. /// - /// [`Font`]: crate::widget::text::Renderer::Font + /// [`Font`]: crate::text::Renderer::Font pub fn font(mut self, font: Renderer::Font) -> Self { self.font = font; self diff --git a/native/src/widget/pane_grid/configuration.rs b/native/src/widget/pane_grid/configuration.rs index 4c52bad4..7d68fb46 100644 --- a/native/src/widget/pane_grid/configuration.rs +++ b/native/src/widget/pane_grid/configuration.rs @@ -2,7 +2,7 @@ use crate::widget::pane_grid::Axis; /// The arrangement of a [`PaneGrid`]. /// -/// [`PaneGrid`]: crate::pane_grid::PaneGrid +/// [`PaneGrid`]: crate::widget::PaneGrid #[derive(Debug, Clone)] pub enum Configuration<T> { /// A split of the available space. @@ -21,6 +21,6 @@ pub enum Configuration<T> { }, /// A [`Pane`]. /// - /// [`Pane`]: crate::pane_grid::Pane + /// [`Pane`]: crate::widget::pane_grid::Pane Pane(T), } diff --git a/native/src/widget/pane_grid/content.rs b/native/src/widget/pane_grid/content.rs index f0ed0426..407f5458 100644 --- a/native/src/widget/pane_grid/content.rs +++ b/native/src/widget/pane_grid/content.rs @@ -55,7 +55,7 @@ where { /// Draws the [`Content`] with the provided [`Renderer`] and [`Layout`]. /// - /// [`Renderer`]: crate::widget::pane_grid::Renderer + /// [`Renderer`]: crate::Renderer pub fn draw( &self, renderer: &mut Renderer, diff --git a/native/src/widget/pane_grid/state.rs b/native/src/widget/pane_grid/state.rs index f9ea21f4..6a282d24 100644 --- a/native/src/widget/pane_grid/state.rs +++ b/native/src/widget/pane_grid/state.rs @@ -1,4 +1,6 @@ //! The state of a [`PaneGrid`]. +//! +//! [`PaneGrid`]: crate::widget::PaneGrid use crate::widget::pane_grid::{ Axis, Configuration, Direction, Node, Pane, Split, }; @@ -21,9 +23,13 @@ use std::collections::{BTreeMap, HashMap}; #[derive(Debug, Clone)] pub struct State<T> { /// The panes of the [`PaneGrid`]. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid pub panes: HashMap<Pane, T>, /// The internal state of the [`PaneGrid`]. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid pub internal: Internal, pub(super) action: Action, @@ -198,6 +204,8 @@ impl<T> State<T> { } /// The internal state of a [`PaneGrid`]. +/// +/// [`PaneGrid`]: crate::widget::PaneGrid #[derive(Debug, Clone)] pub struct Internal { layout: Node, @@ -207,6 +215,8 @@ pub struct Internal { impl Internal { /// Initializes the [`Internal`] state of a [`PaneGrid`] from a /// [`Configuration`]. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid pub fn from_configuration<T>( panes: &mut HashMap<Pane, T>, content: Configuration<T>, @@ -248,11 +258,17 @@ impl Internal { } /// The current action of a [`PaneGrid`]. +/// +/// [`PaneGrid`]: crate::widget::PaneGrid #[derive(Debug, Clone, Copy, PartialEq)] pub enum Action { /// The [`PaneGrid`] is idle. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid Idle, /// A [`Pane`] in the [`PaneGrid`] is being dragged. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid Dragging { /// The [`Pane`] being dragged. pane: Pane, @@ -260,6 +276,8 @@ pub enum Action { origin: Point, }, /// A [`Split`] in the [`PaneGrid`] is being dragged. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid Resizing { /// The [`Split`] being dragged. split: Split, @@ -288,6 +306,8 @@ impl Action { impl Internal { /// Calculates the current [`Pane`] regions from the [`PaneGrid`] layout. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid pub fn pane_regions( &self, spacing: f32, @@ -297,6 +317,8 @@ impl Internal { } /// Calculates the current [`Split`] regions from the [`PaneGrid`] layout. + /// + /// [`PaneGrid`]: crate::widget::PaneGrid pub fn split_regions( &self, spacing: f32, diff --git a/native/src/widget/pane_grid/title_bar.rs b/native/src/widget/pane_grid/title_bar.rs index d56972ec..a10181af 100644 --- a/native/src/widget/pane_grid/title_bar.rs +++ b/native/src/widget/pane_grid/title_bar.rs @@ -82,7 +82,7 @@ where { /// Draws the [`TitleBar`] with the provided [`Renderer`] and [`Layout`]. /// - /// [`Renderer`]: crate::widget::pane_grid::Renderer + /// [`Renderer`]: crate::Renderer pub fn draw( &self, renderer: &mut Renderer, diff --git a/native/src/widget/text.rs b/native/src/widget/text.rs index 6f00c9c8..a7855c30 100644 --- a/native/src/widget/text.rs +++ b/native/src/widget/text.rs @@ -59,7 +59,7 @@ impl<Renderer: text::Renderer> Text<Renderer> { /// Sets the [`Font`] of the [`Text`]. /// - /// [`Font`]: Renderer::Font + /// [`Font`]: crate::text::Renderer::Font pub fn font(mut self, font: impl Into<Renderer::Font>) -> Self { self.font = font.into(); self @@ -77,7 +77,7 @@ impl<Renderer: text::Renderer> Text<Renderer> { self } - /// Sets the [`HorizontalAlignment`] of the [`Text`]. + /// Sets the [`alignment::Horizontal`] of the [`Text`]. pub fn horizontal_alignment( mut self, alignment: alignment::Horizontal, @@ -86,7 +86,7 @@ impl<Renderer: text::Renderer> Text<Renderer> { self } - /// Sets the [`VerticalAlignment`] of the [`Text`]. + /// Sets the [`alignment::Vertical`] of the [`Text`]. pub fn vertical_alignment( mut self, alignment: alignment::Vertical, diff --git a/native/src/widget/text_input.rs b/native/src/widget/text_input.rs index a206a0c7..5ecd68e9 100644 --- a/native/src/widget/text_input.rs +++ b/native/src/widget/text_input.rs @@ -108,10 +108,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`]: crate::text::Renderer::Font pub fn font(mut self, font: Renderer::Font) -> Self { self.font = font; self @@ -157,6 +156,8 @@ where /// Draws the [`TextInput`] with the given [`Renderer`], overriding its /// [`Value`] if provided. + /// + /// [`Renderer`]: text::Renderer pub fn draw( &self, renderer: &mut Renderer, @@ -570,6 +571,8 @@ where /// Draws the [`TextInput`] with the given [`Renderer`], overriding its /// [`Value`] if provided. +/// +/// [`Renderer`]: text::Renderer pub fn draw<Renderer>( renderer: &mut Renderer, layout: Layout<'_>, diff --git a/native/src/widget/toggler.rs b/native/src/widget/toggler.rs index 536aef78..6d7592f3 100644 --- a/native/src/widget/toggler.rs +++ b/native/src/widget/toggler.rs @@ -107,6 +107,8 @@ impl<'a, Message, Renderer: text::Renderer> Toggler<'a, Message, Renderer> { } /// Sets the [`Font`] of the text of the [`Toggler`] + /// + /// [`Font`]: crate::text::Renderer::Font pub fn font(mut self, font: Renderer::Font) -> Self { self.font = font; self 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); /// ``` /// ///  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 diff --git a/src/pure.rs b/src/pure.rs index 948183f1..5776de40 100644 --- a/src/pure.rs +++ b/src/pure.rs @@ -26,6 +26,7 @@ pub use application::Application; pub use sandbox::Sandbox; pub use iced_pure::helpers::*; +pub use iced_pure::Widget; pub use iced_pure::{Pure, State}; /// A generic, pure [`Widget`]. diff --git a/winit/src/settings.rs b/winit/src/settings.rs index 9a93824a..213ef47f 100644 --- a/winit/src/settings.rs +++ b/winit/src/settings.rs @@ -37,12 +37,16 @@ pub struct Settings<Flags> { /// Whether the [`Application`] should exit when the user requests the /// window to close (e.g. the user presses the close button). + /// + /// [`Application`]: crate::Application pub exit_on_close_request: bool, /// Whether the [`Application`] should try to build the context /// using OpenGL ES first then OpenGL. /// /// NOTE: Only works for the `glow` backend. + /// + /// [`Application`]: crate::Application pub try_opengles_first: bool, } |