Simplify adapter
This commit is contained in:
parent
85f35497b6
commit
7756497933
6 changed files with 81 additions and 93 deletions
|
@ -1461,6 +1461,7 @@ impl ToJson for SizeConstraint {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct ChildView {
|
||||
view_id: usize,
|
||||
view_name: &'static str,
|
||||
|
|
|
@ -33,8 +33,8 @@ use crate::{
|
|||
rect::RectF,
|
||||
vector::{vec2f, Vector2F},
|
||||
},
|
||||
json, Action, LayoutContext, PaintContext, SceneBuilder, SizeConstraint, View, ViewContext,
|
||||
WeakViewHandle, WindowContext,
|
||||
json, Action, Entity, LayoutContext, PaintContext, SceneBuilder, SizeConstraint, View,
|
||||
ViewContext, WeakViewHandle, WindowContext,
|
||||
};
|
||||
use anyhow::{anyhow, Result};
|
||||
use collections::HashMap;
|
||||
|
@ -564,6 +564,12 @@ impl<V: 'static> Element<V> for AnyElement<V> {
|
|||
}
|
||||
}
|
||||
|
||||
impl Entity for AnyElement<()> {
|
||||
type Event = ();
|
||||
}
|
||||
|
||||
// impl View for AnyElement<()> {}
|
||||
|
||||
pub struct RootElement<V> {
|
||||
element: AnyElement<V>,
|
||||
view: WeakViewHandle<V>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue