Merge branch 'main' into derive-element-redux
This commit is contained in:
commit
0798cfd58c
117 changed files with 7260 additions and 2951 deletions
|
@ -179,6 +179,10 @@ impl AnyView {
|
|||
self.model.entity_type
|
||||
}
|
||||
|
||||
pub fn entity_id(&self) -> EntityId {
|
||||
self.model.entity_id()
|
||||
}
|
||||
|
||||
pub(crate) fn draw(
|
||||
&self,
|
||||
origin: Point<Pixels>,
|
||||
|
@ -309,18 +313,6 @@ impl<V: 'static + Render<V>> From<WeakView<V>> for AnyWeakView {
|
|||
}
|
||||
}
|
||||
|
||||
impl<F, E> Render<F> for F
|
||||
where
|
||||
F: 'static + FnMut(&mut WindowContext) -> E,
|
||||
E: 'static + Send + Element<F>,
|
||||
{
|
||||
type Element = E;
|
||||
|
||||
fn render(&mut self, cx: &mut ViewContext<Self>) -> Self::Element {
|
||||
(self)(cx)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct RenderViewWith<E, V> {
|
||||
view: View<V>,
|
||||
element: Option<E>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue