Event dispatch moved to MutableAppContext. No longer dispatches from presenter. Not currently handling key presses properly
This commit is contained in:
parent
c303c4e8f9
commit
4271eb3624
14 changed files with 392 additions and 336 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::{
|
||||
executor, platform, Entity, FontCache, Handle, LeakDetector, MutableAppContext, Platform,
|
||||
Subscription, TestAppContext,
|
||||
elements::Empty, executor, platform, Element, ElementBox, Entity, FontCache, Handle,
|
||||
LeakDetector, MutableAppContext, Platform, RenderContext, Subscription, TestAppContext, View,
|
||||
};
|
||||
use futures::StreamExt;
|
||||
use parking_lot::Mutex;
|
||||
|
@ -162,3 +162,19 @@ where
|
|||
|
||||
Observation { rx, _subscription }
|
||||
}
|
||||
|
||||
pub struct EmptyView;
|
||||
|
||||
impl Entity for EmptyView {
|
||||
type Event = ();
|
||||
}
|
||||
|
||||
impl View for EmptyView {
|
||||
fn ui_name() -> &'static str {
|
||||
"empty view"
|
||||
}
|
||||
|
||||
fn render(&mut self, _: &mut RenderContext<Self>) -> ElementBox {
|
||||
Element::boxed(Empty::new())
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue