switch away from handles to refs that must be upgraded once

This commit is contained in:
2025-12-20 01:36:07 -05:00
parent 32ca4ec5a6
commit c00ded78c0
11 changed files with 157 additions and 85 deletions

View File

@@ -10,15 +10,15 @@ pub mod eventable {
f: impl for<'a> WidgetEventFn<State::State, <E::Event as Event>::Data<'a>, WL::Widget>,
) -> impl WidgetIdFn<State, WL::Widget> {
move |state| {
let id = self.handles(state);
state.register_event(id.r, event.into_event(), move |ctx| {
let id = self.add(state);
state.register_event(id, event.into_event(), move |ctx| {
f(&mut EventIdCtx {
widget: id.r,
widget: id,
state: ctx.state,
data: ctx.data,
});
});
id.h
id
}
}
}