switch to macro

This commit is contained in:
2025-12-11 05:31:34 -05:00
parent 2dc5b0f62c
commit 174c447706
2 changed files with 5 additions and 29 deletions

View File

@@ -35,15 +35,8 @@ pub use event_ctx;
pub mod eventable {
use super::*;
pub trait Eventable<W, Tag> {
fn on<E: Event, Ctx: 'static>(
self,
event: E,
f: impl WidgetEventFn<Ctx, E::Data, W>,
) -> impl WidgetIdFn<W> + Eventable<W, IdFnTag>;
}
impl<WL: WidgetLike<Tag>, Tag> Eventable<WL::Widget, Tag> for WL {
widget_trait! {
pub trait Eventable;
fn on<E: Event, Ctx: 'static>(
self,
event: E,