switch to macro
This commit is contained in:
11
src/event.rs
11
src/event.rs
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user