summaryrefslogtreecommitdiffstats
path: root/src/widget
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/widget.rs21
-rw-r--r--src/widget/column.rs2
-rw-r--r--src/widget/row.rs2
3 files changed, 16 insertions, 9 deletions
diff --git a/src/widget.rs b/src/widget.rs
index c3df3bc1..cd3ff7a2 100644
--- a/src/widget.rs
+++ b/src/widget.rs
@@ -1,8 +1,14 @@
//! Use the built-in widgets or create your own!
//!
-//! # Customization
-//! Every drawable widget has its own module with a `Renderer` trait that must
-//! be implemented by a renderer before being able to use it as a [`Widget`].
+//! # Built-in widgets
+//! Every built-in drawable widget has its own module with a `Renderer` trait
+//! that must be implemented by an [`iced::Renderer`] before being able to use
+//! it as a [`Widget`].
+//!
+//! # Custom widgets
+//! If you want to implement a custom widget, you simply need to implement the
+//! [`Widget`] trait. You can use the API of the built-in widgets as a guide or
+//! source of inspiration.
//!
//! # Re-exports
//! For convenience, the contents of this module are available at the root
@@ -13,6 +19,7 @@
//! ```
//!
//! [`Widget`]: trait.Widget.html
+//! [`iced::Renderer`]: ../trait.Renderer.html
mod column;
mod row;
@@ -78,8 +85,8 @@ pub trait Widget<Message, Renderer>: std::fmt::Debug {
/// its value cannot affect the overall [`Layout`] of the user interface.
///
/// [`Widget`]: trait.Widget.html
- /// [`Layout`]: struct.Layout.html
- /// [`Text`]: ../widget/text/struct.Text.html
+ /// [`Layout`]: ../struct.Layout.html
+ /// [`Text`]: text/struct.Text.html
fn hash(&self, state: &mut Hasher);
/// Processes a runtime [`Event`].
@@ -93,9 +100,9 @@ pub trait Widget<Message, Renderer>: std::fmt::Debug {
///
/// By default, it does nothing.
///
- /// [`Event`]: enum.Event.html
+ /// [`Event`]: ../enum.Event.html
/// [`Widget`]: trait.Widget.html
- /// [`Layout`]: struct.Layout.html
+ /// [`Layout`]: ../struct.Layout.html
fn on_event(
&mut self,
_event: Event,
diff --git a/src/widget/column.rs b/src/widget/column.rs
index 291019b2..d2688912 100644
--- a/src/widget/column.rs
+++ b/src/widget/column.rs
@@ -5,7 +5,7 @@ use crate::{
Style, Widget,
};
-/// A container that places its contents vertically.
+/// A container that distributes its contents vertically.
///
/// A [`Column`] will try to fill the horizontal space of its container.
///
diff --git a/src/widget/row.rs b/src/widget/row.rs
index 6265739a..c4121157 100644
--- a/src/widget/row.rs
+++ b/src/widget/row.rs
@@ -5,7 +5,7 @@ use crate::{
Style, Widget,
};
-/// A container that places its contents horizontally.
+/// A container that distributes its contents horizontally.
///
/// A [`Row`] will try to fill the horizontal space of its container.
///