summaryrefslogtreecommitdiffstats
path: root/native/src/renderer.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 17:19:28 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-05-04 17:19:28 +0200
commit27fdc707562d4e229f07ed9496ed5d64f4e108bc (patch)
tree8a87286f0ccd125df1c2b5c597c2d2805ceb27c5 /native/src/renderer.rs
parenta97c520c814a6d3cc538537791be39e0c3182d6d (diff)
parent02914e5e68d1fbaad53483cd32c74d9ac448d1eb (diff)
downloadiced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.tar.gz
iced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.tar.bz2
iced-27fdc707562d4e229f07ed9496ed5d64f4e108bc.zip
Merge branch 'master' into dev/system-information
Diffstat (limited to 'native/src/renderer.rs')
-rw-r--r--native/src/renderer.rs23
1 files changed, 1 insertions, 22 deletions
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.
///