mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-09 05:06:43 +01:00
wip: fixing the modal
This commit is contained in:
parent
29f11b5977
commit
2adf0028c3
5 changed files with 57 additions and 69 deletions
|
|
@ -178,6 +178,11 @@ impl<H, E: Engine> Handle<E> for Arc<RwLock<H>> where H: Handle<E> {
|
|||
pub trait Component<E: Engine>: Widget<Engine = E> + Handle<E> {}
|
||||
/// Everything that implements [Render] and [Handle] is a [Component].
|
||||
impl<E: Engine, C: Widget<Engine = E> + Handle<E>> Component<E> for C {}
|
||||
/// A UI component that can render itself and handle input
|
||||
pub trait ContentComponent<E: Engine>: Widget<Engine = E> + Handle<E> {}
|
||||
/// Everything that implements [Render] and [Handle] is a [Component].
|
||||
impl<E: Engine, C: Content<Engine = E> + Handle<E>> ContentComponent<E> for C {}
|
||||
|
||||
pub trait Exit: Send {
|
||||
fn exited (&self) -> bool;
|
||||
fn exit (&mut self);
|
||||
|
|
@ -185,6 +190,7 @@ pub trait Exit: Send {
|
|||
Box::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
/// Marker trait for [Component]s that can [Exit]
|
||||
pub trait ExitableComponent<E>: Exit + Component<E> where E: Engine {
|
||||
/// Perform type erasure for collecting heterogeneous components.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue