diff options
author | 2022-08-05 22:31:26 +0200 | |
---|---|---|
committer | 2022-08-05 22:31:26 +0200 | |
commit | f294c2d16249ce8b7989f8af6332678f53d8fb12 (patch) | |
tree | bb8d6f00fe25de9187b1d3b90a88ae95225b7428 /native/src/widget.rs | |
parent | a003e797e8a1bb5d365c1db5de6af88e61a47329 (diff) | |
parent | ad5bd0970d7106a97d455a164a582ab1d0bff18b (diff) | |
download | iced-f294c2d16249ce8b7989f8af6332678f53d8fb12.tar.gz iced-f294c2d16249ce8b7989f8af6332678f53d8fb12.tar.bz2 iced-f294c2d16249ce8b7989f8af6332678f53d8fb12.zip |
Merge pull request #1399 from iced-rs/widget-operations
Widget Operations
Diffstat (limited to 'native/src/widget.rs')
-rw-r--r-- | native/src/widget.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/native/src/widget.rs b/native/src/widget.rs index 9a4f373a..8890b8e7 100644 --- a/native/src/widget.rs +++ b/native/src/widget.rs @@ -17,6 +17,7 @@ pub mod column; pub mod container; pub mod helpers; pub mod image; +pub mod operation; pub mod pane_grid; pub mod pick_list; pub mod progress_bar; @@ -33,6 +34,9 @@ pub mod toggler; pub mod tooltip; pub mod tree; +mod action; +mod id; + #[doc(no_inline)] pub use button::Button; #[doc(no_inline)] @@ -76,6 +80,10 @@ pub use tooltip::Tooltip; #[doc(no_inline)] pub use tree::Tree; +pub use action::Action; +pub use id::Id; +pub use operation::Operation; + use crate::event::{self, Event}; use crate::layout; use crate::mouse; @@ -159,6 +167,15 @@ where /// Reconciliates the [`Widget`] with the provided [`Tree`]. fn diff(&self, _tree: &mut Tree) {} + /// Applies an [`Operation`] to the [`Widget`]. + fn operate( + &self, + _state: &mut Tree, + _layout: Layout<'_>, + _operation: &mut dyn Operation<Message>, + ) { + } + /// Processes a runtime [`Event`]. /// /// By default, it does nothing. |