summaryrefslogtreecommitdiffstats
path: root/core/src/widget.rs
diff options
context:
space:
mode:
authorLibravatar Héctor <hector@hecrj.dev>2024-11-13 17:08:26 +0100
committerLibravatar GitHub <noreply@github.com>2024-11-13 17:08:26 +0100
commita11fcf8f2dde551335c6f34788393fa2e8f8a362 (patch)
tree1e423c847a6505a2582bec19908866dba94c436d /core/src/widget.rs
parent42a2cb6d4f78343f43d6a68a28e5502d9426ed2c (diff)
parent28ec6df8f0ebf96966bee61caf5a325695314b7a (diff)
downloadiced-a11fcf8f2dde551335c6f34788393fa2e8f8a362.tar.gz
iced-a11fcf8f2dde551335c6f34788393fa2e8f8a362.tar.bz2
iced-a11fcf8f2dde551335c6f34788393fa2e8f8a362.zip
Merge pull request #2662 from iced-rs/reactive-rendering
Reactive Rendering
Diffstat (limited to 'core/src/widget.rs')
-rw-r--r--core/src/widget.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/src/widget.rs b/core/src/widget.rs
index 9cfff83d..2a40f823 100644
--- a/core/src/widget.rs
+++ b/core/src/widget.rs
@@ -10,12 +10,11 @@ pub use operation::Operation;
pub use text::Text;
pub use tree::Tree;
-use crate::event::{self, Event};
use crate::layout::{self, Layout};
use crate::mouse;
use crate::overlay;
use crate::renderer;
-use crate::{Clipboard, Length, Rectangle, Shell, Size, Vector};
+use crate::{Clipboard, Event, Length, Rectangle, Shell, Size, Vector};
/// A component that displays information and allows interaction.
///
@@ -112,7 +111,7 @@ where
/// Processes a runtime [`Event`].
///
/// By default, it does nothing.
- fn on_event(
+ fn update(
&mut self,
_state: &mut Tree,
_event: Event,
@@ -122,8 +121,7 @@ where
_clipboard: &mut dyn Clipboard,
_shell: &mut Shell<'_, Message>,
_viewport: &Rectangle,
- ) -> event::Status {
- event::Status::Ignored
+ ) {
}
/// Returns the current [`mouse::Interaction`] of the [`Widget`].