Add scoped overlay hosts
This commit is contained in:
1 parent
a33fbca966
commit
44a5da378b
14 files changed
+882
-27
No files matched your search
@@ -22,14 +22,14 @@ pub trait WidgetLike<Rsc: UiRsc, Tag>: Sized {
|
||||
}
|
||||
}
|
||||
|
||||
fn set_root(self, rsc: &mut Rsc, root: &mut impl HasRoot) {
|
||||
fn set_root(self, rsc: &mut Rsc, root: &mut impl HasRoot<Rsc>) {
|
||||
let id = self.add_strong(rsc);
|
||||
root.set_root(id);
|
||||
root.set_root(rsc, id);
|
||||
}
|
||||
}
|
||||
|
||||
pub trait HasRoot {
|
||||
fn set_root(&mut self, root: StrongWidget);
|
||||
pub trait HasRoot<Rsc> {
|
||||
fn set_root(&mut self, rsc: &mut Rsc, root: StrongWidget);
|
||||
}
|
||||
|
||||
pub trait WidgetArrLike<Rsc, const LEN: usize, Tag> {
|
||||
|
||||
Reference in new issue
Block a user