decide it's better to leave them separate
This commit is contained in:
@@ -172,17 +172,7 @@ impl<E: Event + 'static, Ctx: 'static> Default for DefaultEventModule<E, Ctx> {
|
||||
}
|
||||
|
||||
impl Ui {
|
||||
pub fn run_event<E: Event + Clone, Ctx: UiCtx + 'static, W>(
|
||||
ctx: &mut Ctx,
|
||||
id: &WidgetId<W>,
|
||||
event: E,
|
||||
data: E::Data,
|
||||
) {
|
||||
Self::run_event_inner(ctx, id, event.clone(), data.clone());
|
||||
Self::run_event_inner(ctx.ui(), id, event, data);
|
||||
}
|
||||
|
||||
fn run_event_inner<E: Event, Ctx: UiCtx + 'static, W>(
|
||||
pub fn run_event<E: Event, Ctx: UiCtx + 'static, W>(
|
||||
ctx: &mut Ctx,
|
||||
id: &WidgetId<W>,
|
||||
event: E,
|
||||
@@ -205,7 +195,6 @@ pub trait EventCtx: UiCtx {
|
||||
|
||||
impl<Ctx: UiCtx + 'static> EventCtx for Ctx {
|
||||
fn run_event<E: Event + Clone, W>(&mut self, id: &WidgetId<W>, event: E, data: E::Data) {
|
||||
Ui::run_event_inner(self, id, event.clone(), data.clone());
|
||||
Ui::run_event_inner(self.ui(), id, event, data);
|
||||
Ui::run_event(self, id, event.clone(), data.clone());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user