summaryrefslogtreecommitdiffstats
path: root/src/pure.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-02-12 17:21:28 +0700
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-02-12 17:21:28 +0700
commitbd22cc0bc0f7551d29cf2acd22520f4a906f253c (patch)
treefae6435d0e1500204fca73fa7872fb99a41b6eb4 /src/pure.rs
parente3108494e5886c34312184292ec05dddeb8bf3ca (diff)
downloadiced-bd22cc0bc0f7551d29cf2acd22520f4a906f253c.tar.gz
iced-bd22cc0bc0f7551d29cf2acd22520f4a906f253c.tar.bz2
iced-bd22cc0bc0f7551d29cf2acd22520f4a906f253c.zip
Implement pure version of `todos` example :tada:
The `Widget` trait in `iced_pure` needed to change a bit to make the implementation of `Element::map` possible. Specifically, the `children` method has been split into `diff` and `children_state`.
Diffstat (limited to 'src/pure.rs')
-rw-r--r--src/pure.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pure.rs b/src/pure.rs
index 7fe2bc59..29495c07 100644
--- a/src/pure.rs
+++ b/src/pure.rs
@@ -17,12 +17,15 @@
//! [the original widgets]: crate::widget
//! [`button::State`]: crate::widget::button::State
//! [impure `Application`]: crate::Application
-pub use iced_pure::{Element as _, *};
+pub use iced_pure::{Element as _, Text as _, *};
/// A generic, pure [`Widget`].
pub type Element<'a, Message> =
iced_pure::Element<'a, Message, crate::Renderer>;
+/// A pure text widget.
+pub type Text = iced_pure::Text<crate::Renderer>;
+
mod application;
mod sandbox;